ThoughtFactory.CreateThought() A random collection of thoughts from an easily bored developer

2May/100

Hyper-V Networking Issues

Although I’m by no means a Sysadmin, I know just enough to be useful when a room full of developers has a server/network related issue. For the proof of concept I’m currently working on we have to set up our own infrastructure, and seeing as we don’t have a dedicated infrastructure person on the team I ended up doing most of the software installation and network setup.

As a consequence, I’ve spent the last few weeks playing with various virtual machine technologies, given that we initially had to jury rig a fairly large environment out of whatever laptops and desktops we had on hand. We had some machines running VMware Workstation, some with VirtualBox and two large desktops running Hyper-V. One of these desktops was my personal dev box that usually sits under my desk at home, but it’s powerful enough that I decided to use it on the project.

The VirtualBox and VMware images were running fine, but all of the images on the Hyper-V machines had abysmal network performance. I tried everything I could think of to improve performance, including upgrading drivers and forcing the speed/duplex settings, but to no avail.

“Surely it must be an issue with the network”, I said. Oh well. Seeing as the environments were only needed for a short period of time I chalked it up to experience and just tried to run as much on one machine as possible. The next environment we were moving to was in another office (difference network gear, different virtual hosts and virtual machines etc) so I wasn’t worried about having the same issues.

Thankfully we didn’t see the same issues after the office move, and the client infrastructure people who set the environment up and sort out issues for us have been fantastic. Great environment, great people, all is good with the world, and I would never run into that nasty network speed issue again…

Until, that is, I took my dev server home and hooked it back up. I tried using terminal server to access one of the virtual machines and once again the performance was dreadful, while connecting to the virtual host was super quick. What gives, Hyper-V? This had to be fixed.

Well, it turns out that I’m not the only one experiencing these issues. A quick Google search revealed an issue with TCP Offload settings on Hyper-V Virtual Machines. Apparently the virtual host takes care of this for you, so you should disable any TCP Offload related settings on the virtual machines. The author of the article suggests making a registry modification to disable the setting, but I simply disabled anything related to TCP Offloading in the properties of the NIC on each virtual machine.

The speed increase was both immediate and fantastic. It’s hard to believe that a few hours ago I couldn’t remote desktop into a virtual machine that was sitting a metre away from me with a virtual host that was plugged into the same 1000Mbps switch as my desktop machine without getting timeouts or extreme lag, yet now it flies along.

All this makes me wonder why Hyper-V doesn’t configure this by default. It sets up the drivers for the NIC and there are Hyper-V integration services at work too, so surely the virtual host must have some opportunity to make rather vital config changes like this on the guest operating systems? Considering the guest operating system is nearly unusable without the fix you would think that they would have a big red dialog window that pops up during the installation procedure for each new machine that tells you to apply the change.

   
Sharing Buttons by Linksku