cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Any option to edit guest instance xml configuration file permanently?

Open naseemvk opened this issue 1 year ago • 2 comments

Issue:

Any changes made to xml config file of a guest instance is discarded and changed to defaults after reboot.

How to reproduce;

  1. In any KVM host run as below assuming VM name is 1-2-VM-1234

virsh edit 1-2-VM-1234

  1. Change some parameters and save it.
  2. Reboot the VM
  3. Check again the XML config file
  4. You can see the changes we made in step 2 is not applied.

naseemvk avatar Feb 16 '24 04:02 naseemvk

@naseemvk are there any parameters you want changing that you cannot? this can be interpretted as two different featture requests. One specific for some missing knobs to turn and One generic to tweak any KVM based VM.

DaanHoogland avatar Feb 16 '24 10:02 DaanHoogland

Yes, I would like to change the cpu feature "hypervisor" to "disabled" from "require"

naseemvk avatar Feb 18 '24 08:02 naseemvk

By design this isn't possible in CloudStack. However, you can use the extraconfig feature to pass specific xml you want to add to your domain, or use the Guest hooks feature to write a script/parser to create xml you'd like in your VM: https://github.com/apache/cloudstack/blob/main/agent/conf/agent.properties#L110

In addition to this, we also support qemu hooks feature (see https://libvirt.org/hooks.html#etc-libvirt-hooks-qemu )

rohityadavcloud avatar Apr 30 '24 13:04 rohityadavcloud