Virtual Machine Action Scripts
In Parallels Server Bare Metal 5.0, you can create custom scripts and configure them to run when you start or stop virtual machines. The following custom scripts are currently supported:
-
prestart
: this script is executed before a virtual machine is started.
-
poststart
: this script is executed after a virtual machine is started.
-
prestop
: this script is executed before a virtual machine is stopped.
-
poststop
: this script is executed after a virtual machine is stopped.
Action scripts specific for virtual machines must be placed to the
/scripts
subdirectory in the virtual machine's home directory. For example, assuming that you created the
MyVM
virtual machine in the default directory, the paths to the scripts must be as follows:
-
/vz/vmprivate/MyVM/scripts/prestart
-
/vz/vmprivate/MyVM/scripts/poststart
-
/vz/vmprivate/MyVM/scripts/prestop
-
/vz/vmprivate/MyVM/scripts/poststop
The information to scripts is passed using the
UUID
and
VM_HOME
variables, where
UUID
is the ID of the virtual machine that is started or stopped and
VM_HOME
is the full path to the virtual machine directory.
|