[libvirt] [PATCH 2/3] qemu: improve device flag parsing

Eric Blake eblake at redhat.com
Tue Jan 18 15:16:30 UTC 2011


On 01/17/2011 10:39 PM, Wen Congyang wrote:
>> +    cmd = virCommandNewArgList(qemu,
>> +                               "-device", "pci-assign,?",
>> +                               NULL);
> 
> The qemu that I used does not support '-device pci-assign,?'...
> So, I can not start the guest with this patch.
> 
> The qemu is cloned from here:
> http://git.qemu.org/git/qemu.git

What do the following commands produce (assuming that both qemu and
qemu-kvm on your PATH are the binaries that you are testing with)?

qemu -version
qemu-kvm -version
qemu -device '?'
echo $?
qemu -device 'pci-assign,?'
echo $?
qemu -device '?' -device 'pci-assign,?'
echo $?
qemu-kvm -device '?'
echo $?
qemu-kvm -device 'pci-assign,?'
echo $?
qemu-kvm -device '?' -device 'pci-assign,?'
echo $?

Depending on those results, I will probably be able to come up with a
followup patch that helps you run again (it may just be a matter of
ignoring non-zero exit status, or of adding the extra "-device","?",
arguments in order to ensure that qemu doesn't error out on unknown
devices).

For example, in my case, I know that with the qemu 0.13.0 package in
Fedora 14, 'qemu -device pci-assign,?' fails but 'qemu-kvm -device
pci-assign,?' succeeds; and for both binaries, '$binary -device ?
-device pci-assign,?' succeeds but has more output for qemu-kvm than for
qemu.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110118/5606f464/attachment-0001.sig>


More information about the libvir-list mailing list