Configuration is most conveniently done with GUI tool "Virtual Machine Manager" installed on a ubuntu desktop. For command line, use "virsh edit [domain]" to edit the XML configuration file.
Domain XML format reference:
http://libvirt.org/formatdomain.html
Stefan Hajnoczi: How to pass QEMU command-line options through libvirt:
http://blog.vmsplice.net/2011/04/how-to-pass-qemu-command-line-options.html
Placed under /etc/libvirt/qemu
Edit using "virsh edit [domain]"
Refer to the complete reference for various configurations.
In addition, can also pass direct argument to emulator's commandline. This is done by:
1. Change "<domain>" line to
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
2. Under <domain> tag, at the bottom of the whole configuration file, following examples below:
<qemu:commandline> <qemu:arg value='-option-rom'/> <qemu:arg value='path/to/my.rom'/> </qemu:commandline>
It is also possible to add environment variables to the QEMU invocation:
<qemu:commandline>
<qemu:env name='MY_VAR' value='my_value'/>
</qemu:commandline>