One of the blogs I’ve always enjoyed reading is ICT-Freak.nl. ICT-Freak is maintained by Arne Fokkema. Unfortunately Arne used to mix Dutch and English posts which means his blog is not aggregated on Planet V12n. This is why I wanted to point you out to the following awesome article:
With the release of vSphere VMware introduced a new hardware level for VM’s. De upgrade process to the new hardware level is already described on Scott Lowe’s blog: http://blog.scottlowe.org/2009/06/01/vsphere-virtual-machine-upgrade-process/.
I wanted to see if I could script this process with PowerCLI. My first goal was to upgrade al my templates.
The script does the following:
- Export template names to CSV
- Convert templates back to VM’s
- Check the vHardware version of the VM. If the hardware version is version 4 start the VM
- When the VM is ready check the VMware Tools version. If the VMware Tools are old, the script will install the new version.
- When the VMware Tools are Ok the VM gets a shutdown.
- When the VM is down, the vHardware will be upgraded
- The final step is converting the VM back to a template.
I stripped out the link to his script, please visit the source article and download the script over there.