Is it possible to script the configuration of Virtual Machine Startup/Shutdown on a ESXi host?
Thanks
There are some scripts out there who can do this but I think this one can help you:
http://ict-freak.nl/2009/06/09/powercli-set-vm-startup-policy/
Keep in mind that this won't work if you are using an HA cluster as already mentioned.
Even tho you can configure this via the vSphere client there are ways to do this by using the vCLI or esxcli commands.
Any specific reason why this has to be done using shell?
Hi Nielse,
I have two identical VMs on thousands of clusters I wish to configure the startup/shutdown setting on. Rather than performing the tedious myself I am looking to script it. This could then be used on any future deployments.
Do you have an example of this?
Thanks.
Luke
There are ways to configure it using PowerCLI, would this be an option or does it have to be using a perl or bash script? Also which version of vSphere/vCenter are you running?
Hi Nielse,
PowerCLI would actually be prefered.
Thanks,
Luke
Are you doing this against hosts that are in HA clusters? Setting the automatic Virtual Machine Startup/Shutdown settings is not supported in an HA cluster:
There are some scripts out there who can do this but I think this one can help you:
http://ict-freak.nl/2009/06/09/powercli-set-vm-startup-policy/
Keep in mind that this won't work if you are using an HA cluster as already mentioned.