Start/stop VM on a schedule

docmattman

New Member
Sep 14, 2012
29
0
1
I have a backup server setup as a VM in PVE. All my home PCs are set to send backups to this server between 3-5am everyday. So basically I only need this server available during those hours of the day.

Is it possible to start/stop VMs on a schedule at specified times? Ideally I'd prefer not to have my backup server VM running all day since it will only be used for a short period of time. I'd like to keep the memory and cpu available for other tasks when the backup server isn't needed. Anyone have any advice on how to accomplish this?
 
cronjob?
 
Is there a command to gracefully shut the backup server down, rather than just using the "stop" command for the VM?
 
Code:
qm shutdown <VMID>
requires ACPI drivers/modules to be installed inside the guest to work.
 
bump

Hello is it possible to add this functionality at the cluster level? I know I can add to cron but if this VM is add to HA or vm was migrate to other node than I need to add cron to all node. If vm is not in node than will show error on logs.
 
I guess, you could create a script that uses the PVE API to shutdown and start a 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!