view mrb/vm_pause.sh @ 0:9e5a3c884de6

Initial import of the virtual testbed.
author Sebastien Decugis <sdecugis@nict.go.jp>
date Thu, 17 Jun 2010 11:00:32 +0900
parents
children
line wrap: on
line source

#!/bin/bash 

# Check params
if [ -z "$1" ]; then echo "Donnez le nom de la VM en parametre"; exit 1; fi

# First, start the VM if needed
VBoxManage showvminfo "$1" |grep "^State:\s*running" >/dev/null || {
	echo $1 already stopped.
	exit 0
}

echo "Saving and stopping $1 for resuming later"

# Change console to the 5th (alt-F5)
VBoxManage controlvm "$1" savestate >/dev/null

# Done
"Welcome to our mercurial repository"