The hardware version of a virtual machine reflects the virtual hardware features supported by a virtual machine. These features depend on the physical hardware available on the ESXi host on which the virtual machine is running.

Virtual hardware features include the BIOS and Extensible Firmware Interface (EFI), the maximum number of CPUs, the maximum memory configuration, and other hardware characteristics.

When you create a virtual machine, the default hardware version of the virtual machine is the most recent version available on the host where the virtual machine is created. For information about the latest VMware products and virtual hardware versions, see Virtual machine hardware versions (1003746).

To set a different than the default hardware version, call the setHardwareVersion(hardwareVersion) function of the com.vmware.vcenter.VMTypes.CreateSpec class. Use the HardwareTypes.Version class to define a valid hardware version for a virtual machine. For information about the hardware features available for the virtual hardware versions, see Hardware features available with virtual machine compatibility settings (2051652).

You can set a lower virtual hardware version of a virtual machine than the highest supported by the ESXi host on which the virtual machine is running. Setting a lower hardware version can provide flexibility and is useful in the following cases:
  • To help you standardize testing and deployment in your environment.
  • In case you do not need the hardware features of the latest hardware version of the host.
  • To maintain compatibility with hosts with a lower hardware version.