HA, can I have some migrate?

sirebral

Member
Feb 12, 2022
46
9
13
Oregon, USA
Hey everyone,

I'm in the midst of setting up my HA (High Availability) setup and aiming to get it just right for my needs. I've got a couple of key guests that I need to automatically failover in case of issues, while there are others that aren't as crucial, which I'd prefer to shut down gracefully if we're rebooting the system. For those unexpected outages, I'd like all of them to migrate over. However, I'm hitting a bit of a wall in finding the perfect settings for this scenario.

Currently, I'm using replication since I'm operating with just two nodes (though I'm about to add a third). I'm keen on having an almost real-time copy of all my systems on the alternate host, in addition to my more infrequent backups. My initial thought was to create a restricted group for each node for those guests I don't want to automatically failover, but this approach seems to be causing some hiccups. Specifically, it's preventing a complete shutdown of the host since the systems in these groups keep running, which messes with the HA process. Plus, when I manually shut them down, they don't reboot when the host does; instead, their HA status just switches to 'stopped' and stays that way. I'm scratching my head as to why.

I've also toyed with the idea of setting them to 'ignored', but that seems almost like not having them in HA at all.

Note: I'm on the latest 8th revision, the main release.

Does anyone have any suggestions on how I might achieve my goals here? I feel like there's got to be a way, but I'm just not finding the right setup.

I appreciate any advice you can offer!

Keith
 
Last edited:
You cannot specify it per guest AFAIU. Set the Migration shutdown policy to "migrate" to migrate them to the other node in case of a shutdown. You can also use the maintenance mode to control when they are allowed to migrate back.
Code:
ha-manager crm-command node-maintenance enable <node>

If you want to handle it on a per-guest basis, you will need to script something. E.g. shutdown the guests that are not as important, and then power them on once you are done and the node is ready to be used again.
For example, something like:
Code:
GUESTS="100 101 103 110"
for g in $GUESTS; do qm shutdown $i; done
To shutdown the guests in the list. A similar script then of course to start them up.
 
If there is no remediation, it would be great if this feature could be considered for the roadmap, as it seems like it would be quite useful. For now, I've had to remove the less critical clients from HA, but this isn't a perfect solution since that means they will fail to come back up on the other host in the event of an unexpected shutdown. I'm inclined to use built-in tools wherever possible, as scripts can become complicated and messy, and I'd prefer not to clutter the hosts.

With regard to maintenance mode, I do use this rather extensively, yet it doesn't help when I have an unexpected failure and will fail over all of the HA boxes, which is also not my intent.

Thanks for the suggestion, though.

All the best,

Keith"
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!