1

ubuntu 13.04 qemu$ virsh version Compiled against library: libvirt 1.0.2 Using library: libvirt 1.0.2 Using API: QEMU 1.0.2 Running hypervisor: QEMU 1.4.0

i want to use "Pass-through of arbitrary qemu commands" So i convert from " to "http://libvirt.org/schemas/domain/qemu/1.0'>" using virsh edit. But after saving xml file, i open xml file again. I couldn' find ""http://libvirt.org/schemas/domain/qemu/1.0'>". What should i do?

Plz~

3

The namespace declaration is removed by libvirt, if it isn't used. So you need to add the declaration and before saving add an element to the file. this is preserved by libvirt

<domain type='qemu' id='15' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  ...
  <qemu:commandline>
    <qemu:arg value='-cpu'/>
    <qemu:arg value='arm1176'/>
  </qemu:commandline>
</domain>
0

I have a possible workaround. I had the same problem with same versions of virsh/qemu.

First, I made a new copy of the vm's .xml file:

cp /etc/libvirt/qemu/my-vm.xml ./new-vm.xml

Then I edited the new .xml file, adding the qemu schema line, along with the qemu passthrough arg tags. You'll need to change and delete the line.

Next start virsh and define a new vm:

virsh # define cvm-qemuplus.xml
virsh # edit my-new-vm-name
// shows that the qemu arg tags persisted

I'm not sure if doing a virsh edit and saving again will wipe out the tags. I didn't try that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.