locked
Simplified instructions for installing the Linux Integration Components into Hyper-V virtual machines RRS feed

  • General discussion

  • Recently I have been seeing and getting many questions regarding the Linux Integration Components for Hyper-V virtual machines.

    Through a bit of questioning, I have discovered a couple things, and distinct levels to running Linux VMs on Hyper-V.

    Note: Since SuSE 10 SP2 is the ‘supported’ distribution, any instructions will be specific to it.

    I am assuming that you have obtained the SuSE media and performed a ‘vanilla’ installation into a new Hyper-V virtual machine.

    WARNING:  Level One can lead to Level Two.  And, always perform a backup / export / snapshot before proceeding.  All usual disclaimers apply.

    Level One – the beginning

    This is a simple installation of just the Linux operating system within a Hyper-V virtual machine.  The only caveat is that the VM needs a Legacy Network adapter for network connectivity.

    In this case you will end up with a working Linux VM.  It should auto detect an install an SMB (multi-processor) kernel and it should just work.  The performance is not the best that it could be, but it should run.

    Level Two – the path to enlightenment

    This is the simple installation from above, with the addition of the Hyper-V Linux drivers.

    This one is a bit more involved.  However, the end result is that you are running the synthetic Network Adapter, and the optimized storage, and display (and other) drivers.

    This optimizes drivers, but advanced integration features such as shutdown from the host (or SCVMM) is currently not available.

    To obtain driver enlightenment:

    a)      Obtain the LinuxIC.iso 

    Hyper-V v1: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=ab7f4983-93c5-4a70-8c79-0642f0d59ec2#tm

    Hyper-V R2: http://www.microsoft.com/downloads/details.aspx?familyid=C299D675-BB9F-41CF-B5EB-74D0595CCC5C&displaylang=en

    b)      obtain the inputvsc.iso for the mouse driver

    http://www.xen.org/download/satori.html

    c)       add the kernel-source and gcc-c++ packages

    YaST can be used for this, either GUI or command line

    Note: if an ISO was previously attached, you may need to detach, pause, then attach the desired ISO for SuSE auto-mount to pick up the change. 

    If that does not work, make a mount point ( mkdir /media/CDROM ) and mount /dev/hdc /media/CDROM

    d)      Install the linuxic drivers

    a.       Open a Terminal

    b.      attach the downloaded LinuxIC.iso through the Hyper-V manager

    c.       Create a folder and copy the contents to the folder

    d.      mkdir /tmp/linuxic

    e.      cp –rp /media/CDROM/* /tmp/linuxic

    f.        cd /tmp/linuxic

    g.       ./setup.pl drivers

    e)      Install the mouse driver

    a.       Attach the inputvsc.iso through the Hyper-V manager

    b.      Create a folder and copy the contents.

    c.       mkdir /tmp/inputvsc

    d.      cp –rp /media/CDROM/* /tmp/inputvsc

    Note: you may need to mount again: mount /dev/hdc /media/CDROM

    e.      cd /tmp/inputvsc

    f.        ./setup.pl

    f)       Power down the VM, remove the Legacy Network Adapter, add a Synthetic Network adapter, power on the VM (you could also do a shutdown now –hP )

    g)      Using YaST, configure the newly installed synthetic network adapter.


    Brian Ehlert (hopefully you have found this useful)
    Thursday, May 21, 2009 9:50 PM
    Moderator

All replies

  • Hi BrianEh,

     

    Thanks for your sharing!

     

     

    Best regards,

    Vincent Hu

     

    Friday, May 22, 2009 4:42 AM
    Moderator
  • Hi Brian,

    Thanks for the instructions to install Linuc IC into Hyper-V.

    1)I followed instructions to install LlinuxIC drivers [step (d) ] on VM with SLES 10 Sp2-X64, after reboot, the system [AMD Processor with Hyper-V server 2008-x64 installed] failed to recognize the Sysnthetic Network Adapter [verified ifconfig -a and lspci]. 

    2) one more thing, when I tried to add Broadcom adapter as sysnthetic Network adapter in Vm with Windows, it worked but same step failed on SLES.

    The sysnthetic netowrk drivers mentioned in step 1 are not Brodcom adapters.

    Thanks,
    Mukesh

    Thursday, July 16, 2009 11:10 AM
  • There is information at the Novell sight about the requirement to delete the origional network interface, and to go through using YaST to configure the new NIC after installation.

    In YaST you will see multiple NICs - you will need to configure the proper virtual NIC.

    YaST can be executed in both a GUI (Xserver) and non-GUI (Commandline) environment.
    Brian Ehlert (hopefully you have found this useful)
    Thursday, July 16, 2009 3:52 PM
    Moderator
  • Note: Since SuSE 10 SP2 is the ‘supported’ distribution, any instructions will be specific to it.


    I have an evaluation disc for SuSE Enterprise Server 11.  I suppose it must be supported as well, if v10 is?

    Is there an up-to-date list of Linux flavours that can be enlightened on Hyper-V?

    (Hopefully this evaluation will update, and the only difference in using this will be that I do not get the support that you have to pay for)
    Sunday, September 6, 2009 2:34 AM
  • This optimizes drivers, but advanced integration features such as shutdown from the host (or SCVMM) is currently not available.

    Does this mean that the VM will have to be manually shut down from within the VM, every time that the server is rebooted?
    Sunday, September 6, 2009 2:36 AM
  • Does this mean that the VM will have to be manually shut down from within the VM, every time that the server is rebooted?

    That is always the case with the Linux drivers.

    They do not support shutdown from the host, they obly provide optimized performance.

    At the time I wrote the article v10 SP2 was the official supported distro, that does not mean that the drivers will not work on other releases.
    It becomes a question of finger pointing if there is an issue that is traced directly to the drivers.
    Brian Ehlert (hopefully you have found this useful)
    Tuesday, September 8, 2009 2:56 PM
    Moderator
  • I got an error in drvinstall.err when I am trying it out on my OpenSuSE 11:
    /opt/inputvsc/dist/hid/hid-input.c:95: error: redefinition of "input_get_drvdata"

    Could anyone helps?

    uname -r:
    2.6.27.7-9-pae
    Thursday, September 10, 2009 9:09 PM
  • I managed to get mouse working on OpenSuSe 11.1 x64 under hyperV.

    I used the latest version of the additions.

    You don't actually require the "hid" driver as one is already included in this kernel build.
    confirm this using "modprobe -l hid"

    I had to copy osd.c from the /opt/linux_ic_v2/drivers/dist/vmbus directory

    A litle bit of hacking is required on the Makefile now that it does not use hid.symvers
    Once you have built a inputvsc.ko follow the steps in the "install" section of the main Makefile to finish installation.

    udevcontrol does not exist here so use "udevadm control --reload-rules"

    Hope this helps


    Tuesday, September 15, 2009 4:16 PM
  • Folowing up the former instructions i modified the next files an it compiled and worked for me wit OpenSUSE 11.1;

    copy osd.c from LinuxICV2 vmbus to inputvsc vmbus directory

    Makefile in dist directory

    OPEN_SUBDIRS := inputvsc   # hid inputvsc

    .PHONY: install
    install: cleanpublic public
     @echo -n 'Installing inputvsc driver...' 
    # install -m0755 ./hid/hid.ko $(INSTALL_DIR)
     install -m0755 ./inputvsc/inputvsc.ko $(INSTALL_DIR)
     @echo 'done.'
     @echo -n 'Updating module dependencies. This may take a while...' 
     depmod
     @echo 'done.'
     # install udev stuff
     @echo -n 'Installing inputvsc udev rules ...'  
     install -m0644 ./tools/udev/60-inputvsc.rules $(UDEV_RULESD_DIR)  
    # udevcontrol reload_rules
     udevadm control --reload-rules

     @echo 'done.'
     # update xorg.conf file to use vmbus mouse
     @echo 'Updating xorg.conf file...'
     chmod 755 ./tools/scripts/updatexorg.pl
     ./tools/scripts/updatexorg.pl || true
     # install the inputvsc startup script
     @echo 'Installing inputvsc startup script...'    
     install -m0755 ./tools/init.d/inputvsc $(INITD_DIR)
     chkconfig --add inputvsc
     $(INITD_DIR)/inputvsc start

    Makefile in inputsvc dir

    all: default
    default:
     # so modpost does not complain about undefined vmbus symbols
     # and we dont get version tainted warning
     #cp -f $(PWD)/../hid/Module*.symvers $(PWD)/hid.symvers
     #cp -f $(VMBUSDIR)/Module*.symvers $(PWD)/vmbus.symvers
     #cat $(PWD)/hid.symvers $(PWD)/vmbus.symvers > $(PWD)/Modules.symvers
     #ln -s $(PWD)/Modules.symvers $(PWD)/Module.symvers
     @echo -n 'Building $(MODULE_NAME) driver...'
     $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules 1>&2
     @echo 'done.'


    The only thing left is that my mouse is not folowing the small dot, but goes faster. It seems the mouse feels more dpi then i move with the fysical mouse.

    THX micksx i have searched for weeks to let the mouse work and you gave me the tip ;-))

    Wim

    Friday, September 18, 2009 12:02 PM
  • I modified the make files as instructed by WimNac and now my xorg.conf broke after doing "setup.pl inputdrivers" and seth1 installed by the ICs failed to initialize. Not sure what I did wrong... The system boots to command line instead of Gnome :( Anyone can help me with that?

    Oh also I'm using Hyper-V R2.

    At least I can get back to Gnome by doing "sudo mv xorg.conf.orig xorg.conf" in /etc/x11

    Adam
    Saturday, September 19, 2009 4:12 PM
  • Hi Adam,

    I have done a clean install of OpenSuse11.1 and yes after the making of the X11 does not start. In the boot the video mode is set to 0x410 a unknown value. After logging in to the commandline you can indeed move your old file back.

    You also can run sax2 and set the video to the desired settings. After that you have to change the boot video mode with yast.

    I am investigating what is hapening. In the dist tools script directory is a script that is modifying and linking the xorg.conf file. The old file is preserved. It has also something to do with the existense of a file /etc/SuSE-release file. This file is available in a clean install of OpenSUSE 11.1, but on my other system that is an updated system from OpenSUSE 11.0 not.

    After i runned sax and updated the boot video mode the mouse was working in Hyper-v logged in with terminalserver on the Hyper-V host.

    To be contimued hpfully also for my problem with the mouse sensitivity.

    I have als installed Centos53 and that system was running the integration component and inputsvc smoothly. Als CentOS is having no problems with the mouse sensitivity. The mouse here follows the dot from the Hyper-V interface.

    Wim

    You can also use this contents for the xorg.conf.vmbus file. The aligning problem with the mouse is also solved then;

    # -- Xorg configuration updated to add new vmbus input mouse device --
    # Xorg configuration created by pyxf86config

    Section "ServerLayout"
     Identifier     "Default Layout"
     Screen      0  "Screen0" 0 0
     InputDevice    "Keyboard0" "CoreKeyboard"
     InputDevice "vmbmouse" "AlwaysCore"
    EndSection

    Section "ServerFlags"
     Option     "AllowMouseOpenFail" "yes"
    EndSection


    Section "InputDevice"
      Driver "evdev"
      Identifier "vmbmouse"
      Option "Buttons" "5"
      Option "Name" "Microsoft Vmbus HID-compliant Mouse"
      Option "Protocol" "explorerps/2"
    EndSection

    Section "InputDevice"
     Identifier  "Keyboard0"
     Driver      "kbd"
     Option     "XkbModel" "pc105"
     Option     "XkbLayout" "us"
    EndSection

    Section "Device"
     Identifier  "Videocard0"
     Driver      "vesa"
    EndSection

    Section "Screen"
     Identifier "Screen0"
     Device     "Videocard0"
     DefaultDepth     24
     SubSection "Display"
      Viewport   0 0
      Depth     24
     EndSubSection
    EndSection

    Saturday, September 19, 2009 6:59 PM
  • Wow you are amazing! I had figured out the video mode issue after examining the boot process a bit more, but now I will try investigating on the mouse sensitivity issue too.

    I had also looked at the script that edits xorg and it's also building and installing a RPM called xorg-x11-drv-evdev. On my system the package wouldn't get installed because running "rpm -q xorg-x11-drv-evdev-1.1.5" reported no installed package. I installed it manually and then everything worked.

    Thanks, Adam
    Sunday, September 20, 2009 3:02 AM
  • Great article including the replies and just in time for a test project I'll describe momentarily. I downloaded the Linux ICs which includes a document file "Linux ICs for Hyper-V.rtf". This document indicates we should install the XEN Virtual Machine Host Server. Is this not necessary? Also, I am most interested if the mouse will work when using Remote Desktop Connection to the Host Hyper-V Server while in the Linux VM. I mostly installed Linux on Hyper-V via RDP using only the keyboard, but ultimately had to go directly to the server console to finish the configuration so far.

    I am interested because I am going to try to test moving Apache Tomcat and MySQL from an XP box to the following operating systems running on Hyper-V.
    1. Windows Server 2008 Std Ed
    2. Red Hat Enterprise Linux 5
    3. SLES 11
    4. openSUSE 11.1

    I also hope to have time to install all four operating systems on a Red Hat and/or Novell Suse Enterprise Server running XEN with the same four OS's. I'll then test the performance of different variations, but will ultimately use just one OS without virtualization.

    I have currently installed all four OS's on Hyper -V running on Windows Server 2008 Std Ed Evaluation. The network is working for all three linux's with the Legacy Network Adaptor. However, I did not install XEN nor have I installed the kernel-source and gcc-c++ packages. At this point I copied the virtual disks of all four vm's for rollback. I have also installed Red Hat, Novell Suse, and openSUSE (with XEN), as multiboot with Windows 2008 Server for further testing. Since I have rollback capability, I will be working on this while waiting for any replies.

    Thanks.
    Tuesday, October 6, 2009 4:34 PM
  • Check the revision of Hyper-V you are running and the Linux ICs.

    From your article description you have the v1 Linux ICs - if you are running Hyper-V R2 you need to get the R2 Linux ICs.

    R2 no longer contains the shim for the pv kernel.

    FYI for the V1 Linux ICs - the full Xen stack is NOT required for everyting to work properly, however it is checked by the installation script.  That is very specific to the shim kernel and using kernel-xen (the xen paravirtualized kernel).

    There is much to describe, but I will leave it at this.


    Brian Ehlert (hopefully you have found this useful)
    Tuesday, October 6, 2009 4:45 PM
    Moderator
  • Hi Adam,

    I have done a clean install of OpenSuse11.1 and yes after the making of the X11 does not start. In the boot the video mode is set to 0x410 a unknown value. After logging in to the commandline you can indeed move your old file back.

    Wim,

    Let me start by saying, you are incredible! I know I am a newb and all but with that being said, I was hoping you might take the time to post steps to install Microsoft's new IC R2 Integrated Components into a freshly installed version of OPENSuse 11.2 using Linux 2.6.31.5-0.1-desktop, it errors out when I follow Microsoft's instructions. I did get couragous (after a vhd backup lol) and mess with the makefiles and was able to change the errors and even make it not boot at all, but never did get it to work. If I can't get them to install, I can't use the other mouse driver that Cirtix came up with, which is my main reaosn for installing IC in the first place...

    (BTW The legacy network driver works like a champ)

    Can you help?

    Here are errors similar to the ones I got. (These differ in the fact that I copied them from someone else's post. The numbers after osd.c:###,## are the only differences) The rest of the error file is identical.

    /opt/linux_ic/drivers/dist/vmbus/osd.c:460:41: error: macro "INIT_WORK" passed 3 arguments, but takes just 2
    /opt/linux_ic/drivers/dist/vmbus/osd.c: In function ‘WorkQueueQueueWorkItem’:
    /opt/linux_ic/drivers/dist/vmbus/osd.c:460: error: ‘INIT_WORK’ undeclared (first use in this function)
    /opt/linux_ic/drivers/dist/vmbus/osd.c:460: error: (Each undeclared identifier is reported only once
    /opt/linux_ic/drivers/dist/vmbus/osd.c:460: error: for each function it appears in.)
    /opt/linux_ic/drivers/dist/vmbus/osd.c:476:41: error: macro "INIT_WORK" passed 3 arguments, but takes just 2
    /opt/linux_ic/drivers/dist/vmbus/osd.c: In function ‘QueueWorkItem’:
    /opt/linux_ic/drivers/dist/vmbus/osd.c:476: error: ‘INIT_WORK’ undeclared (first use in this function)
    make[5]: *** [/opt/linux_ic/drivers/dist/vmbus/osd.o] Error 1
    make[4]: *** [_module_/opt/linux_ic/drivers/dist/vmbus] Error 2
    make[3]: *** [sub-make] Error 2
    make[2]: *** [all] Error 2
    make[1]: *** [default] Error 2
    make: *** [public] Error 2



    Thanks in advance
    Anthony
    (Newly converted Linux nut, previous Microsoft-Zombie)

    Anthony
    Wednesday, November 18, 2009 10:54 PM
  • Why  Xen Virtual Machine Host Server installation is not needed?
    Thursday, November 26, 2009 1:42 PM
  • They are not 'necessary' and only provide performance gains in very, very few cases.

    Also, the instructions tended to cause great confusion as it actually required the installation of the entire Xen virtualization stack (for the install script to work) not just kernel-xen.

    The new ICs that are included with the Linux 2.6.32 kernel no longer require this as well.  So, for forward compatibility it is better not to install these components into a Hyper-V VM in the first place.
    Brian Ehlert (hopefully you have found this useful)
    Thursday, January 7, 2010 4:20 PM
    Moderator