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.> 3. Anything else I should worry about or prepare ahead?Not strictly related to libvirt, but machine types might be problem. I guess qemu will be upgraded too and in general the machine type you're using for a domain might not be available in upgraded qemu. You can view supported machine types by running 'virsh capabilities' with upgraded qemu. Good luck! Michal
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
On 2/16/2021 12:51 AM, Michal Privoznik wrote:> On 2/12/21 2:10 AM, Marcin Struzak wrote: > [...] > >> ?3. Anything else I should worry about or prepare ahead? > > Not strictly related to libvirt, but machine types might be problem. I > guess qemu will be upgraded too and in general the machine type you're > using for a domain might not be available in upgraded qemu.Correct, it looks like qemu will go from 1.6.2 to 4.2.1...> > You can view supported machine types by running 'virsh capabilities' > with upgraded qemu.machine is pc-i440fx-1.6 in all my domains.? Is there a simple way to figure out if that's supported in libvirt 6.1.0 (without installing it)?> > Good luck! > > Michal >Thank you for a quick & detailed answer. --Marcin