Upgrading the host

Michal Privoznik mprivozn at redhat.com
Wed Feb 17 08:11:51 UTC 2021

On 2/17/21 2:59 AM, Marcin Struzak wrote:
> On 2/16/2021 1:02 AM, Erik Skultety wrote:
>> [...]
>> Needless to say, if you're backing up /etc/libvirt/<whatever> make sure
>> libvirtd is down first, so that all the settings are properly dumped 
>> by the
>> daemon to the respective XMLs.

I'm not convinced this is the case - we go great lengths to make sure 
XMLs are saved onto disk safely and as soon as possible. Not only 
because users might kill libvirtd, it may also crash.

But doesn't hurt to shut the daemon off.

>> Erik
> Absolutely!  Not concerned about downtime here, just that after the 
> upgrade everything comes back up like before.
> Speaking of settings dumped into XMLs, why are the files in 
> /etc/libvirt/qemu ever so slightly different from a manual dump using 
> virsh dumpxml & friends?  E.g., for a domain I have a section
> <resource>
>    <partition>/machine</partition>
> </resource>
> <alias ... /> entries for all devices, a tty attribute & <source ... /> 
> for console, etc., in the manual dump only?

Because 'virsh dumpxml' prints so called live XML if guest is running; 
or inactive XML if guest is not running. If the guest is running but you 
want to print the inactive XML you can do 'virsh dumpxml --inactive'.

The difference between live and inactive XML is that the former contains 
runtime information (like CGroup placement, device aliases generated 
when guest is created, domain ID, etc.). If you dump inactive XML then 
the output should be the same as under /etc/libvirt.


More information about the libvirt-users mailing list