This repository has been archived on 2023-12-26. You can view files and clone it, but cannot push or open issues or pull requests.
hypervisors/ansible/roles/borg/files/stop_vms.sh

10 lines
189 B
Bash
Raw Normal View History

2023-04-25 20:02:00 +00:00
#!/bin/bash
for i in $(virsh list --state-running --name --autostart); do
virsh shutdown "$i"
echo Stopping domain "$i"
until virsh domstate "$i" | grep shut; do
sleep 0.5
done
done