Updating domains definitions via API

Michal Prívozník mprivozn at redhat.com
Mon May 16 13:31:57 UTC 2022


On 5/16/22 14:52, Darragh Bailey wrote:

> So perhaps this is less a bug with the loader/nvram XML element handling
> and more a documentation bug and a possible enhancement that possibly
> the virDomainDefineXMLFlags could consider accepting a flag to verify the
> returned domain XML is equivalent as a general fix for those applications
> that would find this useful?

Yes to the first part, but no the second. Comparing XMLs is not as easy
as you would think. For instance:

<domain id='1' type='kvm'>
  <uuid>123456</uuid>
  <name>myGuest</name>
</domain>

<domain type='kvm' id='1'>
  <name>myGuest</uuid>
  <uuid>123456</uuid>
</domain>

The former is just an example of possible user input, the latter is how
libvirt would format it. Obviously, these XMLs are equivalent, but not
stcmp() equal.

Michal



More information about the libvirt-users mailing list