Installing Hyper-V Linux Integration Components On CentOS 5

Want to support HowtoForge? Become a subscriber!
 
Submitted by CrsH (Contact Author) (Forums) on Tue, 2009-08-04 12:30. :: CentOS | Virtualization

Installing Hyper-V Linux Integration Components On CentOS 5

Introduction

Microsoft has introduced together with Windows 2008 a new Hypervisor called Hyper-V. Initially Microsoft only supported Microsoft products and Novell Suse, but recently they added support for Red Hat Enterprise Linux. With this support it is also possible to install the components on CentOS.

 

1. Download Latest Linux Integration Components

You can download the exe file here. Extract it and copy the linuxic.iso somewhere you can mount it as a cdrom on your Virtual Machine.

 

2. Installation

To install the drivers we need the development tools. Easiest method to install those is via Yum.

yum groupinstall "Development Tools"

Next we will copy the contents of the cdrom to the server

mkdir -p /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
cp -rp /mnt/cdrom /opt/linux_ic
umount /mnt/cdrom

Let's create a new initrd image with the nessecary drivers.

cd /opt/linux_ic
./setup.pl drivers

When this is finished you can safely shutdown the virtual machine and add the synthetic adapters (Network, SCSI, ...). Once the machine is booted and logged in in you can verify the installation of the drivers with following command:

lsmod | grp 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

If you installed a synthetic Network Adapter you can verify with ifconfig -a and check if there is seth0.

 

Translations

This tutorial is also available in dutch.


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Jean-Sebastien Carle (not registered) on Mon, 2010-12-13 10:39.
I wrote a detailed article showing the complete process for installing CentOS 5.5 with Linux Integration Services 2.1 on Hyper-V R2. It can be found on my blog at http://www.jcarle.com/2010/12/06/installing-centos-5-5-with-linux-integration-services-2-1-on-hyper-v-r2/
Submitted by Joris van de Sande (not registered) on Sat, 2009-12-26 11:06.
I have created a tutorial about the installation of the linux integration components in a non-running kernel. It can be found at: http://www.devplace.nl/blog/updating-hyper-v-drivers-after-kernel-upgrade-on-centos .
Submitted by Ned (not registered) on Mon, 2009-11-23 10:19.
download the hyper-v r2 linux ic's at *http://www.microsoft.com/downloads/details.aspx?FamilyID=c299d675-bb9f-41cf-b5eb-74d0595ccc5c&displaylang=en the connect site link given above does not have a download link.
Submitted by Anonymous (not registered) on Mon, 2009-12-21 17:04.
I wish I saw a comment before spending time trying to find nonexisting Downloads link. And, what now? It's not selfextracting .exe, what is it and how can it be extracted?
Submitted by Anonymous (not registered) on Tue, 2009-12-22 15:56.

The answer is: run on Windows Server 64 bit, not on Windows XP.

Submitted by balboa41 (registered user) on Thu, 2009-11-12 14:58.

I have CentOS over Hyper-V and I received an error when trying to run

 ./setup.pl drivers

 So I did a research and you must update your distribution before attempting to install the drivers.  Also, you must use the v2 of the drivers that is available from Microsoft's Downloads website, if you use Hyper-V R2, like my case.

 To update your distribution, do:

yum update

And wait until Yum updates all of your files, then restart your Virtual Machine and then choose the new kernel when the screen to select it is displayed (but it is automatically chosen, I think).  After that, you can install the drivers by using sudo or by using the root account.

If you need to use the root account, do:

su -

and enter your root password.

 

Hope this helps!

Submitted by Anonymous (not registered) on Wed, 2011-11-02 14:17.
I've update my install, but still, the command wont work.
Submitted by badbob001 (not registered) on Mon, 2010-01-18 18:54.

I'm using CentOS 5.4 on Hyper-V and I'm finding it stuck after installing the integration client with it starts the vmbus.  And when I reboot, it's stuck at 'Red Hat nash version 5.1.19.6 starting".

I installed the r2 version of the integration client even I'm using the non-r2 version of Winders Server 2008.  Could that be a factor?

As for performing a 'yum update' before installing the IC, how is that possible when the virtual system doesn't defect the network hardware pre-IC installation?

Submitted by Michael M (not registered) on Sat, 2010-01-23 21:04.

@badbob "As for performing a 'yum update' before installing the IC, how is that possible when the virtual system doesn't defect the network hardware pre-IC installation?"

You need to install a legacy nic first so you can get network connectivity. After the IC are installed you can then delete that nic.