[SOLVED] Correct way to restart a node without stopping containers or vm's

lifeboy

Renowned Member
Is there a correct way to restart a node (mostly for applying kernel updates)?

I have about 20 virtual machines and containers that should not go down ever unless planned. So I have set the all as HA. When I shutdown a node, the VM's / LXC's shut down instead of migrating to the node next in the HA config. I can of course reset the node, but then it's like crashing the node, which is not what I want to do.

How does one ensure the HA config is honoured when a node is shut down and restarted?
 
So I have set the all as HA. When I shutdown a node, the VM's / LXC's shut down instead of migrating to the node next in the HA config. I can of course reset the node, but then it's like crashing the node, which is not what I want to do.

Change the "Shutdown Policy" to "migrate". This can be done in the webinterface under Datacenter → Options → HA Settings.
 
  • Like
Reactions: aasami
That does migrate those LXC's or VM's set up with HA. However, is there a way to get other running VM's or LXC's to hibernate and be restored to their running state when a node is restarted, rather than to have them shutdown? That would be really useful.
 
For VMs, yes, I haven't noticed that I can hibernate the machine manually before restarting a node.

Most LXC's are services, so it's not that relevant. I just realised that it's mainly machines where users log in remotely to where this would be useful so that users don't lose their files and session contexts.
 
For LXC CT, no, that's not possible and won't be anytime soon.
For VMs it can be done manually, but not yet automatically - this is planed though.
how's the plan going on this? even doing a manual suspension would be ok.
hyper-v does this automatically where you can reboot the host and the vm's don't notice.
what's the correct way to achieve this on proxmox?