Why I Can't access Hyper-V VM's: "Cannot find the physical computer that runs the virtual machine" Error Message

Hi,

I ran into an issue on my new notebook "Lennovo W520" that runs Windows Server 2008 R2 w/ SP1. I configured Hyper-V and start building my own Labs. i was happy to build a 24 VM's with different technologies in one day :). so I was tired and i went to sleep, but before that i saved all my created VM's so next day i continue working on my personal Lab.

but, and while am drinking my lovely Coffe Morning, I switch on my laptop and fired up my VM console, and bring all the VM's into running state from the saved mode, but when i tried to connect to these VM's by double click on any of the VM's, i start getting this anoying error:

Cannot find the physical computer that runs the virtual machine. Try to flush your DNS cache (run ipconfig /flushdns). Then try to connect again. If the problem persists, contact the administrator of the physical computer or your network administrator”

after a quick search over the net, I found that this problem happens if you have DirectAccess Service Enabled and Configured on your Hyper-V Host Server (or notebook as in my case), here is the link for a full description of the problem and the How-To:

https://blogs.msdn.com/b/thompal/archive/2009/11/06/hyper-v-virtual-machine-connection-and-direct-access.aspx

 

basically what you need to do is either:

1.Quick Workarround :  A less drastic fix, if you happen to have the DirectAccess Connectivity Assistant installed and configured is to right-click the DCA icon in the WIndows taskbar and select "Prefer Local DNS Names". This too clears the NRPT cache from the local computer and gets you around this problem. Re-enabling DirectAccess can be accomplished by right-clicking DCA again and selecting "Prefer Corporation DNS Names"

2. Another Solution: from the Hyper-V Host Server do the following:

- go into the Registry and delete "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient\DnsPolicyConfig"   
- in an elevated command prompt, enter: sc control dnscache paramchange

After that the “Virtual Machine Connection” was working fine.