Virtual Machine Startup and Shutdown Behavior
- You can configure virtual machines (VM) and containers (CT) to start up and shut down with the host. Additionally, you can set the default timing and start-up order for selected VMs and CTs.
- Boot order is per-host and not per-cluster feature.
- Virtual machines without "order" starts after those with "order"
- Discussed here: http://forum.proxmox.com/threads/13619-Boot-order-questions?p=73428
Got to the VM option tab (KVM). First, you need to set the "Start at boot" to "Yes". Second, configure the "Start/Shutdown order".
- Start order: Defines the start order priority. E.g. set it to 1 if you start the VM on the first place . ( We use the reverse startup order for shutdown. )
- Startup delay: After starting this VM continue starting other VM´s or CT´s according to this delay (time in seconds). E.g. set it to 240 if you want to wait 240 seconds before starting other VM´s or CT´s.
- Shutdown timeout: This timeout is passed to the VM shutdown command. Default "Shutdown timeout" is 60 seconds for Containers and 180 seconds for VMs. On shutdown we use the following command for Vms:
# qm shutdown <vmid> --timeout <timeout>
This first sends an ACPI shutdown request to the VM. Normally The VM shut down normally and we can continue stopping other VMs. But sometime shutdown hangs, for example when ACPI shutdown is not allowed. Then we simply kill the VM after <timeout> seconds. - Dietmar
Note: these GUI settings are currently for KVM VM´s only. if you need to set bootorder for containers you need to set it via CLI (see 'man vzctl').
After 240 seconds, all other VM´s and CT´s should start.
- Set "Start at boot" to "Yes" for all VM´s and CT´s
- Set "Start/Shutdown order" according to the screeshot (Start order: 1; Startup delay 240; Shutdown timeout 120)
All automatic startup and shutdown actions are in the task log, see screenshot.
As the VM startup begins after the startup of the Apache web servers, you can monitor the startup of VM´s on an early stage via GUI.