Linux and Hyper-V the Easy Way: Brown and Serve!

Linux runs on Hyper-V – you’ve seen Hanna Montana Linux here already
(I couldn’t resist using it!). 

I do hope you’ll look to Windows Server first as your preferred application platform, but realize that sometimes business conditions may lead you to run other operating systems in your data center.  The Linux Integration Components for Hyper-V help optimize performance in such mixed environment.

Since the Hyper-V Integration Components were contributed to Linux, they’ve been included in recent versions of the Linux kernel.  With distributions based on newer builds of the Linux kernel (2.6.32 and after) you can add high performance support for Hyper-V without the need to download the Linux Integration Components (ICs) from Microsoft.

I ran through the process this weekend with the latest version of Ubuntu desktop that I could find (10.04 workstation).  It’s based on the 2.6.32 version of the Linux kernel, and includes the ICs for Hyper-V.  Step 1

Once I had it all loaded, I did the following inside the VM:

  1. I defined a VM with both a synthetic and legacy NIC so I would have network access before  the ICs were enabled.  I also mounted the ISO file in the virtual DVD drive.

    Step 2

  2. I booted the VM, ran through the install, and checked to see what sort of NICs were detected.  Only the legacy emulated NIC was found, because the ICs have not yet been enabled. 

    Step 3

  3. I opened up a terminal window, and ran Gedit to add the following entries to the “/etc/initramfs-tools/modules”  file (needed sudo in front of gedit, but you may be a Linux guru and might do it with VI or some other way):

    Step 4

  4. Followed by “update-initramfs –u” and a rebooted to activate the ICs.

    After Reboot
    After the reboot, I had wicked fast synthetic network access and higher performance disk access. 

I later removed the legacy emulated NIC (no need for two NICs in this VM), and can now also add lots more disks using the synthetic SCSI adapter.

The ICs work great, and the VM is really responsive, but the version of the Integration Components is not the exact same one that Windows Server 2008 R2 is expecting.  With some versions of the, ICS  you might see some interesting notes in your event log, like those below: 









Don’t worry, the ICs work just fine as it says in the event log.  The comment about support can show up for any version of Linux – whether it is supported or not due to the timing related to the code release.

Note that Ubuntu is not a distribution that is currently supported by Microsoft on Hyper-V, but it does have the IC code included, and seems to work pretty well!

Once other distributions start to leverage 2.6.32 and newer versions of the Linux kernel, you should be able to use a similar process to enhance Linux performance on Hyper-V.