21.03.2013

Hyper-V: Compile Linux Kernel with Microsoft device drivers

After knowing, that running a linux inside Hyper-V is only working with the "legacy" network adapter (look here), i was trying to build a kernel with the drivers (Microsoft has added the drivers into the Linux kernel versions >2.6.32).
There is one nice tutorial out there:
  • IT FROM ALL ANGLES: Hyper-V Guests: Compile Linux Kernel 2.6.32 on Debian 
But the menus of menuconfig have changed with kernel version 3.0. Microsofts Hyper-V kernel modules are no longer located inside the staging section. They can be found here:
Device Drivers --> Network device support -->
Device Drivers -->  Microsoft Hyper-V guest support -->
Device Drivers --> HID Support --> Special HID Drivers -->


All other steps work like described in IT FROM ALL ANGLES: Hyper-V Guests: Compile Linux Kernel 2.6.32 on Debian.
Microsoft offers a ISO-image for installing the kernel modules for some special kernel version for this linux distributions:
  • Red Hat Enterprise Linux 5.7, 5.8, 6.0-6.3 x86 and x64
  • CentOS 5.7, 5.8, 6.0-6.3 x86 and x64

The ISO-image can be downloaded from this location.

Note: If you try to build the kernel in you virtual machine, you need at least 6GB in /usr/src for compiling your kernel...

1 Kommentar:

  1. I suggest instead of compiling a new kernel just do a distro upgrade:

    If you are running Debian 6.0 (Squeeze), You can upgrade to 7.0 (Wheezy), it’s so simple:
    just answer Y every time.
    apt-get update
    apt-get upgrade
    nano /etc/apt/sources.list replace every squeeze with wheezy, ctrl+x, Y,enter.
    apt-get update
    apt-get upgrade
    apt-get dist-upgrade
    reboot
    your new kernel will be selected, login, then you can “lsmod | grep hv” and see the hyper-v modules loaded (hv_vmbus, hv_netvsc, hv_blkvsc, hv_storvsc), connect your non-legacy network adapter and do “ip show link” then you’ll see it (you can be sure by checking the MAC).
    But why stay there?, now you can go to Debian 8.2 (jessie) by following the same instructions but this time use “jessie” on your sourcelist.
    I wasn’t able to go directly from 6 to 8.
    If you have trouble with “public key is not available” then follow instructions from here: http://stackoverflow.com/questions/1139127/how-to-trust-a-apt-repository-debian-apt-get-update-error-public-key-is-not-av
    Enjoy.

    AntwortenLöschen