Any option to edit guest instance xml configuration file permanently?
Issue:
Any changes made to xml config file of a guest instance is discarded and changed to defaults after reboot.
How to reproduce;
- In any KVM host run as below assuming VM name is 1-2-VM-1234
virsh edit 1-2-VM-1234
- Change some parameters and save it.
- Reboot the VM
- Check again the XML config file
- You can see the changes we made in step 2 is not applied.
@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.
Yes, I would like to change the cpu feature "hypervisor" to "disabled" from "require"
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 )