Virtual Machine Action Scripts
In Parallels Cloud Server 6.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:
-
/var/parallels/MyVM/scripts/prestart
-
/var/parallels/MyVM/scripts/poststart
-
/var/parallels/MyVM/scripts/prestop
-
/var/parallels/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 you start or stop and
VM_HOME
is the full path to the virtual machine's directory.
Note:
Action scripts you create for a virtual machine cannot contain
prlctl
commands intended for performing operations on this virtual machine (e.g., assigning an IP address to the virtual machine).
|