From adac0ed6a89d2171b0f786d85206493cda4b39d4 Mon Sep 17 00:00:00 2001 From: Sheppy Date: Sat, 23 Nov 2024 12:41:42 +0000 Subject: [PATCH] add: vm shutdown script --- helper_scripts/shutdown-vms.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 helper_scripts/shutdown-vms.sh diff --git a/helper_scripts/shutdown-vms.sh b/helper_scripts/shutdown-vms.sh new file mode 100755 index 0000000..fd4701c --- /dev/null +++ b/helper_scripts/shutdown-vms.sh @@ -0,0 +1,8 @@ +#!/bin/bash +for vm in $(virsh list --state-running --name); do + echo $vm + virsh shutdown "$vm" +done +while virsh list | grep running; do + sleep 5 +done