KVM Plugin : Edit xml files

  • Hi,
    I tried to change some virtual machine configurations in the xml file from the plugin (with the virtual machine turned off) but after saving the configuration the xml file returns to the original one ignoring the changes.
    Why does this happen?
    Thanks

    • Official Post

    Why does this happen?

    libvirt must not have liked your change. What change did you make?

    omv 8.2.6-1 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.2.4 | compose 8.1.12 | cterm 8.0 | borgbackup 8.1.9 | tempmon 8.0.3 | mergerfs 8.0.1 | scripts 8.0.3 | writecache 8.1.10


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • From suggestions found on the internet and also with al IA ...

    I inserted the code to force the keyboard layout in Italian for spice (<keyboard layout='it'/>):

    <graphics type='spice' autoport='yes' listen='0.0.0.0'>

    <image compression='off'/>

    <keyboard layout='it'/>

    </graphics>

    However I noticed that any change to the xml file (both liked and not liked) is not maintained and the system always restores the original version.

    I also tried to change the resolution in the following way:

    <graphics type='spice' autoport='yes' listen='0.0.0.0'>

    <image compression='off'/>

    <keyboard layout='it'/>

    <video resolution='1920x1080'/>

    </graphics>

    but nothing ... the file is not updated and always returns to the original.

    No type of change is saved.

    • Official Post

    Neither of your changes are correct.


    keyboard layout would be like this:

    Code
    <graphics type='spice' autoport='yes' listen='0.0.0.0' keymap='it'>
      <listen type='address' address='0.0.0.0'/>
      <image compression='off'/>
    </graphics>

    resolution is in the video section and would require change from virtio to qxl. Since the guest usually determines the resolution, I don't know why you need this.

    omv 8.2.6-1 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.2.4 | compose 8.1.12 | cterm 8.0 | borgbackup 8.1.9 | tempmon 8.0.3 | mergerfs 8.0.1 | scripts 8.0.3 | writecache 8.1.10


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I added a 2nd vCPU & moved my qcow2 virtual disk to a faster drive last year and edited /etc/libvirt/qemu/HomeAssistant.xml to point to the new location. On OMV restart the changes to VD & vCPU were not maintained in the XML, so the VM could not start. I then made the same edits to the XML from within the OMV KVM gui, but they still do not persist through an OMV restart. Is there a way to make persistent edits, or would I be advised to recreate the domain XML from scratch?

    KnobblySnail


    OMV7, proxmox 6.14, on Asrock E3C224D2I, Xeon E3-1230Lv3, 16Gb, WD Red 3Tb x3 zfs, 480GB Samsung SM883 SSD, CoolerMaster V550S, in a Fractal Design Node 304

    • Official Post

    Is there a way to make persistent edits, or would I be advised to recreate the domain XML from scratch?

    The whole point of the edit xml feature in the plugin is to make the changes persistent. So, that seems strange. I make changes to VM xml all the time and they always persists. The only time they won't persist is when virsh doesn't like your changes. But I improved the plugin 4-5 months ago to make the error reporting better. What is the exact change you are making? The plugin also offers the ability to change vcpu and remove/add a disk without editing xml.

    omv 8.2.6-1 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.2.4 | compose 8.1.12 | cterm 8.0 | borgbackup 8.1.9 | tempmon 8.0.3 | mergerfs 8.0.1 | scripts 8.0.3 | writecache 8.1.10


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • The vCPU change I made with the plugin.

    The xml change is:

     <source file='/WDred3Tx3/AppData/volumes/haos_ova-13.1.qcow2' index='1'/>

    to

    <source file='/vm/haos_ova-15.2.qcow2' index='1'/>

    where /vm/ is a link -> /srv/dev-disk-by-uuid-adef0bab-d52d-421a-be03-38f1c2b7d31f/

    I didn't realise I could have used the remove/add function to achieve this - I will use it next time.

    I am intrigued virsh would accept the change to start the VM, but not permit the xml to be saved to survive an OMV reboot. I suspect my earlier direct file edits are to blame. Maybe I should just re-create from scratch in the plugin the domain xml

    HomeAssistant.xml.txt

    KnobblySnail


    OMV7, proxmox 6.14, on Asrock E3C224D2I, Xeon E3-1230Lv3, 16Gb, WD Red 3Tb x3 zfs, 480GB Samsung SM883 SSD, CoolerMaster V550S, in a Fractal Design Node 304

    • Official Post

    I honestly have never used a symlink for a disk path. I assume kvm/qemu doesn't have a problem with that but I don't know. Are you sure permissions were correct? And I assume you always made changes with the VM powered off?


    I am intrigued virsh would accept the change to start the VM, but not permit the xml to be saved to survive an OMV reboot

    virsh has many different types of edits. You can edit the current running xml, the stored xml, or both. The plugin doesn't allow changes while the VM is powered on. So, it should always be the stored xml. Hard to say what happened on your system.


    Maybe I should just re-create from scratch in the plugin the domain xml

    I'm not sure what that would fix. If you really want to make changes outside of the plugin, use virt-manager.

    omv 8.2.6-1 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.2.4 | compose 8.1.12 | cterm 8.0 | borgbackup 8.1.9 | tempmon 8.0.3 | mergerfs 8.0.1 | scripts 8.0.3 | writecache 8.1.10


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!