[libvirt-users] virsh confirmed edits do not persist

This may be user error, I am new to libvirt. I am using libvirt 5.0.0. I have created a VM (win10) in the system URI using virt-manager. I stopped the VM to edit it. I set my LIBVIRT_DEFAULT_URI="qemu:///system" and am able to read the domain configuration with `EDITOR=nano virsh edit win10`. When I save (ctrl+o) and exit (ctrl+x) I see the message "Domain win10 XML configuration edited." as expected. However, when I run the edit command again the changes do not appear to have persisted. I have tried starting and stopping the VM. I read that I may need to define the domain with virsh so I did that. None of these things seem to work. I would appreciate it if someone could help me solve this issue in order to be able to modify domains from virsh! Thanks in advance for any help! Josh

On Thu, Feb 21, 2019 at 01:06:48AM -0500, Josh Mcneil wrote:
This may be user error, I am new to libvirt.
Welcome,
I am using libvirt 5.0.0. I have created a VM (win10) in the system URI using virt-manager. I stopped the VM to edit it.
I set my LIBVIRT_DEFAULT_URI="qemu:///system" and am able to read the domain configuration with `EDITOR=nano virsh edit win10`. When I save (ctrl+o) and exit (ctrl+x) I see the message "Domain win10 XML configuration edited." as expected.
that means libvirt successfully parsed the changed XML file. The elements libvirt does not parse will not appear in the changed configuration. Usually those should get caught by the schema validation, but it's not perfect. What were the exact changes you were trying to make?
However, when I run the edit command again the changes do not appear to have persisted.
I have tried starting and stopping the VM. I read that I may need to define the domain with virsh so I did that. None of these things seem to work.
Calling 'virsh define' with the same domain name and UUID in the XML and 'virsh edit' is equivalent - both call virDomainDefineXMLFlags under the hood. Jano
I would appreciate it if someone could help me solve this issue in order to be able to modify domains from virsh!
Thanks in advance for any help!
Josh
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users

Thanks Ján!
What were the exact changes you were trying to make?
I was following this guide: https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Passing_keyboa... Specifically, I was updating the domain tag to include `xmlns:qemu=' http://libvirt.org/schemas/domain/qemu/1.0'`
both call virDomainDefineXMLFlags under the hood.
That is good to know, thanks for the explanation. I appreciate the help, if you have any suggestions I'm happy to hear them Josh On Thu, Feb 21, 2019 at 2:16 AM Ján Tomko <jtomko@redhat.com> wrote:
On Thu, Feb 21, 2019 at 01:06:48AM -0500, Josh Mcneil wrote:
This may be user error, I am new to libvirt.
Welcome,
I am using libvirt 5.0.0. I have created a VM (win10) in the system URI using virt-manager. I stopped the VM to edit it.
I set my LIBVIRT_DEFAULT_URI="qemu:///system" and am able to read the domain configuration with `EDITOR=nano virsh edit win10`. When I save (ctrl+o) and exit (ctrl+x) I see the message "Domain win10 XML configuration edited." as expected.
that means libvirt successfully parsed the changed XML file. The elements libvirt does not parse will not appear in the changed configuration. Usually those should get caught by the schema validation, but it's not perfect.
What were the exact changes you were trying to make?
However, when I run the edit command again the changes do not appear to have persisted.
I have tried starting and stopping the VM. I read that I may need to define the domain with virsh so I did that. None of these things seem to work.
Calling 'virsh define' with the same domain name and UUID in the XML and 'virsh edit' is equivalent - both call virDomainDefineXMLFlags under the hood.
Jano
I would appreciate it if someone could help me solve this issue in order
to
be able to modify domains from virsh!
Thanks in advance for any help!
Josh
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users

[please don't top-post on technical lists] On Thu, Feb 21, 2019 at 08:16:33AM -0500, Josh Mcneil wrote:
Thanks Ján!
What were the exact changes you were trying to make?
I was following this guide: https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Passing_keyboa...
Specifically, I was updating the domain tag to include `xmlns:qemu=' http://libvirt.org/schemas/domain/qemu/1.0'`
https://libvirt.org/drvqemu.html#qemucommand That is used to allow (unsupported) passing of arbitrary arguments to QEMU, but the xmlns= line on its own does not do anything. You need to add the actual <qemu:...> elements. The snippet in the wiki you linked does not show that it belongs between </devices> and </domain>. Note that libvirt does support evdev passthrough via virtio-input (the virtio-input-host QEMU device), which saves you from setting up the permissions and cgroup acl manually, but requires virtio drivers in the guest and won't give up control of the evdev while the guest is running. Jano
both call virDomainDefineXMLFlags under the hood.
That is good to know, thanks for the explanation.
I appreciate the help, if you have any suggestions I'm happy to hear them
Josh
participants (2)
-
Josh Mcneil
-
Ján Tomko