[libvirt-users] <qemu:commandline> domain XML tag is not working?

Eric Blake eblake at redhat.com
Mon Apr 20 15:41:46 UTC 2015


On 04/20/2015 08:37 AM, Chengyuan Li wrote:
> Hi,
> 
> I tried to enable virtio-blk data plane feature for VMs in my openstack
> environment,  the hypervisor is ubuntu 14.04, libvirt 1.2.2 and QEMU 2.0.
> As nova doesn't support that parameter yet, I did belows
> 
> 1. nova boot a VM with raw disk image.
> 2. nova stop the VM.
> 3. run "virsh edit <instance-id>" on the hyprvisor node, and adding below
> into instance xml just before </domain>.
> 
> However, the <qemu:commandline> part is ignored and not saved after closing
> virsh edit, seems that libvirt rejected these changes. Is there any XML
> syntax error here? Or libvirt doesn't support <qemu:commandline> tag?

If XML changes disappear after virsh edit, then it is a case of you
using XML that wasn't recognized by libvirt.

> 
> <qemu:commandline>
>     <qemu:arg value='-set'/>
>     <qemu:arg value='device.drive-virtio-disk0.x-data-plane=on'/>
> </qemu:commandline>

Did you also remember to declare the namespace? Per
http://libvirt.org/drvqemu.html#qemucommand

it is essential to have something like:

<domain type='qemu' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>

before any other <qemu:...> will be recognized.  (The namespace does not
have to be named 'qemu:', but it makes it easier to stick to the naming
used by the examples)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20150420/e35a663c/attachment.sig>


More information about the libvirt-users mailing list