Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Virtualization / VMWare / How to Upgrade VM Hardware Version in VMware ESXi?

March 4, 2022 PowerShellVirtualizationVMWare

How to Upgrade VM Hardware Version in VMware ESXi?

In each new ESXi release, VMware updates the version of the virtual machine and the virtual hardware. In new versions of the VMware VMs, new functionality appears, new virtual devices are added, resource limits increased (PCI slots, RAM, vCPU), bugs are fixed, etc. So when migrating to a newer ESXi version it is desirable to upgrade the virtual hardware version on all virtual machines. It’s better to use older VM versions only for compatibility purposes. In this article, we’ll look at how to upgrade the virtual hardware version of a VM running on a VMWare ESXi host.

The compatibility of ESXi and VM hardware versions is shown in the table below.

 

Hypervisor Version VM Version
ESX/ESXi 4.X 7
ESXi 5.0 8
ESXi 5.1 9
ESXi 5.5 10
ESXi 6.0 11
ESXi 6.5 13
ESXi 6.7 14
ESXi 6.7 U2 15
ESXi 7.0 (7.0.0) 17
ESXi 7.0 U1 (7.0.1) 18
ESXi 7.0 U2 (7.0.2) 19

You can check the current virtual machine (virtual hardware) version on the Summary tab of the virtual machine in the Compatibility section. The screenshot below shows that VM version 18 (ESXI 7.0 U1 and later) is used.

Getting VM Hardware Version on VMware VM

VMware doesn’t recommend updating the virtual hardware version unless you need the new features provided by the new hw.

You won’t be able to run a VM on an ESXi host that doesn’t support the new version of the VM hardware. When trying to migrate such a VM to a host with an old version of ESXi using VMotion, an error will appear:

The virtual machine version is not compatible with the version of the host munexi1.

vmotion error The virtual machine version is not compatible with the version of the host exi1.

Before upgrading the VM version, it is recommended to:

  • Create a VM snapshot
  • Update VMware Tools. If you upgrade VM Hardware prior to installing the latest VMware Tools version, the network settings can be reset in the Windows guest virtual machine.

To upgrade the Virtual Hardware version, the virtual machine has to be stopped. After that right-click the VM and select Compatibility -> Upgrade VM Compatibility.

upgrade vm compatibility with vsphere client

Confirm the virtual hardware update and select the VM hardware version. In this example, I have selected the latest ESXi 7.0 U1 and later available on my host.

select new vm hardware version (compatible with)

You can schedule an automatic upgrade of the virtual machine hardware version the next time the VM is gracefully restarted.

  1. Select Compatibility -> Schedule VM Compatibility Upgrade in the VM context menu;
  2. From the Compatible with drop-down list, select the version of VM hardware version you want to upgrade to;
  3. Enable the option Only upgrade after normal guest OS shutdown; Only upgrade after normal guest OS shutdown (VMware shedule compatibility upgrade)
  4. The virtual hardware version of the virtual machine will be updated the next time the virtual machine is rebooted.

You can also update the VM Hardware version using PowerShell cmdlets from the VMware PowerCLI module. Connect to your vCenter or ESXi host:

Connect-VIServer esxi_hostname

List the virtual hardware versions of your virtual machines:

Get-VM | select Name, hardwareversion, PowerState

Check the Hardware Version of a Virtual Machine with PowerCLI

In newer versions of VMware ESXi, the HardwareVersion must be used instead of the VM’s Version attribute. A warning appears when using the old attribute name:

WARNING: The 'Version' property of VirtualMachine type is deprecated. Use the 'HardwareVersion' property instead.

To update the VM hardware version using PoweShell, run the command:

Set-VM -VM lon-fs03 -HardwareVersion vmx-19 -Confirm:$false

If the specified VM hardware version is not supported by the ESXi host, an error will appear:

The operation for the entity mytestVM1 failed with the following message: The operation is not supported on the object.

You can list the VMs that need to be upgraded using the Out-GridView cmdlet:

Get-VM |Where-object {$_.powerstate -eq "poweredoff"} | Out-GridView -PassThru | Set-VM -HardwareVersion vmx-19 -Confirm:$false

You will see a graphic table in which you need to select the VMs you want to upgrade (use the CTRL key to select multiple VMs).

PowerCLI select VMs to upgrading to the latest hardware version

You can schedule automatic hardware upgrades on all VMs on a host with a simple PowerShell script:

$AllVMs = Get-VM
Foreach ($VM in ($AllVMs)) {
$VMConfig = Get-View -VIObject $VM.Name
$vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
$vmConfigSpec.ScheduledHardwareUpgradeInfo = New-Object -TypeName VMware.Vim.ScheduledHardwareUpgradeInfo
$vmConfigSpec.ScheduledHardwareUpgradeInfo.UpgradePolicy = “always”
$vmConfigSpec.ScheduledHardwareUpgradeInfo.VersionKey = “vmx-19”
$VMConfig.ReconfigVM($vmConfigSpec)
}

All virtual machines will be automatically upgraded to the specified VM hardware version on the next reboot.

For centralized upgrading of VM hardware and VM tools in corporate networks, it is better to use vCenter Update Manager or vSphere Lifecycle Manager (VLCM) in vSphere 7+.

If you are using a free ESXi version (VMware vSphere Hypervisor), you won’t be able to the VM hardware version through PowerCLI due to API restrictions. But you can use the vim-cmd command in the ESXi shell:

Get the list of VMs on the server:

vim-cmd vmsvc/getallvms

Find the VMID of the VM you want to upgrade and specify it in the following command:

vim-cmd vmsvc/upgrade vmid vmx-17

vim-cmd vmsvc/upgrade vmid vmx-11

Start VM and make sure that it has been upgraded to VM version 17.

There is also another, unsupported version of updating the VM hardware version by directly editing the VM configuration file (VMX).

Connect to the ESXi host via SSH and go to the directory with the VM:

cd /vmfs/volumes/datastore_name/test_vm

Edit the test_vm.vmx file:

vi myvm.vmx

Find the config line:

virtualHW.version = "12"

And change to:

virtualHW.version = "17"

Save and close the VMX file ( Esc, :, w, q ).

0 comment
2
Facebook Twitter Google + Pinterest
previous post
Slow Access to Shared Folders and Network Drives in Windows
next post
Mailbox Audit Logging in Exchange and Microsoft 365

Related Reading

Finding Duplicate E-mail (SMTP) Addresses in Exchange

January 27, 2023

How to Disable or Uninstall Internet Explorer (IE)...

January 26, 2023

How to Delete Old User Profiles in Windows?

January 25, 2023

How to Install Free VMware Hypervisor (ESXi)?

January 24, 2023

How to Enable TLS 1.2 on Windows?

January 18, 2023

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Finding Duplicate E-mail (SMTP) Addresses in Exchange

    January 27, 2023
  • How to Delete Old User Profiles in Windows?

    January 25, 2023
  • How to Install Free VMware Hypervisor (ESXi)?

    January 24, 2023
  • How to Enable TLS 1.2 on Windows?

    January 18, 2023
  • Allow or Prevent Non-Admin Users from Reboot/Shutdown Windows

    January 17, 2023
  • Fix: Can’t Extend Volume in Windows

    January 12, 2023
  • Wi-Fi (Internet) Disconnects After Sleep or Hibernation on Windows 10/11

    January 11, 2023
  • Adding Trusted Root Certificates on Linux

    January 9, 2023
  • Fix: The Requested Certificate Template is Not Supported by This CA

    January 9, 2023
  • How to Remove Hidden/Ghost Network Adapters in Windows?

    December 29, 2022

Follow us

woshub.com

ad

  • Facebook
  • Twitter
  • RSS
Popular Posts
  • Configuring Port Forwarding in Windows
  • Installing RSAT Administration Tools on Windows 10 and 11
  • Manage Windows Updates with PSWindowsUpdate PowerShell Module
  • Start Menu or Taskbar Search Not Working in Windows 10/11
  • Get-ADUser: Find Active Directory User Info with PowerShell
  • How to Hide Installed Programs in Windows 10 and 11?
  • Configuring SFTP (SSH FTP) Server on Windows
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top