Proxmox VE Scheduled Shutdown of a Node (incl. active VMs)

mitlix

New Member
Jan 17, 2021
2
0
1
26
Hello,

I am new here and just set up a Proxmox VE node to host things like pi-hole, wireguard and some smarthome tools. As I do not need availability of the system 24h, it would be nice to shutdown the system at a certain time. Wake up could be either arranged via BIOS of the computer (Esprimo Q920) or by WoL.

However, I actually struggle to find out if and how a scheduled shutdown of the entire system can be realized. Most threads address shutdown of VMs/CTs. As far as I understand a shutdown of the node via the shutdown button issues a controlled shutdown of the related VMs/CTs as well (ACPI must be supported by the OS).

I really searched a lot (internet, manual, forum) but I did not find a solution yet. Is a scheduled shutdown of the node + VM/CTs not supported resp. intended? I guess a cron job (shutdown -h now) will not shutdown Proxmox in a controlled manner as intended. Does anyone have a solution for such a scenario?

Thanks and Cheers
 
In my experience, shutdown -h now does stop Proxmox in a controlled way by shutting down the VM/CTs gracefully first (in reverse order of starting). When nobody is logged in to certain VMs and the system is not recording TV, I have a script that shuts it down until the next TV recording using rtcwake.
PS: Make sure the VMs have the QEMU-guest-agent installed for a proper shutdown.
 
Last edited:
If you want to shutdown your VMs in a specific order (which reflects dependencies) use the VM Startup / Shutdown order in VM options.
According to my experience this works great and also the automatic startup (on boot) works fabulous.

/edit: I don't have the Qemu-Agents enabled for all my Linux-VMs, it still works great.
 
Last edited:
Hello - thanks a lot for the fast response. As far as I understand a simple "shutdown - h now" should shutdown the active CTs first and then shutdown the computer. I run a test (shutdown -h now via crontab) and it seems to work - see screenshot of the cluster log. Only pi-hole is installed in a container yet (ID 100). Autostart is working fine as well. Hope that will be working for add. containers in productive mode (private use) as well.

So, any add. feedback is appreciated - in particular if something is not appropriate. Thanks again and have a good day!
1610918032788.png
 

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!