On Tue, Feb 16, 2021 at 09:51:52AM +0100, Michal Privoznik wrote:
On 2/12/21 2:10 AM, Marcin Struzak wrote:
> Hello--
>
> I'm planning on upgrading the OS on my host machine by doing manual
> re-installation, which will trigger an upgrade of libvirt from 1.1.3 to
> 6.1.0. Hardware, storage volumes & paths, etc., will be the same after
> upgrade.
>
> I was going to redefine & start everything from .xml files, starting
> with the network
>
> virsh net-define <network XML>
> virsh net-autostart <network>
> virsh net-start <network>
>
> and following with all the guests
>
> virsh define <domain XML>
> virsh autostart <domain>
> virsh start <domain>
If you are just upgrading the libvirt package then you do not need to do any
of this. Libvirt picks everything up after it's restarted. But if you are
installing host from scratch then ..
>
> I have the following questions:
>
> 1. Do I need to generate XML dumps manually, or is it ok to use the
> ones from host's /etc/libvirt?
.. yes, back up XMls here and use define & start as you suggested.
> 2. Do I need to define & start storage pools & volumes explicitly, or
> will they be picked up from domain definitions?
Storage pools won't be defined automatically. You need to save their XMLs
too. You can find them under /etc/libvirt/storage/. Don't forget on secrets
if you use them too.
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.
Erik