Virtualbox auf dem Laptop: Automatisch VMs runterfahren bei Suspend

Ich mag es, dass mein Laptop Suspend machen kann. Er bleibt im aktuellen Zustand, verbraucht keinen Strom, ich kann ihn einfach mitnehmen.
Bei virtuellen Maschinen kann das ein Problem werden - muss nicht, aber kann. Es passiert immer wieder dass diese dann plötzlich ausgeschaltet sind (irgendein Hickup zwischendurch). Daher habe ich nach einer Methode gesucht, mit der ich Virtualbox anweisen kann, bei einem Suspend alle Maschinen automatisch zu speichern und anzuhalten.

Gefunden habe ich tatsächlich etwas; auf askubuntu.com. Das habe ich allerdings modifiziert, bei mir sieht das Script wie folgt aus:


#!/bin/sh
#
# 90virtualbox: scan for active virtual machines and savestate them on host suspend

VBoxManage list runningvms | while read line; do VBoxManage controlvm "$(expr match "$line" '"\(.*\)"')" savestate; done



Mal sehen ob es so funktioniert wie ich es mir erhoffe.
Vote for articles fresher than 7 days!
Derzeitige Beurteilung: none, 0 Stimme(n) 4550 hits

Trackbacks

Trackback specific URI for this entry

This link is not meant to be clicked. It contains the trackback URI for this entry. You can use this URI to send ping- & trackbacks from your own blog to this entry. To copy the link, right click and select "Copy Shortcut" in Internet Explorer or "Copy Link Location" in Mozilla.

No Trackbacks

Comments

Display comments as Linear | Threaded

No comments

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA