Hyper-V R2 saw several interesting things happen at once this past summer (2009). Many performance improvements were introduced and, with those updates, new Linux Integration Components were delivered. No longer are Linux VMs required to have the Xen virtualization stack and, in fact, if you have added the Virtualization groups with yum, you'll probably encounter issues.
But that's not all.
A significant cause of Climate Change is that Hell is freezing over: for the first time, Microsoft code in the form of these Integration Components has been contributed to the Linux kernel under GPLv2. Yeah, I know. What were they thinking?
You can download the latest Linux IC ISO at http://www.microsoft.com/downloads
Assuming you have already installed CentOS, follow these steps to compile and install the Linux IC and the synthetic HID and Mouse drivers. These same steps should work for you with Red Hat Enterprise Linux, too. Maybe someday I’ll get around to do this with my Ubuntu VMs.
Anyway, the following is a series of steps culled from a wide variety of How-To pages, none of which produced exactly the results I was looking for. Those sites are listed as sources at the end of this post.
Getting Started:
1. Using Yum install kernel-devel (since you're just compiling drivers, you no longer need the complete kernel-source packages). You'll also need the CentOS Development Tools installation group.
yum groupinstall "Development Tools"
yum install kernel-devel
2. Insert the Linux IC 2.0 ISO into the virtual DVD drive on the CentOS VM.
3. Mount the ISO and copy the contents to /opt/linux_ic_master
mkdir -p /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
cp -rp /mnt/cdrom /opt/linux_ic_master
umount /mnt/cdrom
4. Compile the drivers (this step should also modify the system startup parameters to include the VMBus and the synthetic drivers and set them to start automatically).
cd /opt/linux_ic_master
./setup.pl drivers
5. Download the input service drivers from Xen
http://www.xen.org/files/Satori/inputvsc.iso
6. Make a directory for the input service files and copy them from the ISO
mkdir /opt/inputvsc
cp -R /media/cdrom/* /opt/inputvsc/
7. Install the Inputsvc module (Note that you may need to use yum to install the xorg-x11-server-sdk package if this step fails the first time.)
cd /opt/inputvsc
./setup.pl inputdriver
8. Reboot
shutdown -r now
9. If the reboot has no problems, shut the VM down and add network adapters and SCSI controllers as needed in the VM Settings.
10. Restart the VM. You should now be able to control your internal mouse without having to press the host release keys. You should also see seth0 bound and started.
11. Verify the required synthectic drivers are loaded.
lsmod | grep vsc
netvsc 73704 0
storvsc 66824 0
blkvsc 70440 3
vmbus 86120 3 netvsc,storvsc,blkvsc
scsi_mod 196569 6 scsi_dh,sg,storvsc,blkvsc,libata,sd_mod
hid
inputsvc
These synthetic devices will allow you to use network adapters that run at the full capacity of your host's network adapters and SCSI controllers.
Sources:
http://www.howtoforge.com/installing-hyper-v-linux-integration-components-on-centos-5
http://www.xen.org/download/satori.html
http://wiki.centos.org/HowTos/I_need_the_Kernel_Source
http://blogs.technet.com/virtualization/archive/2009/07/20/linux-ics-for-hyper-v-and-gplv2.aspx
No comments:
Post a Comment