I have a Proxmox node which is actually is HP Proliant DL 320e G8 server + APC SmartUPS 750 connected directly to the server by usb cable. On the host are running several Linux VMs. My question is - which software are better for graceful shutdown (if UPS will fail) NUT or apcupsd? Which software are more stable?
-
I dunno. I don't use UPS shutdown in virtual environments. Either should be fine. Be sure to test the failure conditions that are applicable to your specific environment. – ewwhite Sep 19 '14 at 18:47
-
1The main goal is proper shutdown of all vms and then entire server. p.s. Why yo dont use UPS shutdown in virtual environment? – powerthrash Sep 19 '14 at 18:55
1 Answers
In our experience there is nothing to choose between apcupsd and NUT in 'stability'.
I assume that the comment 'if the UPS fail' means 'if the power has failed, we are on UPS, and the battery life is about to run out'. This is based on running Proxmox for some years, with some opinion leavened with fact and experience.
- Proxmox will clean shutdown all hosts on UPS signal
see http://forum.proxmox.com/threads/4452-Proxmox-and-UPS-will-guests-shutdown-cleanly
- Which UPS tool should be installed on the Host? It depends.
apcupsd works well with many APC UPS to shut down a single UPS and machine. It is possible to configure it to shutdown other UPS but it's clunky (my opinion).
NUT works well with many makes of UPS to shut down all machines connected to that UPS (and potentially other machines connected to other UPS as well, by design). NUT is in my experience better at turning off the UPS than apcupsd which doesn’t always succeed in doing so. However NUT does not support all makes/models of UPS. For you it will probably work.
Select the UPS utility depending on what UPS you have and what else you need to control (and after testing it works in your case).
To implement properly I would recommend getting the statistics for how long it takes to shut down the VMHost and all the VMs (gathered over 10 (minimum! more is better) shutdown runs) and from that calculate the probable minimum time for Host+all VMs shutdown. Ensure that whatever timing you use with whichever client you select leaves adequate battery power to shutdown everything.
There is no guarantee that all VMs are cleanly shut down before the power goes out, and there is no guarantee that the Host is cleanly shut down before UPS battery fail if a VM hangs and does not complete a shutdown on request.
If a VM hangs then it's hung and only manual intervention will clear the situation (unless extra logic is invoked). Most of the VMs should be shutdown in most cases, and all of them will be in almost all cases in our experience.
If in doubt build an example system with the same VMs and try it out on scratch hardware to see what works best in your use case.
Further refs:
http://forum.proxmox.com/threads/14877-Shotdown-VMs-in-specific-order-when-UPS-initiates-shutdown-of-the-node (Proxmox UPS shutdown behaviour)
- 86
- 2