"Start at boot" change to "No"

leila

New Member
Apr 26, 2023
13
0
1
Hello

I have a lot of VMs and I want the status of the "Start at boot" change to "No" in all of them at the same time.

Thank you for your guidance.
 
You could write a script/one-liner that loops though all VMIDs and then runs qm set <VMID> --onboot 0.
 
  • Like
Reactions: leila
This should work for all VMs of the cluster:
for vmid in $(cat /etc/pve/.vmlist | grep '"type": "qemu"' | cut -d '"' -f2); do qm set ${vmid} --onboot 0; done
and this for LXCs:
for vmid in $(cat /etc/pve/.vmlist | grep '"type": "lxc"' | cut -d '"' -f2); do pct set ${vmid} --onboot 0; done
 
  • Like
Reactions: leila
This should work for all VMs of the cluster:
for vmid in $(cat /etc/pve/.vmlist | grep '"type": "qemu"' | cut -d '"' -f2); do qm set ${vmid} --onboot 0; done
and this for LXCs:
for vmid in $(cat /etc/pve/.vmlist | grep '"type": "lxc"' | cut -d '"' -f2); do pct set ${vmid} --onboot 0; done
I tested it and it worked perfectly.
My problem is completely solved.
Thank you very much for your time to solve my problem.
 

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!