Posts tagged microsoft
In order to boost our development capabilities at work, we recently moved an Hyper-V solution on a VHD host. The host system is a standard Windows Server 2008 R2 system (running from a bootable VHD). We then use Hyper-V to create virtual machines with various configurations for development purposes.
Hyper-V and its basic virtual VGA adapter
The great thing about Hyper-V is that you can boot your VMs and let them run in the background. Should you need to see what’s going on (like a real monitor attached to a physical PC), you can use the built-in “Connect…” feature to see the VM screen. Hyper-V is using a basic VGA adapter to achieve that, which results in a 4:3 low resolution display of the VM. If you’re using that remote screen for development purposes, it’s quite counter-productive and annoying. Which is where the standard Remote Desktop (mstsc.exe) comes handy.
Isn’t that great when your host and VM can’t talk to each other?
The first thing I get while trying to connect to a VM running on my host is a “Not found” error. Sure enough, my VM has network access and so has my host. My colleagues can ping my VMs (and vice-versa) just fine, but impossible to ping the host from the VM or the VM from the host.
Don’t put your VMs on the same network adapter as your host…
Turns out it’s not a good idea to use the same network adapter for Hyper-V and your host. Even though your VMs have completely different and unique MAC and IP address, the packets are still trying to get in and out of the same physical interface which is a no-go. The solution was to use a second PCI-Express gigabit card (or a PCI) to add a second physical network adapter. The host is using the main network adapter while Hyper-V uses the second adapter. Now it all works perfectly.
I’ve seen some complex tutorials about creating local loopbacks adapters with NAT translation in order to use only 1 adapter and frankly, it doesn’t seem work the effort and it might affect performance in the end. So there you go, use 2 physical adapters for Hyper-V.