Description of problem: I am trying to pass an extra command line parameter to qemu-kvm to allow kernel debugging through gdb. This is a '-s' option for the qemu-kvm command line. I am unable to pass this parameter using virsh Version-Release number of selected component (if applicable): libvirt-0.8.3-2 How reproducible: Always Steps to Reproduce: 1. Determine the correct XML to use for specifying command line parameters for qemu-kvm. This is done using virsh domxml-from-native: $ virsh domxml-from-native qemu-argv test This generates an XML file with the following snippet: <qemu:commandline> <qemu:arg value='-s'/> </qemu:commandline> 2. Add the snippet to the guest VMs XML using virsh edit and save the edited XML. 3. Dump the XML file using virsh dumpxml Actual results: The XML file does not contain the newly-added command line parameter. When the VM is started, the qemu-kvm command line does not include the -s option. Expected results: The XML file contains the newly-added command line parameter and qemu-kvm starts up with the extra command line parameter. Additional info:
You also need to add the namespace argument at the top of the output from virsh domxml-from-native (i.e. xmlns:qemu=http://libvirt.org/schemas/domain/qemu/1.0). If you add that, does it work? Chris Lalancette
Indeed, adding the xml namespace worked. Thank you. Sorry for the noise.
No problem, happy to help. Chris Lalancette