Description of problem: virsh command 'domxml-from-native qemu-argv' can not parse the virtio block device correctly. Version-Release number of selected component (if applicable): libvirt upstream How reproducible: cat /tmp/guest.args /usr/local/bin/qemu-system-x86_64 -machine accel=kvm -name test -machine pc-0.15,accel=kvm,usb=off -m 512 -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -nographic -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/test.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -drive file=/ovirt-storage/rhel6.img,if=none,id=drive-virtio-disk0,format=raw,index=0 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 virsh domxml-from-native qemu-argv /tmp/guest.args <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>test</name> <uuid>0a0baaf5-2a21-404c-99c4-378b3cf61da7</uuid> <memory unit='KiB'>524288</memory> <currentMemory unit='KiB'>524288</currentMemory> <vcpu placement='static'>2</vcpu> <os> <type arch='x86_64' machine='pc-0.15'>hvm</type> </os> <features> <acpi/> <pae/> </features> <cpu> <topology sockets='2' cores='1' threads='1'/> </cpu> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/local/bin/qemu-system-x86_64</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/ovirt-storage/rhel6.img'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='ide' index='0'/> <controller type='usb' index='0'/> <controller type='pci' index='0' model='pci-root'/> <memballoon model='virtio'/> </devices> <qemu:commandline> <qemu:arg value='-realtime'/> <qemu:arg value='mlock=off'/> <qemu:arg value='-no-user-config'/> <qemu:arg value='-nodefaults'/> <qemu:arg value='-device'/> <qemu:arg value='virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1'/> <qemu:arg value='-device'/> <qemu:arg value='virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6'/> </qemu:commandline> </domain> cat /tmp/guest.args.1 /usr/bin/qemu-kvm -machine pc-0.14,accel=kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -drive file=/ovirt-storage/rhel6.img,if=virtio,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 /usr/bin/qemu-kvm -machine pc-0.14,accel=kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -drive file=/ovirt-storage/rhel6.img,if=virtio,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 qemu-kvm: -drive file=/ovirt-storage/rhel6.img,if=virtio,id=drive-virtio-disk0,format=qcow2: Property 'virtio-blk-pci.drive' can't take value 'drive-virtio-disk0', it's in use QEMU report error. But, domxml-from-native work normally: virsh domxml-from-native qemu-argv /tmp/guest.args.1 <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>unnamed</name> <uuid>f752995a-4946-4beb-a9f1-951d055a8884</uuid> <memory unit='KiB'>1048576</memory> <currentMemory unit='KiB'>1048576</currentMemory> <vcpu placement='static'>1</vcpu> <os> <type arch='x86_64' machine='pc-0.14'>hvm</type> </os> <features> <acpi/> <pae/> </features> <cpu> <topology sockets='1' cores='1' threads='1'/> </cpu> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/ovirt-storage/rhel6.img'/> <target dev='vda' bus='virtio'/> </disk> <controller type='usb' index='0'/> <controller type='pci' index='0' model='pci-root'/> <input type='mouse' bus='ps2'/> <graphics type='sdl'/> <video> <model type='cirrus' vram='9216' heads='1'/> </video> <memballoon model='virtio'/> </devices> <qemu:commandline> <qemu:arg value='-device'/> <qemu:arg value='virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1'/> </qemu:commandline> </domain> Actual results: For /tmp/guest.args, the bus of the disk parsed as IDE. For /tmp/guest.args.1, it parse the disk as virtio block. Expected results: For /tmp/guest.args, the bus of the disk should be parsed as a virtio disk. For /tmp/guest.args.1, it should report error.
Well, this is filed against libvirt upstream, where it makes little sense to mark bugs as urgent. If you want to have the bug fixed early, participating in libvirt's development mailing list is the best way to go. And given what the nature of the bug is, the best option would be to actually try to fix the bug yourself and send the patch to the mailing list since domxml-from-native is not the most important part of libvirt API and thus unlikely to get enough attention to be fixed urgently.
*** This bug has been marked as a duplicate of bug 844845 ***