How to customize the xml used in libvirt from GUI/opestack command line?

Stephen Finucane stephenfin at redhat.com
Thu Apr 1 13:49:23 UTC 2021


On Tue, 2021-03-30 at 18:30 +0800, Evan Zhao wrote:
> Hi there,
> 
> I googled this question and found two major answers:
> 1. ssh to the compute node and use `virsh dumpxml` and `virsh
> undefine/define`, etc.
> 2. edit nova/virt/libvrit/config.py directly.
> 
> However, it's trivial to ssh to each node and do the modification, and
> I prefer not to touch the nova source code, is there any better ways
> to achieve this?
> 
> I expect to edit the namespace of a certain element and append an
> additional element <qemu:command> to the xml file.
> 
> Any information will be appreciated.

We purposefully don't allow this as it's not feasible to support. If you're
using a vendor to provide your OpenStack packages, there's a good chance they
won't allow you to do this either. Any modifications to the libvirt XML won't be
persisted when you use any operation that results in the XML being rebuilt (cold
migration, shelving, hard reboot, ...), while any chances to 'config.py' mean
you have a fork on your hands that you're going to have to maintain for the life
of the deployment. Neither are great situations to be in.

You haven't described the _specific_ problem you're trying to resolve here.
There's a possibility that nova may already have a feature to solve this
problem. If not, there's a chance that your problem is a problem that other
users are facing and therefore could warrant a new feature. If you raise your
specific feature request here or IRC (#openstack-nova), we'll be more than happy
to provide guidance.

Cheers,
Stephen




More information about the openstack-discuss mailing list