Shutdown issue

nethfel

Member
Dec 26, 2014
151
0
16
Hi all,

I'm testing a shutdown script to run during an extended power outage - it's really basic - basically sending a shutdown -h +0 to each of the PVE hosts. This works fine to an extent - if there is a vm that is not shutting down properly (for example - in a test pass, one vm took 3 minutes to shutdown and another was at 6 minutes before I just went in an killed the process) - is there a way that I can have it just kill VMs that are improperly shutting down after X minutes? (I'm sure there is a way via scripting, but I can't say I'm the best bash scripter). I need the VMs shutdown before I can instruct the ceph cluster to shut itself down, and right now the batteries would die prior to the ceph cluster being able to be properly shutdown.
 
Hi all,

I'm testing a shutdown script to run during an extended power outage - it's really basic - basically sending a shutdown -h +0 to each of the PVE hosts. This works fine to an extent - if there is a vm that is not shutting down properly (for example - in a test pass, one vm took 3 minutes to shutdown and another was at 6 minutes before I just went in an killed the process) - is there a way that I can have it just kill VMs that are improperly shutting down after X minutes? (I'm sure there is a way via scripting, but I can't say I'm the best bash scripter). I need the VMs shutdown before I can instruct the ceph cluster to shut itself down, and right now the batteries would die prior to the ceph cluster being able to be properly shutdown.

Here are command line manuals for VMs and containers:

OpenVZ: https://pve.proxmox.com/wiki/Vzctl_manual
KVM: https://pve.proxmox.com/wiki/Manual:_qm

Maybe something in there can help.