Wednesday, March 10, 2010

IT From All Angles

Minimize
Dec 6

Written by: Matthew.Mattoon
Sunday, December 06, 2009 

As I posted previously the new version of the linux kernel (2.6.32) includes support for Hyper-V synthetic devices.  Now since this kernel version has not made it into the distributions I will be doing some testing on this and documenting processes to get this into different distributions.  These instructions are not perfect USE AT YOUR OWN RISK!

This article will document the process for getting synthetic devices on Ubuntu Karmic Koala, other Ubuntu's and Debians will be similar but different due to the change from Grub to Grub2.  In my environments I will be using the server platform and amd64 architecture.

Now go ahead and install a virtual machine with Ubuntu 9.10 Server.  My VM was a single processor, 1GB of RAM, 40GB VHD, and both an emulated and synthetic NIC (each with a randomly generated static MAC - by SCVMM).  Additionally I will assume everything is done as root, this will require that you get a root prompt authenticated as yourself (sudo -s) or that you set a password to the root account (sudo passwd root).

Download and Install the Kernel Image

# wget http://us.archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-image-2.6.32-5-server_2.6.32-5.6_amd64.deb

# dpkg -i linux-image-2.6.32-5-server_2.6.32-5.6_amd64.deb

Ensure the Default Kernel is Correct (may not be applicable)

# nano /boot/grub/grub.cfg

Update the Network Configuration

# nano /etc/network/interfaces

auto seth0 iface

seth0 inet dhcp

Configure Modules to Load on Boot

# nano /etc/initramfs-tool/modules

hv_vmbus

hv_netvsc

#hv_blkvsc

#hv_storvsc

# update-initramfs -u

 

Due to the errors I have seen in /var/log/messages and /var/log/dmesg I am recommending not enabling the hv_storvsc or the hv_blkvsc module at this time.  Though feel free to at your own risk (simply remove the comments from the hv_blkvsc and hv_storvsc from the /etc/initramfs-tools/modules file and then update the initrd file.

[    3.387061] STORVSC: WARNING! cmd 0x25 scsi status 0x2 srb status 0x84
[    3.387066]
[    3.387069] STORVSC: WARNING! storvsc pkt ffff88002fe74700 autosense data valid - len 18
[    3.387070]
[    3.387079] blkvsc: Sense Key : Not Ready [current]
[    3.387090] blkvsc: Add. Sense: Medium not present
[    3.474061] STORVSC: WARNING! cmd 0x25 scsi status 0x2 srb status 0x84
[    3.474066]
[    3.474069] STORVSC: WARNING! storvsc pkt ffff88002fe75780 autosense data valid - len 18
[    3.474071]
[    3.474084] blkvsc: Sense Key : Not Ready [current]
[    3.474098] blkvsc: Add. Sense: Medium not present
[    3.513013] STORVSC: WARNING! cmd 0x25 scsi status 0x2 srb status 0x84
[    3.513018]
[    3.513021] STORVSC: WARNING! storvsc pkt ffff88002fe74180 autosense data valid - len 18
[    3.513022]
[    3.513032] blkvsc: Sense Key : Not Ready [current]
[    3.513042] blkvsc: Add. Sense: Medium not present
[    3.625425] STORVSC: WARNING! cmd 0x25 scsi status 0x2 srb status 0x84
[    3.625427]
[    3.625429] STORVSC: WARNING! storvsc pkt ffff88002fe76540 autosense data valid - len 18

Tags:

10 comment(s) so far...

Re: Hyper-V Guests: Using Linux Kernel 2.6.32 for Hyper-V Synthetic Devices (Ubuntu 9.10 Server)

Hi
on kernel 2.6.32-6-server x86_64 no errors like you described !
kernel from Ubuntu 10.04 Lucid repository

By Vladimir Ganzha on   Monday, December 07, 2009

Re: Hyper-V Guests: Using Linux Kernel 2.6.32 for Hyper-V Synthetic Devices (Ubuntu 9.10 Server)

blkvsc: Add. Sense: Medium not present

maybe scsi controller present, and no scsi disk attached to it...

By Vladimir Ganzha on   Monday, December 07, 2009

Re: Hyper-V Guests: Using Linux Kernel 2.6.32 for Hyper-V Synthetic Devices (Ubuntu 9.10 Server)

Test: # dd if=/dev/zero of=/test.file bs=4M count=1000 conv=notrunc
Result: 10.6 Sec 393 Mb/sec

By Vladimir Ganzha on   Tuesday, December 08, 2009

Re: Hyper-V Guests: Using Linux Kernel 2.6.32 for Hyper-V Synthetic Devices (Ubuntu 9.10 Server)

Test on kernel 2.6.32.7-10
скопировано 4194304000 байт (4,2 GB), 7,32151 c, 573 MB/c

p.s. One annoying thing that mouse scroll does not work...
Somebody has solved this problem?
Somebody reads this blog and comments
Author you where?

By Vladimir Ganzha on   Friday, December 11, 2009

Re: Hyper-V Guests: Using Linux Kernel 2.6.32 for Hyper-V Synthetic Devices (Ubuntu 9.10 Server)

Any updates on this?

Does kernel 2.6.32-7 or 2.6.32-8 fix these problems? (it looks like 2.6.32-6 is no longer available anyways)

Also, is it better to use the -server kernel or the -virtual kernel?

By John Klimek on   Monday, December 14, 2009

Re: Hyper-V Guests: Using Linux Kernel 2.6.32 for Hyper-V Synthetic Devices (Ubuntu 9.10 Server)

http://us.archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-image-2.6.32-13-server_2.6.32-13.18_amd64.deb

2.6.32-13 worked for me, including hv_blkvsc and hv_storvsc. This was on a base Ubunut server build with no updates.

By James Kehr on   Monday, February 15, 2010

Re: Hyper-V Guests: Using Linux Kernel 2.6.32 for Hyper-V Synthetic Devices (Ubuntu 9.10 Server)

I downloaded 2.6.32 and successfully update the kernel on my Ubuntu installation on hyper-v (Windows 2008 Enterprise Server). However, when I try to install the IC v2, I keep getting errors about difference in argument INIT_WORK. I see someone commented about this in an earlier post, can you please provide more detail on how to get around this? Sorry, newbie to Linux. Your help is greatly apprecaited.

By Jeremy Yeung on   Friday, February 26, 2010

Re: Hyper-V Guests: Using Linux Kernel 2.6.32 for Hyper-V Synthetic Devices (Ubuntu 9.10 Server)

I downloaded 2.6.32 and successfully update the kernel on my Ubuntu installation on hyper-v (Windows 2008 Enterprise Server). However, when I try to install the IC v2, I keep getting errors about difference in argument INIT_WORK. I see someone commented about this in an earlier post, can you please provide more detail on how to get around this? Sorry, newbie to Linux. Your help is greatly apprecaited.

By Jeremy Yeung on   Thursday, March 04, 2010

Re: Hyper-V Guests: Using Linux Kernel 2.6.32 for Hyper-V Synthetic Devices (Ubuntu 9.10 Server)

Jeremy,

The Linux Kernel 2.6.32 includes the Linux IC v2 in the Staging Tree. So if you followed my instructions above and installed my pre-compiled kernel then you just need to load the modules to get them (which the instructions did).

Do not try to install the IC v2 on top of the 2.6.32 kernel, as the functionality is already there...

To confirm that you have the modules loaded:

lsmod | grep hv_*

-matt

By Matthew Mattoon on   Thursday, March 04, 2010

Re: Hyper-V Guests: Using Linux Kernel 2.6.32 for Hyper-V Synthetic Devices (Ubuntu 9.10 Server)

Jeremy,

Try these other articles I have written...

blog.allanglesit.com/Blog/tabid/66/EntryId/46/Hyper-V-Guests-Debian-and-Ubuntu-Kernel-Install-Image.aspx

blog.allanglesit.com/Blog/tabid/66/EntryId/43/Hyper-V-Guests-Compile-Linux-2-6-32-on-Ubuntu.aspx

They should help you get a more stable environment then this article.

By Matthew Mattoon on   Thursday, March 04, 2010

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment   Cancel 

Search IT From All Angles Blog

Minimize