[libvirt-users] Passing non-standard Options through Libvirt to QEMU

Daniel P. Berrange berrange at redhat.com
Thu Apr 10 09:58:28 UTC 2014


On Thu, Apr 10, 2014 at 11:31:11AM +0500, Asadullah Hussain wrote:
> There are a couple of problems with passthrough qemu:
> 
> 1. virsh version/capabilities command executes "qemu -help"  but this gives
> an error in my case because my customized qemu has to receive mandatory
> non-standard parameters "qemu -c -n -- -help".

Two things

 - With any reasoanbly recent QEMU version, libvirt no longer uses -help
   but instead probes via QMP. it runs

     $QEMU -S -no-user-config -nodefaults -nographic -M none -qmp ..somepath... -pidfile ...somepath... --daemonize

 - If you are customizing QEMU it is your responsibility to ensure you
   don't break the above invocation, or equivalently  qemu -help.
   Requiring mandatory non-standard args in either of these cases is just
   plain broken design. You should only require those args when actually
   running a full QEMU VM.

> 2. Similarly when passing arguments as passthrough in a VMs XML. How can I
> make sure that these non-standard arguments are passed first i.e., My qemu
> command for a VM should be "qemu -c -n -- <Rest of the standard parameters>"

You can't - you should allow the args to appear in any order. Command
line flag order should not be relevant.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvirt-users mailing list