[libvirt] libvirt generates bad kvm command line

Harald Dunkel harald.dunkel at aixigo.de
Mon Nov 2 14:46:35 UTC 2009


Hi folks,

using this command sequence

<code>
export VIRSH_DEFAULT_CONNECT_URI=qemu:///system
name=Testing
kvmdir=/export/hdunkel/kvm
hda=$kvmdir/$name/hda.qcow2
iso=/export/isos/debian-testing-amd64-netinst.iso

mkdir -p $kvmdir/$name
qemu-img create -f qcow2 $hda 32G
virt-install --connect ${VIRSH_DEFAULT_CONNECT_URI} \
-n $name -r 1024 -vcpus=1 -f $hda -c $iso \
--network=bridge:br0 --vnc --accelerate -v \
--os-type=linux --os-variant=debianSqueeze
</code>


I get the famous "cdrom boot failure code 0003" error.
The log file shows that libvirt generated this kvm command
line:

<code>
LC_ALL=C \
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin \
HOME=/root USER=root LOGNAME=root QEMU_AUDIO_DRV=none \
/usr/bin/kvm -S -M pc -m 1024 -smp 1 -name Testing \
-uuid 3a6b6b3f-84e6-6a21-a51a-2c61cf3914e2 \
-monitor unix:/var/lib/libvirt/qemu/Testing.monitor,server,nowait \
-no-reboot -boot d \
-drive file=/export/hdunkel/kvm/Testing/hda.qcow2,if=virtio,index=0
-drive file=/export/isos/debian-testing-amd64-netinst.iso,if=virtio,media=cdrom,index=1 \
-net nic,macaddr=52:54:00:3e:0b:26,vlan=0,model=virtio,name=virtio.0 \
-net tap,fd=18,vlan=0,name=tap.0 -serial pty -parallel none \
-usb -usbdevice tablet -vnc 127.0.0.1:0 -k en-us -vga cirrus
</code>

If I try this on the command line, then there is the same
0003 error.

If I omit the if=virtio for the cdrom drive, then it boots
the cd without 0003.


Can you reproduce this? Is this a problem with libvirt or with
the kvm module?


Kernel is 2.6.31.5, i.e. kvm 0.88. libvirt is 0.7.2
Any helpful comments would be highly appreciated.


Harri




More information about the libvir-list mailing list