After you install the guest OS on the virtual machine in Hyper-V, you need to to install the Hyper-V Integration Services in the guest OS. 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.
For Ubuntu 12.04 the following Hyper-V integration services are available: time synchronization, operating system shutdown, and heartbeat. Also, included are the following drivers: IDE, SCSI, networking, and mouse. Microsoft’s About Virtual Machines and Guest Operating Systems article provides a list of guest operating systems and features that are supported for Hyper-V in Windows Server 2008 R2, Hyper-V in Windows Server 2008 with Service Pack 2, and Hyper-V version 1. For a list of guest OS support in Hyper-V role in Windows Server 2012 see Hyper-V Overview in TechNet.
In this post I am using Ubuntu 12.04 LTS as the guest OS and Hyper-V role in Windows Server 2012 as the hypervisor. As mentioned earlier, integration services are built-in (since Ubuntu version 10.10) and do not require a separate download and installation — the ICs just need to be activated. To enable the integration services you will need to edit the modules file located in /etc/initramfs-tools. Below are the step by step instructions on how to do so in vi:
cd /etc/initramfs-tools/ sudo vi modules
In vi navigate to the last line in the file and use the I command to append a new line below this one. Enter the following four lines:
hv_vmbus hv_storvsc hv_blkvsc hv_netvsc
Save the file by hitting the Esc key and issuing the x: command. Once the modules file has been updated, the following command needs to be executed:
sudo update-initramfs –u
At this point the guest OS needs to be rebooted:
sudo shutdown -r now
After the virtual machine reboots, run the following command to check if the modules are enabled:
The ICs work great, but the version of the Integration Components is not the exact same one that Windows Server 2012 is expecting (same issues reported with Windows Server 2008 R2). With some versions of the ICs you might see some interesting notes in your Windows event log. 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.