Schedule VM version upgrades with vCenter Orchestrator

Automate All the Things!

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.

Schedule VM version upgrade workflows
Schedule VM version upgrade workflows

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
Schedule VM version upgrade workflow schema
Schedule VM version upgrade workflow schema

Common input parameters for schedule operations

Excluding target object, each schedule workflow have common input parameters

Schedule VM version upgrade workflow input parameters
Schedule VM version upgrade workflow 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!

Configuration parameters

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.

VM version upgrade settings
VM version upgrade settings

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 versionESXi compatibility levelSupports
vmx-07vSphere 4.x8 vCPU
255 GB vRAM
Fault Tolerance
PVSCSI controller
Changed Block Tracking
vSphere Replication
vmx-08vSphere 5.032 vCPU
Intel E1000e
New CPU instructions
vmx-09vSphere 5.164 vCPU
vSGA GPU sharing
SE sparse VMDK
New CPU instructions
vmx-10vSphere 5.562 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

Workflow package download

One Reply to “Schedule VM version upgrades with vCenter Orchestrator”

Leave a Reply