1 contributor
[Unit]
Description=Resume PVE VMs manually
Documentation=man:qm(1)
# Only run if we have a state file from previous suspend
ConditionPathExists=/var/lib/pve-manager/pgs-state.json
# We need pve-cluster for /etc/pve access
Requires=pve-cluster.service
After=pve-cluster.service
# Run after storage is available
After=pve-storage.target
# Run before the standard pve-guests service to handle our VMs first
Before=pve-guests.service
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/pgs resume -v
# Allow generous time for VMs to resume
TimeoutStartSec=900
Restart=on-failure
RestartSec=20
[Install]
WantedBy=multi-user.target