Windows OS Hub
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux

 Windows OS Hub / Virtualization / Proxmox / Configure Autostart and Boot Order for VMs on Proxmox

October 10, 2025

Configure Autostart and Boot Order for VMs on Proxmox

By default, Proxmox doesn’t automatically start virtual machines when the server boots. An administrator must manually run all the required virtual machines. However, you can configure the VM to power on automatically when the Proxmox host starts.

To enable automatic VM startup:

  1. Select the VM in the Proxmox UI web interface
  2. Click Options
  3. To make the VM start automatically, enable the Start at boot time option. Proxmox: start VM at boot
  4. In the Start/Shutdown Order section, you can configure additional autostart options:
    *  Set the VM startup priority in the Start/Shutdown Order. If you specify 1 here, such a VM will be launched first. For VMs that start second, set it to 2. Continue in this way for subsequent VMs. This option allows you to configure the order in which VMs are started on the host. For example, DB hosts should start first, followed by application servers after some delay.
    * Startup Delay – startup delay for VM (in seconds).
    * Shutdown timeout – VM shutdown delay

Proxmox: startup order and delay

You can configure the automatic startup of a VM from the console using its ID.

# qm set <vmid> -onboot 1

To configure a delayed start-up for all virtual machines on a Proxmox host (for example, to wait for the network storage to boot), open the node properties -> System -> Options. Use the Start on boot delay parameter to configure the startup delay for all VMs (in seconds).

Start on boot delay

Or from the CLI:

# pvenode config set --startall-onboot-delay 120

The order in which Proxmox VMs are autostarted can be configured flexibly using a bash script. Use qm start <vmid> to run the VM and sleep to pause the script.

Create a .sh file:

# nano /root/start-vm-order.sh

Use the qm list command to get the VM IDs.

Configure the VM startup order and required delays:

#!/bin/bash
qm start 101
echo "Started VM 101"
sleep 60 # wait 60 seconds
qm start 102
echo "Started VM 102"
sleep 2m
qm start 103
echo "Started VM 103"

In this case, the first VM will start immediately, the second will start after 60 seconds, and the third will start after an additional two minutes.

Make the shell script file executable

# chmod +x /root/start-vm-order.sh

Configure a script to run automatically via Systemd.

# nano /etc/systemd/system/autostartvm.service

[Unit]
Description=Script to start Proxmox VMs
After=network.target
[Service]
Type=oneshot
ExecStart=/root/start-vm-order.sh
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

Enable the unit:
# systemctl enable autostartvm.service

Reboot the Proxmox host, then check that the script ran during boot and that your virtual machines started up in the correct order.

Check the systemd startup script execution log:

# journalctl -u autostartvm.service -b

check autostart logs on proxmox

Additional availability checks for specific servers, storage devices, or services can be added to the script.

For example, you can add a check for domain controller availability before starting a VM in your script:
#!/bin/bash
DC_SERVER="192.168.10.21"
MAX_RETRIES=10
RETRY_DELAY=15
attempt=1
while ! ping -c 1 -W 2 "$DC_SERVER" &> /dev/null; do
if [ $attempt -ge $MAX_RETRIES ]; then
echo "Domain Controller $DC_SERVER is not reachable after $MAX_RETRIES attempts. Aborting VM startup."
exit 1
fi
echo "Attempt $attempt/$MAX_RETRIES: Domain Controller is not reachable yet. Waiting $RETRY_DELAY seconds..."
sleep $RETRY_DELAY
attempt=$((attempt + 1))
done
echo "Domain Controller is reachable. Starting VM..."
qm start 101

In a Proxmox cluster with High Availability (HA) enabled, the ‘start on boot’ and ‘boot order’ parameters at the virtual machine (VM) level are ignored, as these are managed by the HA Manager.

0 comment
0
Facebook Twitter Google + Pinterest
ProxmoxQuestions and Answers
previous post
Resource Fair Sharing in Windows Server Remote Desktop Services (RDS)
next post
Force Stop an Unresponsive VM on Proxmox

Related Reading

How to Migrate (Import) VMs from VMware ESXi...

July 24, 2024

Proxmox: Share a Host Directory with VMs via...

August 21, 2025

Create a Windows Server VM on Proxmox (Step-by-Step)

July 15, 2025

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • Resource Fair Sharing in Windows Server Remote Desktop Services (RDS)

    October 6, 2025
  • How to Disable (Enable) Credential Guard in Windows 11

    October 6, 2025
  • Wrong Network Profile on Windows Server after Reboot

    September 30, 2025
  • How to Get Windows 10 Extended Security Updates After End-Of-Life

    September 24, 2025
  • Blocking NTLM Connections on Windows 11 and Windows Server 2025

    September 23, 2025
  • Windows Stucks at ‘Getting Windows Ready, Don’t Turn Off Computer’

    September 15, 2025
  • Clean Up ETL Log Files in ProgramData

    September 9, 2025
  • Fix: Slow Startup of PowerShell Console and Scripts

    September 3, 2025
  • DPI Scaling and Font Size in RDP (RDS) Session

    August 27, 2025
  • Proxmox: Share a Host Directory with VMs via VirtioFS

    August 18, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Migrate (Import) VMs from VMware ESXi to Proxmox
  • Proxmox: Share a Host Directory with VMs via VirtioFS
  • Force Stop an Unresponsive VM on Proxmox
  • Create a Windows Server VM on Proxmox (Step-by-Step)
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top