How to make a Proxmox VM autostart with the qm command line tool?

Solution 1:

qm set $VMID --onboot 1

where $VMID is the numeric ID of your virtual machine. Obtained with qm list.