Bug 659070

Summary: libvirtd ignores extra command line parameters for qemu-kvm
Product: [Fedora] Fedora Reporter: Akshat Aranya <aaranya>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 14CC: aquini, berrange, clalance, crobinso, itamar, jforbes, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-02 09:50:30 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Akshat Aranya 2010-12-01 15:35:04 EST
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:
Comment 1 Chris Lalancette 2010-12-01 17:07:27 EST
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
Comment 2 Akshat Aranya 2010-12-02 09:03:34 EST
Indeed, adding the xml namespace worked.  Thank you.  Sorry for the noise.
Comment 3 Chris Lalancette 2010-12-02 09:50:30 EST
No problem, happy to help.

Chris Lalancette