"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.