Bobby Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/71500?usp=email )

Change subject: util: Add 'shutdown' argument option to vm_manager.sh
......................................................................

util: Add 'shutdown' argument option to vm_manager.sh

This allows for the VMs to be shutdown rather than destroyed. The can be
rebooted with `./vm_manager.sh` after shutdown.

Change-Id: I58329ec835af664bfb970b029e09ad16c5472015
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71500
Reviewed-by: Bobby Bruce <bbr...@ucdavis.edu>
Maintainer: Bobby Bruce <bbr...@ucdavis.edu>
Tested-by: kokoro <noreply+kok...@google.com>
---
M util/github-runners-vagrant/vm_manager.sh
1 file changed, 6 insertions(+), 2 deletions(-)

Approvals:
  Bobby Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/util/github-runners-vagrant/vm_manager.sh b/util/github-runners-vagrant/vm_manager.sh
index 0e2f4b7..ce46eb3 100755
--- a/util/github-runners-vagrant/vm_manager.sh
+++ b/util/github-runners-vagrant/vm_manager.sh
@@ -11,8 +11,8 @@
 param="up"
 if [[ $# -ge 1 ]]; then
     param=$1
-    if [[ "${param}" != "destroy" ]]; then
-        echo "Only valid parameter is 'destroy', to destroy all VMs"
+ if [[ "${param}" != "destroy" ]] && [[ "${param}" != "shutdown" ]]; then + echo "Only valid parameters are 'destroy' and 'shutdown' to destroy all VMs or shutdown all VMs"
         exit 1
     fi
 fi
@@ -23,6 +23,8 @@
sed -i "s/ config.vm.hostname.*/ config.vm.hostname = \"${RUNNER_PREFIX}${i}\"/g" Vagrantfile-runner
     if [[ "${param}" == "destroy" ]]; then
         VAGRANT_VAGRANTFILE=Vagrantfile-runner vagrant destroy -f
+    elif [[ "${param}" == "shutdown" ]]; then
+        VAGRANT_VAGRANTFILE=Vagrantfile-runner vagrant halt -f
     else
VAGRANT_VAGRANTFILE=Vagrantfile-runner vagrant up --provider=libvirt
     fi
@@ -33,6 +35,8 @@
sed -i "s/ config.vm.hostname.*/ config.vm.hostname = \"${BUILDER_PREFIX}${i}\"/g" Vagrantfile-builder
     if [[ "${param}" == "destroy" ]]; then
         VAGRANT_VAGRANTFILE=Vagrantfile-builder vagrant destroy -f
+    elif [[ "${param}" == "shutdown" ]]; then
+        VAGRANT_VAGRANTFILE=Vagrantfile-builder vagrant halt -f
     else
VAGRANT_VAGRANTFILE=Vagrantfile-builder vagrant up --provider=libvirt
     fi

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71500?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I58329ec835af664bfb970b029e09ad16c5472015
Gerrit-Change-Number: 71500
Gerrit-PatchSet: 3
Gerrit-Owner: Bobby Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Bobby Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-CC: kokoro <noreply+kok...@google.com>
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org

Reply via email to