2

So my question is on a Proxmox VE host (let's assume 5.1 in case it matters) when I run apt-get update && apt-get dist-upgrade and decide to go ahead with the installation of package updates, will this cause KVM-based guests (that's the only kind we're using at the moment) to be stopped/suspended or otherwise affected?

If so, does this depend on a particular package being updated (I imagine the pve-* packages may be of interest here)?

Essentially what I am trying to find out is if the KVM guests will continue running unaffected or if I need to schedule such host updates for a particular time. I realize that I have to schedule reboots into a new kernel in either case.

0xC0000022L
  • 1,516
  • 2
  • 22
  • 42
  • libvirt will restart, but VMs will be unaffected. So there will be a brief interruption (maybe 1 second) in anything that connects to libvirt, such as the web interface. – Michael Hampton Apr 11 '18 at 17:49

1 Answers1

2

General rules about it, always prepare some backup.

Now the answer will vary of the component you will update. If it's a upgrade from 5.1.Y to 5.1.X it shouldn't cause any issue. If it upgrade you to the next major version (eg 6.X), here clearly you will need to schedule a downtime for the operation.

Now, for minor upgrade, it won't hurt to do it with running VM even if it's will always be better to do it with no running VM.

KVM guest are runned by QEMU/Libvirt, so you can totally restart pve-* services without impacting your running VM.

You can also restart libvirtd and libvirt-bin services without causing any trouble to your running VM, as each VM is an independent process with his own args and files.

Of course if you try to run some QEMU/KVM feature (like snapshot) after the upgrade without hard rebooting the VM you may encouter some issues because of an inconsistency between the libvirt version on the server and the one used to run the VM.

mitsugoya
  • 54
  • 6
  • Backups are not a _direct_ concern as this is a standard system update; they're done regularly. It's a "minor upgrade" (5.1.Y to 5.1.X) since I didn't mention any adjustments to `sources.list` in conjunction with apt-get dist-upgrade`. Also, I largely know how KVM guests are being run, but if `qemu-server` were to be updated in said process, how would that affect the outcome (if it does)? If discrepancies about snapshots and the likes are the only issue then this is absolutely acceptable. But I doubt that'd be an issue, given the libs were already loaded into the running KVM process. – 0xC0000022L Apr 11 '18 at 11:49
  • In fact, if qemu or libvirt is updated even if the libs are loaded in the KVM process, if you try to perform an action such as snapshot, migrate, stop or anything else, you have a small chance that (very very small however, but I have to mention it anyway) that when libvirt will do the call, the lib he will using on the vm will not be exactly the same it was expecting and then the action failed. But to be honest, Even with all the patch done regarding spectre and meltdown, we were able to upgrade Qemu and libvirt without issue on VM, so you should be able to do it. – mitsugoya Apr 11 '18 at 23:30