LKBEN10901: How to Compile Linux 2.6.32 Kernel under Debian 5 to Support Hyper-V


You would like virtualisation support for your linux system with hyperV




Install Debian 5 under Hyper-V with an old NIC in the Hyper-V Settings
After installation has finishe, log in as root and follow these steps...
apt-get install build-essential ncurses-dev kernel-package fakeroot zlib1g-dev
cd /usr/src
wget -c
bzip2 -d linux-
tar xf linux-
cd linux-
make menuconfig
- Select “Device Drivers”
- Select “Staging Drivers” (with a “*”)
- Deselect “Exclude Staging drivers from being build”
- Select “Microsoft Hyper-V client driver” (with a “M”)
- The Microsoft drivers should automaticly marked with an “M”
=> Exit the “menuconfig”
Edit “.Config”
=> Save it
make-kpkg clean
fakeroot make-kpkg --initrd --revision=hv.custom.1.0 kernel_image
cd ../
dpkg -i linux-image-
sed -i 's/eth/seth/g' /etc/network/interfaces
Edit “/etc/initramfs-tools/modules”
- Add “hv_vmbus”
- Add “hv_blkvscb”
- Add “hv_netvsc”
- Add “hv_storvsc“
=> Save it
update-initramfs –u –k
Edit “/boot/grub/menu.lst”
- Search for the new kernel entries and replace the boot device from “root=/dev/hda1” to “root=/dev/sda1”
- Think about: there are two sections for the new kernel (singleusermode)!
=> Save it
Note the MAC-Adress of your NIC
init 0
Replace the Hyper-V “old network adapter” against the Hyper-V “
standard NIC” an set the MAC-Adress to the noticed one of your old NIC

Should be all done!


The information provided in this document is intended for your information only. Lubby makes no claims to the validity of this information. Use of this information is at own risk!

About the Author

Author: Wim Peeters - Keskon GmbH & Co. KG

Wim Peeters is electronics engineer with an additional master in IT and over 30 years of experience, including time spent in support, development, consulting, training and database administration. Wim has worked with SQL Server since version 6.5. He has developed in C/C++, Java and C# on Windows and Linux. He writes knowledge base articles to solve IT problems and publishes them on the Lubby Knowledge Platform.