-
Ensure that your VMs can shutdown gracefully when the power-button is pressed.
-
Place the file
vm-boot-order.pyin/optdirectory -
Make it executable:
chmod +x /opt/vm-boot-order.py -
Check that the script starts and shuts down your VMs as expected. The script can be executed as follows:
/opt/vm-boot-order.py start /opt/vm-boot-order.py stop /opt/vm-boot-order.py status -
Make a systemd service to execute the script when booting or shutting down the hypervisor: