@h0bbel Do you know if I can script something against vCenter to duplicate (or create from template) VMs, and also start/stop them?
My immediate response, was of course to suggest using PowerCLI. Asbjørn, who works as a full time developer, jumped at PowerCLI immediately and within a very short time frame came up with a PowerCLI script for the task at hand.
You can download the script and play around with it, if you want. Inline documentation is in Norwegian, and if Asbjørn had intended to redistribute the script I’m sure he would have optimized it more than the current revision.
The point here isn’t the implementation itself, but rather the fact that he was able to put this automation routine together very quickly, and completely without prior knowledge to PowerCLI at all.
I do feel bad for not pointing him to PowerGUI and the VI Toolkit PowerPack before he sat down and crafted this in Notepad though. I’m sure he cursed me silently as soon as I pointed them out to him, as that combination makes this kind of automation so much easier.
- Redesigning the vCenter Client? —
- Exporting vCenter Events with PowerCLI —
- Auto Installation and Configuring of vSphere ESXi 5 —
- Setting Up Automated ESXi Deployments —
- VMware vSphere Hypervisor Licensing and Cost —