Temporarily disable "Start at boot" for all vms for service reasons

grl

Renowned Member
Oct 20, 2011
24
1
68
Hi!

Is there a way to disable the "start at boot" option for all vms temporarily without changing the config of each vm?

When doing maintenance on the host it would be convenient to reboot the host without all the vms running on it. As far as I can see I have to change the config of each vm, remembering which one was on autostart and which was not.

Then doing the maintenance, then resetting the Boot at start option for each vm.

It would be really nice to have a general option: "Do not autostart vms on this proxmox host" - so you could enable that, do your maintenance work, reboot at will and if everything is fine again just disable the option again...

Or is there a way to do that that I didn't see?

Regards
Luggi
 
Afaik, there is no single button that you can press to do so.
You can create an easy script that does this for you. The pseudo code would be:
if argument startupoff
process "pvesh get /cluster/resources --output-format json" find all VMs with start up ON,
tag them with "startupon"
disable startup
if argument startupon
process "pvesh get /cluster/resources --output-format json" find all VMs with tag=startupon
enable startup on boot

good luck


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Its also possible to:
A.) kill the "Starting all guests" task so it will only try to start the first VM and skip all the other ones
B.) temporarily set something really high for the node-wide start delay at "YourNode -> System -> Options -> Start on boot delay". With delay of 600000 you should get a week to do your maintainance before it tries to start the first guest.
 
Last edited:
  • Like
Reactions: leesteken

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!