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. So I created the following script: http://poshcode.org/1214
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.
The following output will be shown at the PowerCLI console:
The next step will be the upgrade process of a regular VM. But for this process a need to capture the ip-address upgrade the vHardware and restore the ip-address into the VM. When I am finished with that part I am going to post Part 2.
4 thoughts on “PowerCLI: Upgrading vHardware to vSphere Part 1: Templates”
Thank you for writing thiss