note
xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0
in header, and just inspect that. This almost works!
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>...</name>
<memory unit='KiB'>...</memory>
<os>
<type arch='x86_64' machine='pc-i440fx-trusty'>hvm</type>
</os>
<qemu:commandline>
<qemu:arg value='-snapshot'/>
</qemu:commandline>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/tmp/some/existing/image.qcow2'/>
<target dev='hda' bus='ide'/>
<!--
https://bugzilla.redhat.com/show_bug.cgi?id=832194
<transient />
-->
</disk>
</devices>
</domain>
Unfortunatelly, this hapen:
internal error: process exited while connecting to monitor: qemu-system-x86_64: -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1: Device needs media, but drive is empty
qemu-system-x86_64: -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1: Device initialization failed.
qemu-system-x86_64: -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1: Device 'ide-hd' could not be initialized
But anyway this is much more clean way to pass custom qemu arguments