Configuring virtual machine scripts
Configuring virtual machine scripts
Virtual Server 2005 offers a way for you to assign scripts or command-line parameters to a virtual machine and execute them automatically based on certain virtual machine events. Before you can run a script on a virtual machine, you must do the following:
- Enable scripting for virtual machines. For instructions, see Enable or disable scripting for Virtual Server or virtual machines.
- Add a script to one or more virtual machine events. For instructions, see Add or remove a virtual machine script.
- Assign a user account to the virtual machine for the purpose of running scripts. For more information, see Modifying general virtual machine properties.
Important
For security reasons, you must configure the virtual machine user account to run in an appropriate security context before you run any scripts on the virtual machine. In other words, run the virtual machine under a user account with the lowest level of privileges required to run the script.
Virtual Server executes the command-line parameters or scripts that you specify for a virtual machine event. If Virtual Server cannot execute a command, this problem is recorded in the Virtual Server event log. However, if the command or script is executed but results in an error, the error cannot be recorded in the Virtual Server event log because Virtual Server only validates that the command or script was executed. For more information about how Virtual Server executes scripts, see Running scripts.