Shotdown VMs in specific order when UPS initiates shutdown of the node

minasmorgul

New Member
Jul 22, 2013
17
0
1
Hello,

i'd like to connect my UPS (APC) to the Proxmox node and manage it with apcupsd via the USB port. Is there a way to configure an automatic shutdown for the VMs in a specific order when the UPS is drained within five minutes and to shutdown the node afterwards.

I'm not running a cluster so far, but it might be interesting to migrate specific VMs to another node when the UPS gets drained. Is that possible?

Does anybody have such a setup?

Regards,
minas

p.s.: Sorry for the typo in the title ;) - should be shutdown, of course. :D
 
Last edited:
I cannot point you to the source but if I remember correct VM's are shutdown in the following way:

1) Randomly choose among running VM's which have no assigned start order until only running VM's with start order is left.
2) Shutdown running VM's descending there start order.

If forced migration is imposed I should think the logic would be to migrate ascending VM's startorder and lastly migrate VM's without any assigned start order. Eg. imitate a clean start-up.
 
Last edited:
@mir

Thank you, that was helpful, too.

Can you explain how to setup forced migration? There is no need to migrate all VMs but four of them, only.

Regards,
Minas
 
Last edited:
Thank you everybody, for your reply.

I'll pick up the HA-theme again, when i've got a cluster up and running.

bye
 
I think that you need a script that will be be called on specific apcupsd event and lunch remote ssh shutdown on VM.
 

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!