can I temporarily stop openstack from rewriting the libvirt XML?

asked 2019-09-19 17:29:24 -0500

jamesopst gravatar image

hi all,

I recently learned that the file vi /usr/lib/python2.7/dist-packages/nova/virt/libvirt/ is responsible for building the libvirt XML that openstack (kvm/qemu) uses to create instance definitions.

Now, I would like to test some custom libvirt settings using my openstack environment. Can I change something on the compute node where I will be testing these settings to stop openstack from rewriting these instance definitions each time and instance is rebooted/etc. say in this file (where?)?

I know this isn't a change that can exist indefinitely but something temporarily put in place? and I know depending on the custom settings used I can break the awesome features openstack affords me (ie migrate/resize)

just curious. thanks!

edit retag flag offensive close merge delete


If it's just for testing purposes you could test xml changes without the openstack layer. I do that sometimes by creating (or copying an existing vm xml) my own xml file, then virsh define <xml file> and virsh start <vm name> to see if my changes were successful. I also tried it within openstack

eblock gravatar imageeblock ( 2019-09-20 06:10:18 -0500 )edit

...but it didn't work for the named reason. Depending on the changes you need to make this can be done using the instance's metadata or image metadata. Maybe someone else has more information how to do that.

eblock gravatar imageeblock ( 2019-09-20 06:13:05 -0500 )edit