High Availability Functionality

esnmb

Member
Sep 4, 2024
16
5
8
I have recently stood up a 3-node cluster and enabled HA for my VM's upon creation. I noticed that shutting a VM down from inside the guest OS or via the CLI or web UI, HA always restarts it.

I guess this is by design, but coming from vSphere, I was expecting HA to just restart a VM if a host crashed and not if it was shut down. If I push to implement Proxmox at work as a potential replacement for vmware, this is going to get a lot of push back from our Linux and Windows teams, which manage the guest OS'.

Having to modify a VM's HA settings just to shut it down for maintenance is pretty inconvenient, workflow-wise.

Maybe there is a better way that I don't know of yet since I'm new to this..?

Thanks.
 
if you press the shutdown button via proxmox gui it will shut down and stay turned off, however if it is done via the guest OS it will turn back on (with HA enabled) - i also noticed this coming from vmware and its annoying, proxmox has some quirks like this
 
  • Like
Reactions: Kingneutron
OK. Thanks for the response. I'll check that again.
My lab seems to be "quirky".. Migrations work just fine, then randomly get stuck migrating...
 
OK. Thanks for the response. I'll check that again.
My lab seems to be "quirky".. Migrations work just fine, then randomly get stuck migrating...
Most likely something network related or storage related. If it's shared storage, then you're just migrating RAM while a VM is running. If it's an LXC or the VM is off, hardly anything is actually moved so something to do with the locking on the storage device may be causing an issue. If you don't have shared storage, PVE will still try to move everything but that is very demanding on the network so you'll want to ensure you have a separate aggregate link for your migrations which you could pair with another infrequent task like backup. Ideally if you're moving more than say 32GB you should really consider 10Gbps NICs, because getting by with 1Gbps NICs is going to be painful and possibly unstable. The hypervisor is juggling a bit while migrating, so the longer it's forced to migrate the higher likelihood a ball will drop.
Cheers,

Tmanok
 
Having to modify a VM's HA settings just to shut it down for maintenance is pretty inconvenient, workflow-wise.
Maybe there is a better way that I don't know of yet since I'm new to this..?
You can also change the VM HA state from "started" to "igniored".
VM -> Upper right corner: [More] -> manage HA
Then do your changes/testing/restart(s) , and when you are finished change back to "started".
 
  • Like
Reactions: esnmb and SteveITS
This is expected behavior with Proxmox HA. If a VM is managed by HA, stopping it is generally interpreted as an unexpected state, so the HA manager will try to bring it back online.

For planned maintenance, you can temporarily put the VM into a stopped/maintenance state or remove it from HA before shutting it down. It’s a different workflow from vSphere, so I can definitely see why this could be confusing for teams coming from VMware.

I’d recommend testing the HA maintenance workflow with your Linux/Windows teams before making a final decision—it may just require some adjustment to the operational process.
 
Having to modify a VM's HA settings just to shut it down for maintenance is pretty inconvenient, workflow-wise.
This question may seems weird, but what maintenance is this? I cannot imagine maintenance to a VM in which the VM is shut down. If you mean the hypervisor, then just migrate the VM to other nodes. This can also be done automatically, check datacenter -> Options -> HA settings.
 
Last edited:
  • Like
Reactions: Johannes S
This question may seems weird, but what maintenance is this? I cannot imagine maintenance to a VM in which the VM is shut down. If you mean the hypervisor, then just migrate the VM to other nodes. This can also be done automatically, check datacenter -> Options -> HA settings.
Not too weird. ;-)

I'm not sure why they'd need to power a vm off, but just having to jump into the web ui and change HA settings just to shut a vm down may irk some people when they'd expect shutting it down from inside the guest OS to actually shut the vm off.

I don't think it's that big of a deal, but just from experience earlier this year going through a few POC's with other hypervisors, these other teams aren't very friendly to change....
 
  • Like
Reactions: Johannes S
You can also change the VM HA state from "started" to "igniored".
VM -> Upper right corner: [More] -> manage HA
Then do your changes/testing/restart(s) , and when you are finished change back to "started".
I like this. I didn't even notice you can change this from the VM's view. Like I said, I'm pretty new to Proxmox and still figuring it out.
Thanks!
 
@esnmb Proxmox HA is more of a “what state is it supposed to be” thing. PVE doesn’t know why it is off, it just knows it’s supposed to be running. The web GUI tells HA it should be stopped therefore the guest is asked to stop.
Makes sense. Hopefully/Maybe there will one day be another HA option to just restart only if the running host goes down. ;)
 
  • Like
Reactions: Johannes S
I cannot imagine maintenance to a VM in which the VM is shut down.
Aren't there any parameters of a VM hosted by a PVE (I mean parameters not inside of VM's OS) which require stopping the VM first?

For instance, at least in Vmware, when you need to disable Secure Boot in EFI boot settings, the VM must be shut down first. (When the VM is running , this setting is greyed out and impossible to modify).

Similarly like a number of vCPUs and amount of RAM (unless hot-plug is enabled in this VM).

So if HA would restart the VM quickly, you'd have no time to change such setting.
 
  • Like
Reactions: esnmb
One can change settings ahead of time. PVE shows that unapplied setting in orange as I recall, in the hardware settings page.

If one restarts the OS inside the VM, the VM "hardware" doesn't ever stop, so PVE never applies the change. The Restart in the PVE GUI does do a shutdown+start.
 
  • Like
Reactions: esnmb