Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Virtualbox script help

Featured Replies

I would like some help scripting a shutdown routine for multiple virtualbox vm's. Here is the command line sequence that works fine, I just need a little help scripting the variables so it will work for anyone.

vboxmanage list runningvms

returns the list of running vms one per line in the format

"VMName" {long vm id code}

Which needs to be fed one at a time to this line

vboxmanage controlvm "VMName" savestate

Which returns a status of

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

at which point it returns to the command line.

When

vboxmanage list runningvms

returns to the command line with no entries, the script should exit.

 

What I envision is a variable that gets filled by whatever is between the quotes in the first line returned by the list command, if that variable is empty, exit the script, else issue the savestate with that variable, wait for the status to return, and rerun the list command.

 

Any help?

Thanks.

  • Author

Here's what I've found so far. I'd like to echo the output to the syslog instead of the console.

vboxmanage list runningvms|cut -d\" -f2 |while read VM; do
echo "Saving state and powering off VM: $VM ..."
vboxmanage controlvm "$VM" savestate
done

Any help?

I suspect if you read here about the "logger" command it will work but having NO experience with this I could easily be wrong.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.