KVM - The Linux Kernel-Based Virtual Machine
News, Blogs and Resources on the Linux (KVM) Kernel-Based Virtual Machine

Can not start use virtio blk driver even with w2k3

2 replies [Last post]
gateKeeper
User offline. Last seen 4 weeks 9 hours ago. Offline
Joined: Feb 8 2010
Points: 10

Hi,
I can't decide what I'm doing wrong, Does anybody can help me? the problem is with the following:
if I use graphics (for testing purpose only) and virt-manager, then there is no problem to use virtio blk driver with w2k3 installation, so,
I simply modify VM's xml file, replace ide with virtio, replace hda with vda too, and my VM works as expected - new device is found on VM's startup,
virtio driver is installed and all is fine. But if I don't use GUI at all and try to launch VM directly from shell with virtio driver (for non-boot device), then I get no luck in this case - VM doesn't find out a new device. At the same time, network virtio device is working fine, I have no problem with it.
The only possible reason I've found why this happens is that I don't use "-hdX" option in shell, I use "-drive" instead.
So, is "-hdX" option required or not and should I substitute it by "-vdX" in shell?

Usually I start a VM in shell by launching the following command, probably the reason is here:
/usr/libexec/qemu-kvm -name node1 -smp 1 -m 2048 -vnc :28 -localtime -usb -usbdevice tablet -net nic,macaddr=54:52:00:48:7a:28,model=virtio,vlan= -net tap,ifname=tap28,vlan= -pidfile /var/run/kvm/node28.pid -boot c -drive index=0,media=disk,if=ide,file=/dev/mapper/node1 -rtc-td-hack -clock unix -daemonize

Thank you all

Haydn Solomon
User offline. Last seen 1 day 15 hours ago. Offline
Joined: Mar 7 2008
Points: 204
Re: Cannot start virtio block driver

gatekeeper,

The problem is your command line. You need to use if=virtio option with your -drive argument.

gateKeeper
User offline. Last seen 4 weeks 9 hours ago. Offline
Joined: Feb 8 2010
Points: 10
Haydn,thank you for your

Haydn,
thank you for your attention, but I used if=virtio of course in my command line. I meant, with that option, passed to qemu-kvm I have no luck - windows doesn't find a new device (as it's happening when I use virt-manager for launching VM and virtio for a new drive). So, I still can't find the cause of the issue - what I'm doing wrong?? :::
if I use virt-manager - all works fine
if I pass the same options for qemu-kvm and launch VM in command line - then no luck

So, what is the difference between usage of virt-manager and qemu-kvm? I mean, probably this difference is the cause of my problem? I don't know, maybe virt-manager launches some specific scripts related to virtio blk or loads some kernel modules to support it??

Sorry, missed some information:
OS:
CentOS 5.4
2.6.18-164.11.1.el5
x86_64

kvm-83-105.el5_4.13
kvm-tools-83-105.el5_4.13
kvm-qemu-img-83-105.el5_4.13
kmod-kvm-83-105.el5_4.13

===================
ps: Tried today the same with Ubuntu 9.10. No success again with KVM: if I pass virtio storage to kvm, w2k3 doesn't find out new device and there is no new drives in disk management tool.

Post new comment

The content of this field is kept private and will not be shown publicly.