Cannot connect to Hyper-V Virtual Machine

3

I have a Windows XP Virtual Machine that is running perfectly (I can watch it bootup and the desktop appear in the Hyper-V Manager thumbail preview) but I cannot Connect to it.

It just keeps timing out every time I attempt to connect.

Here's the error in the MMC:

Cannot connect to the virtual machine. Try to connect again. It the problem persists, contact your system administrator.

I've tried restarting the Hyper-V service, but nothing seems to make any difference. I also read in this question that VPN software was preventing the connection, so I uninstalled mine, too. I also tried disabling my local firewall, just incase. But it still won't connect.

I've tried to discover the VM's IP Address following these instructions, but nothing is returned in PowerShell. The command completes with no output whatsoever (which means it DOES find the VM, but still doesn't show an IP Address).

enter image description here

(Note: I renamed "Windows XP" to "WindowsXP" for the purpose of this test. It's not a mistake.)

Trying to connect through the Virtual Machine Connection causes the same "unable to connect" error, too:

enter image description here

Django Reinhardt

Posted 2014-10-21T14:04:45.723

Reputation: 4 183

Aside from restarting the Hyper-V service, what else have you tried already? Is RDP enabled on the XP guest? Is the firewall up on the XP guest? Can you ping the VM? Can the VM ping the host? Is the guest getting the expected IP settings? – Ƭᴇcʜιᴇ007 – 2014-10-21T14:13:35.993

@Ƭᴇcʜιᴇ007 The VM worked great several months ago (as the screenshot clearly shows). How do I ping the VM? – Django Reinhardt – 2014-10-21T14:16:52.430

Ping <guest computer name>, or ping <guest IP address>, any answers for my other queries? – Ƭᴇcʜιᴇ007 – 2014-10-21T14:21:17.657

@Ƭᴇcʜιᴇ007 I know how to ping something, but I can't anything which tells me what the guest IP address might be? As Windows 8 configured the XP device, and as it previously worked fine, I can assume RDP is enabled and there's no firewall issues there. – Django Reinhardt – 2014-10-21T14:28:17.483

If you log into the VM via the Console you can look it up in the usual places in XP (ipconfig for one). Also someplace in the Hyper-V manager may tell you. – Ƭᴇcʜιᴇ007 – 2014-10-21T14:29:41.453

@Ƭᴇcʜιᴇ007 What do you mean by "console"? The command prompt or the MMC (pictured above)? How can I log into the VM? Everything is done via RDP as far as I'm aware (including connecting through the MMC). – Django Reinhardt – 2014-10-21T14:57:22.750

@Ƭᴇcʜιᴇ007 I've updated my question with further information. – Django Reinhardt – 2014-10-21T15:12:37.170

Answers

0

This may be due to the time on the Virtual Machine being inaccurate.
To resolve, open a powershell session to the server:

Enter-PSSession -ComputerName <servername>

Now, manually set the time:

Set-Date "23/08/2017 12:56:00 PM"

Finally, give the server a reboot and you should be able to connect.

Shiffle McDoobles

Posted 2014-10-21T14:04:45.723

Reputation: 220