Ticket #3064 (new enhancement)

Opened 10 years ago

Last modified 9 years ago

Wanted pre-start post-stop scripts

Reported by: baf Owned by:
Priority: minor Component: VM control
Version: VirtualBox 2.1.0 Keywords:
Cc: Guest type: other
Host type: other


It would be very nice to be able to add a script/program so its run before resp after the vm.

Use case: VBoxManage setextradata global|<uuid>|<name> prestart /full/program/path_for_start

VBoxManage setextradata global|<uuid>|<name> postrun /full/program/path_for_stop

These programs would be called with the machine name as parameter and could mount/unmount partitions(nice for rawmdk) or check other conditions. If prestart fails(non-zero exit code) then the start would be aborted and whatever the script printed on stderr would be displayed.


prestart.diff Download (18.2 KB) - added by Christoph_vW 9 years ago.
patch (only tested on linux)

Change History

comment:1 Changed 10 years ago by baf

Another way would be to have hardcoded names that gets run if they exist. Same as before with exit status and showing output.

There could also be global start/stop scripts.

Changed 9 years ago by Christoph_vW

patch (only tested on linux)

comment:2 Changed 9 years ago by Christoph_vW

patch -> MIT license

comment:3 Changed 9 years ago by BasisBit

I would like to have this feature as well.

So if you start a special vm it should at first run your script....

comment:4 Changed 9 years ago by Haos

I second, it would be usefull for automated testing. Saves much time.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use