suspend on host poweroff

michabbs

Well-Known Member
May 5, 2020
138
20
58
Can Proxmox automatically suspend all running vm's (instead of shutting down) on host poweroff/reboot? So that they could be resumed after host power up.
I do not see appropriate config option... On the other hand there is "qm suspend" command, so automating it should not be hard.
 
Can Proxmox automatically suspend all running vm's (instead of shutting down) on host poweroff/reboot? So that they could be resumed after host power up.
I do not see appropriate config option... On the other hand there is "qm suspend" command, so automating it should not be hard.

not yet but its no the roadmap.
 
Here is minimal solution - for those who do not want to wait:
Code:
#!/bin/sh
#
for A in `qm list|sed -e 's/^ *//'|grep " running "|cut -d ' ' -f 1`; do
    /usr/sbin/qm suspend $A --todisk 1
done
reboot