Added utility function for halting all VBox VMs.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Tue, 07 Jun 2022 13:41:05 +0300
changeset 997 02ca7e4cc631
parent 996 17158fb949a8
child 998 1b3bc0a2de41
Added utility function for halting all VBox VMs.
.bashrc
--- a/.bashrc	Tue Sep 28 12:45:16 2021 +0300
+++ b/.bashrc	Tue Jun 07 13:41:05 2022 +0300
@@ -328,3 +328,9 @@
 -------------------------\n\
         total:  %{time_total}\n" "$@"
 }
+
+myvbox-halt-all() {
+  vboxmanage list runningvms |& tr -d '\r' | while read name uuid; do
+    vboxmanage controlvm "$uuid" acpipowerbutton
+  done
+}