Importing Virtual Machine With Missing RemoteFX Adapter: Unhandled exception has occurred in your application #HyperV #RDS #VDI


I am currently working on several Microsoft RDS/VDI projects, and what is better than Hyper-V, RDS and Unidesk integration. Awesome stuff!

While importing a virtual machine in Hyper-V Manager, I received the following Unhandled exception error:

[Unhandled exception has occurred in your application. If you click Continue, the application will ignore and attempt to continue. If you click Quit, the application will close immediately.]


Well Hyper-V Manager console will crash and close if you click either option.

As you can see in the error message thrown in the UI is not clear enough, if we dig deeper and expand the details, we can see the following message:

At first I did not realize from where this error came from.

If you noticed at the beginning of this message, we can see the following:


If you recall, every time you have ever tried to import or register a virtual machine in Hyper-V Manager, and the virtual machine was not compatible with your current computer (i.e. memory, processor, virtual switch, etc…), you will receive a warning message to take corrective action before you continue. This is a GUI experience that allows you to make changes to the incoming virtual machine in order to make it work on the physical computer. Microsoft internally refers to it as “the fix-up wizard”, as it allows you to fix a virtual machine and make it compatible with your computer.

However, this is not the case when you import or register a virtual machine with missing RemoteFX Adapter, the GUI do not give you the option to fix it, the import wizard GUI will crash. Is it a bug in the UI? Probably Yes!

If we try to import the same VM using PowerShell, you will get a different error message, but you are guided to use Compare-VM to repair the virtual machine.



The root cause of this error is that Windows Server 2012 R2 Remote Desktop Virtualization Host did not have the physical GPU selected under Hyper-V Settings:



There are two options actually to fix this error, the first one is very obvious, selected the right GPU under Hyper-V Settings if your host capable and you are good to go, and the second one is using PowerShell to remove the RemoteFx Adapter and import the VM into a Hyper-V host where you don’t have a GPU installed. I will show you the latter option which you will need if you want to start this VM without RemoteFx Adapter.

So how do you make this VM to work? Well the answer is in the error message as shown above: use Compare-VM. “Compare-VM” is the PowerShell equivalent of “the fix-up wizard” in the UI.

In this case you need to use Compare-VM and provide it with exactly the same parameters that I was using for Import-VM. This returns a virtual machine compatibility report – which I will store in the variable called $vmReport


As you can see, the virtual machine compatibility report has a property called “Incompatibilities”.  This property is a collection of everything that is wrong with the virtual machine. Here I have a RemoteFX Adapter that is failed to find any RemoteFX capable host.

If we go deeper and look at the “RemoteFxAdapter” VM property, we can see all the settings for this adapter.


There is only one way that you can fix up this particular problem. This way is to remove the virtual machine object (RemoteFxAdapter) that is attached to the virtual machine compatibility report itself. Below I show you how to do it:


As you can see when removing the adapter from the compatibility report, we received another error as well [cannot add more than one instance of device ‘Microsoft:Hyper-V:Synthetic Display Controller’.] However, the RemoteFxAdapter was removed successfully:


Once you have removed the RemoteFxAdapter from the incompatibilities you can successfully import the virtual machine by using Import-VM and passing it the corrected compatibility report.


Here is the settings for the same VM on a host with GPU and RemoteFxAdapter attached to it.HyperV-RemoteFXAdapter-Import-VM11

The same VM imported and running without RemoteFxAdapter on a Hyper-V host without GPU.


Hope this helps!

Enjoy your weekend…


About Charbel Nemnom 405 Articles
Charbel Nemnom is a Cloud Solutions Architect and Microsoft Most Valuable Professional (MVP), totally fan of the latest's IT platform solutions, accomplished hands-on technical professional with over 17 years of broad IT Infrastructure experience serving on and guiding technical teams to optimize performance of mission-critical enterprise systems. Excellent communicator adept at identifying business needs and bridging the gap between functional groups and technology to foster targeted and innovative IT project development. Well respected by peers through demonstrating passion for technology and performance improvement. Extensive practical knowledge of complex systems builds, network design and virtualization.

Be the first to comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.