Upgrading large number of virtual machines to higher virtual machine version can be painstakingly laborious task if done manually using GUI tools, as a result virtual machine versions are usually left untouched, until it is absolutely necessary to upgrade to new version to unlock new vSphere features.
However, if your server gear is recent enough new with Intel Ivy Bridge generation CPUs, upgrading virtual machine version to more recent version could benefit some workloads in terms of improved performance and/or security. This is because of the fact that virtual machine version, with EVC level, dictates which CPU instructions are exposed by VMkernel to guest OS. To read more about differences in CPU instructions exposed to guest OS on different VM versions, see my other blog post.
So, is there anything that could be done to make virtual machine version upgrades easier?
Sure there is, use vCenter Orchestrator to schedule VM version upgrade on next guest OS reboot!
I developed few vCenter Orchestrator workflows to accomplish this task. With these workflows you can schedule VM version upgrade for single VM, or for all VMs within Resource Pool or VM Folder.
Workflows are divided in two main categories, Schedule and Cancel.
Schedule workflow will set VM version upgrade for next reboot of guest OS. If VM is powered off, it will be upgraded immediately. By default, VMs with out of date VMware Tools are not upgraded.
Cancel workflow clears pending VM version upgrade settings from virtual machines, but it WILL NOT revert already executed upgrades.
You can point both workflow types using respected workflow to following vCenter Server objects
- Single Virtual Machine
- Resource Pool
- Virtual Machine Folder
Common input parameters for schedule operations
Excluding target object, each schedule workflow have common input parameters
- New vmx version
- New virtual machine version
- Vmx upgrade policy
- always: Execute scheduled upgrade on any guest OS reboot or VM reset
- onSoftPowerOff: Execute scheduled upgrade on next power on task after a VM power off operation
- Ignore VMware Tools version
- Schedule or execute upgrade even if VMware Tools are out of date on target VM. May result in unexpected behavior and non-supported configuration, use with CAUTION!
Schedule VM version upgrade workflows pick default values from attributes included in vCenter Orchestrator configuration element VM version upgrade settings. Default settings may be changed to desired values.
Following attributes are included in VM version upgrade settings configuration element
- defaultVmx: default vmx-09
- Default vmx version for upgrades
- validVmx: default [ “vmx-07”, “vmx-08”, “vmx-09”, “vmx-10” ]
- Valid vmx versions, New vmx version input parameter list is populated using values in this array
Currently valid virtual machine versions
Below is a list of currently valid VM version levels, and non-complete list of VMware vSphere features which they support
|Vmx version||ESXi compatibility level||Supports|
|vmx-07||vSphere 4.x||8 vCPU|
255 GB vRAM
Changed Block Tracking
|vmx-08||vSphere 5.0||32 vCPU|
1 TB vRAM
New CPU instructions
|vmx-09||vSphere 5.1||64 vCPU|
vSGA GPU sharing
SE sparse VMDK
New CPU instructions
|vmx-10||vSphere 5.5||62 TB VMDK|
vSphere Flash Read Cache
AHCI SATA controller
vDGA GPU passthrough
Known behavior and caveats
Workflow behaviour and known limitations are described below, limitations listing may not be complete
- Schedule workflow does not check if requested VM version is actually supported by underlying ESXi host
- Target VMs must have up to date VMware Tools
- Already configured VMs are skipped during subsequent schedule operations with same parameters