[SOLVED] Is it OK to make apt update && apt dist-upgrade on-the-fly while VMs and LXCs are running ?

jhr

Member
Nov 29, 2021
70
10
13
51
I have a few servers with Proxmox and a couple of VMs and LXCs on each of it. When I did apt update && apt dist-upgrade, sometimes all my VMs and LXCs were automaticaly rebooted during an update process, perhaps due to update qemu or kvm or something like that. I guessed it is normal behaviour. But I haven't seen this behaviour now, am I lucky guy or there were some SW changes in Proxmox code that solved this ?
Is is safe to make it on-the-fly ? I know I have to reboot Proxmox when there is a new kernel.
 
There isn't 100% safe update in the software world. So every update is less or more risky, even if you test it on spare hw.
 
I've always done it on the fly & never had a problem. Some executions (eg. pve-qemu-kvm) will only be executed when the VM/LXC is restarted - so an update/upgrade is irrelevant. I'm surprised you ever had a problem, it may have been linked to HW bandwidth & not the update/upgrade itself.

The bigger risk of an update/upgrade - at least at my end - is breaking something when you actually reboot/start/restart a VM/LXC after an upgrade. YMMV. This is the natural way of updates - that is why YOU are an administrator!
 
  • Like
Reactions: UdoB and jhr
no, installing upgrades should not affect running guests - in fact, most of our services support and implement hot-reloading so even running tasks or API requests should not be interrupted. do you maybe have a tool like needrestart installed but not configured correctly? the system and APT logs might give some relevant details..
 
  • Like
Reactions: UdoB and jhr