There are a couple of ways to setup Virtual Server 2005 so that a given script / program can be launched in response to a specific event – and each way has its advantages and disadvantages. To start with – I am going to talk about using the ‘scripts’ setting under the Virtual Server web interface. In order to do this you will first need to:
- Enable script support under the server properties
- Configure the virtual machine to run under a specific user account
The reason for the second requirement is that Virtual Server will launch the script under the user credentials that the virtual machine is running on – and if we didn’t require a user account to be manually specified – it would be possible for someone to trick you into running an arbitrary program with your credentials by getting you to start their virtual machine.
Once this is setup you can specify any executable program to be run on a specific virtual machine. Next week we will go over some common tasks that you could do in response to specific event.