In the recently released virt-manager 1.4.1, we added a virt-install/virt-xml option --qemu-commandline that tweaks option passthrough for new or existing VMs. So for example, if you wanted to add the qemu option string '-device FOO' to an existing VM named f25, you can do:
./virt-xml f25 --edit --confirm --qemu-commandline="-device FOO"
The output will look like:
--- Original XML +++ Altered XML @@ -1,4 +1,4 @@ -<domain type="kvm"> +<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="kvm"> <name>f25</name> <uuid>9b6f1795-c88b-452a-a54c-f8579ddc18dd</uuid> <memory unit="KiB">4194304</memory> @@ -104,4 +104,8 @@ <address type="pci" domain="0x0000" bus="0x00" slot="0x0a" function="0x0"/> </rng> </devices> + <qemu:commandline> + <qemu:arg value="-device"/> + <qemu:arg value="foo"/> + </qemu:commandline> </domain> Define 'f25' with the changed XML? (y/n):