Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- ## Read VM info and print short summary about given VM
- # $Id: vboxvminfo.sh 138 2015-02-11 04:01:20Z anrdaemon $
- #
- test -r "$HOME/.VirtualBox/VirtualBox.xml" -o -r "$HOME/.config/VirtualBox/VirtualBox.xml" || {
- echo "VirtualBox main configuration file is missing. Check \$HOME path and setuid name." >&2
- exit 1
- }
- eval $(/usr/bin/VBoxManage showvminfo "$1" --machinereadable 2> /dev/null | /bin/egrep "^(name|UUID|CfgFile|VMState)" || {
- echo "Unable to get state for '$1'. Check VM registration and name spelling." >&2
- echo exit 1
- })
- echo "Machine '$name' {$UUID}"
- echo "Config file '$CfgFile'"
- echo "Machine is in '$VMState' state since ${VMStateChangeTime}."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement