VirtualBox

Opened 15 years ago

Last modified 15 years ago

#3064 new enhancement

Wanted pre-start post-stop scripts

Reported by: Bengt-Arne Fjellner Owned by:
Component: VM control Version: VirtualBox 2.1.0
Keywords: Cc:
Guest type: other Host type: other

Description

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.

Attachments (1)

prestart.diff (18.2 KB ) - added by Christoph von Wittich 15 years ago.
patch (only tested on linux)

Download all attachments as: .zip

Change History (5)

comment:1 by Bengt-Arne Fjellner, 15 years ago

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.

by Christoph von Wittich, 15 years ago

Attachment: prestart.diff added

patch (only tested on linux)

comment:2 by Christoph von Wittich, 15 years ago

patch -> MIT license

comment:3 by Stefan, 15 years ago

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 by Olaf Siejka, 15 years ago

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

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use