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

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? <qemu:commandline> <qemu:arg value='-set'/> <qemu:arg value='device.drive-virtio-disk0.x-data-plane=on'/> </qemu:commandline> Regards, Chengyuan.

On Mon, Apr 20, 2015 at 10:37:13PM +0800, 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
[I haven't tested the virtio-blk data plane myself.] This libvirt version seems a little old (from March 2014), you might want to move to a bit newer.
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>.
You're modifying the guest definition behind Nova's back, so you get to keep all the pieces if something breaks. :-)
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?
<qemu:commandline> <qemu:arg value='-set'/> <qemu:arg value='device.drive-virtio-disk0.x-data-plane=on'/> </qemu:commandline>
-- /kashyap

Hi Kashyap, Here I want to test and see how much I/O performance could be improved by virtio-blk data plane feature. Yes, this is a dirty way to enable it :-), You mentioned using newer libvirt, is there parameter similar "x-data-plane=on" in new version libvirt? Please let know me you if you have better solution. Regards, CY. On Mon, Apr 20, 2015 at 10:51 PM, Kashyap Chamarthy <kchamart@redhat.com> wrote:
On Mon, Apr 20, 2015 at 10:37:13PM +0800, 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
[I haven't tested the virtio-blk data plane myself.]
This libvirt version seems a little old (from March 2014), you might want to move to a bit newer.
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>.
You're modifying the guest definition behind Nova's back, so you get to keep all the pieces if something breaks. :-)
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?
<qemu:commandline> <qemu:arg value='-set'/> <qemu:arg value='device.drive-virtio-disk0.x-data-plane=on'/> </qemu:commandline>
-- /kashyap

On Tue, Apr 21, 2015 at 09:54:57AM +0800, Chengyuan Li wrote:
Hi Kashyap,
Here I want to test and see how much I/O performance could be improved by virtio-blk data plane feature. Yes, this is a dirty way to enable it :-),
You mentioned using newer libvirt, is there parameter similar "x-data-plane=on" in new version libvirt?
Sorry, I didn't mean there's a specific version with this attribute turned 'on'. In fact, from my 'grep'ing in the source tree, it is not the case. I merely mentioned it as there have been numerous fixes in various areas over the year and if you're in a test environment, it's preferabl to use the newest versions. -- /kashyap
On Mon, Apr 20, 2015 at 10:51 PM, Kashyap Chamarthy <kchamart@redhat.com> wrote:
On Mon, Apr 20, 2015 at 10:37:13PM +0800, 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
[I haven't tested the virtio-blk data plane myself.]
This libvirt version seems a little old (from March 2014), you might want to move to a bit newer.
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>.
You're modifying the guest definition behind Nova's back, so you get to keep all the pieces if something breaks. :-)
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?
<qemu:commandline> <qemu:arg value='-set'/> <qemu:arg value='device.drive-virtio-disk0.x-data-plane=on'/> </qemu:commandline>

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

Hi Eric, Thanks! You are right, I missed declaring namespace, now, the <qemu:commandline> is saved after virsh edit. However, both namespace and <qemu:commandline> tag are lost after I run "nova start" to launch the VM. Any idea that how could I make this qemu command take effect ? Regards, CY. On Mon, Apr 20, 2015 at 11:41 PM, Eric Blake <eblake@redhat.com> wrote:
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

Am 21.04.15 um 03:44 schrieb Chengyuan Li:
Hi Eric,
Thanks! You are right, I missed declaring namespace, now, the <qemu:commandline> is saved after virsh edit.
Nice. Can you give a full example? Also are the limitations still the same as of 2013? This is what the internet is telling me. - Image formats are not supported (qcow2, qed, etc). - Live migration is not supported. - QEMU I/O throttling is not supported but cgroups blk-io controller can be used. - Only the default "report" I/O error policy is supported (-drive werror=,rerror=). - Hot unplug is not supported. - Block jobs (block-stream, drive-mirror, block-commit) are not supported. cheers t.
Regards, CY.
On Mon, Apr 20, 2015 at 11:41 PM, Eric Blake <eblake@redhat.com> wrote:
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
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users
participants (4)
-
Chengyuan Li
-
Eric Blake
-
Kashyap Chamarthy
-
Thomas Stein