25 set 2010

How to install CentOS on Hyper-V R2 Server (with RDP Mouse support)

CentOS is an Enterprise-class Linux Distribution derived from sources freely provided to the public by a prominent North American Enterprise Linux vendor. CentOS conforms fully with the upstream vendors redistribution policy and aims to be 100% binary compatible. (CentOS mainly changes packages to remove upstream vendor branding and artwork.) CentOS is free.

We can download CentOS from Here

Recently Microsoft has added support for Red Hat Enterprise Linux. With this support it is possible to install the Linux Integration Components on CentOS.
First off, we have to set a new virtual machine for CentOS but we must be careful to add a "Legacy Network Adapter"


You remember to connect the our VM at External Virtual Netwok that it should be connected to internet.
Now we can install OS via the downloaded ISO but we have to use only tab-key for now (if you want to perform installation from Remote Desktop) or install it from anaconda (text) 

When the installation end, you must type CRTL + ALT + F2. Insert user (root) and password.

The next step: Install the Linux Integration Services Version 2.1

When installed on a virtual machine that is running a supported Linux operating system, Linux Integration Services for Hyper-V provides the following functionality:

  • Driver support for synthetic devices: Linux Integration Services supports the synthetic network controller and the synthetic storage controller that were developed specifically for Hyper-V.
  • Fastpath Boot Support for Hyper-V: Boot devices now take advantage of the block Virtualization Service Client (VSC) to provide enhanced performance.
  • Timesync: The clock inside the virtual machine will remain synchronized with the clock on the host.
  • Integrated Shutdown: Virtual machines running Linux can be shut down from either Hyper-V Manager or System Center Virtual Machine Manager, using the "Shut Down" command.
  • Symmetric Multi-Processing (SMP) Support: Supported Linux distributions can use up to 4 virtual processors (VP) per virtual machine.
Download Linux Integration Components v2.1 from Microsoft Download site and place the LinuxIC v21.iso file into your VM host server where you can mount the ISO as a CDROM.


1. You will need Development Tools installed to be able to compile the Integration Components. You could do that by running yum:
yum groupinstall "Development Tools"

2. As the root user, mount the CD in the virtual machine by issuing the following commands at a shell prompt:
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom

3. Copy Linux Integration Services to the virtual machine

mkdir /opt/linux_ic_v21_rtm
cp –R /mnt/cdrom/* /opt/linux_ic_v21_rtm

NOTE: If you're using the x64 version of Centos, you have perform an extra step.
yum install adjtimex

4. As the root user, run the following command to compile and install the synthetic drivers

cd /opt/linux_ic_v21_rtm/
(if needfull) ./scripts/build
make install

Synthetic Mouse Support
When accessing the console of a Hyper-V host via Terminal Services or Remote Desktop there is no mouse support available for the consoles of non-paravirtualized ("unenlightened") guests, and accessing the host console directly results in a "captured" mouse experience for guest consoles that is difficult to use. This is true for both Windows and Linux guests, and Microsoft provides an enlightened mouse driver along with disk and network drivers for Windows guests.
Synthetic mouse support is not included in this download. However, synthetic mouse drivers for
use with Linux running on Hyper-V are available. For more information, see the Citrix Project
Satori Web site  at http://go.microsoft.com/fwlink/?LinkId=157779.

How to install mouse integration:

Step 1

Download iso image from xen.org
Mount iso image as the guests cdrom.

# mkdir /opt/inputvsc
Copy install files
# cp -R /media/cdrom/* /opt/inputvsc/

Step 2 – Install inputVSC Module

Change directory into install directory

# cd /opt/inputvsc
Execute Install Script
# ./setup.pl
Verify the error you receive is the expected error by viewing drvinstall.err (the error should occur when 'installing the udev inputvsc rules' - This means that the module will not be loaded automatically)
# cat drvinstall

Step3 – Reboot

Now we can use our CentOS on Hyper-V by Remote Desktop Smile


Nessun commento:

Posta un commento