Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • 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 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

June 8, 2023 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 VersionVM Version
ESX/ESXi 4.X7
ESXi 5.08
ESXi 5.19
ESXi 5.510
ESXi 6.011
ESXi 6.513
ESXi 6.714
ESXi 6.7 U215
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

How to Connect VPN Before Windows Logon

November 14, 2023

Send Emails with Microsoft Graph API and PowerShell

November 6, 2023

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

October 15, 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

  • How to Connect VPN Before Windows Logon

    November 14, 2023
  • Removing Azure Arc Setup Feature on Windows Server 2022

    November 9, 2023
  • Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

    November 7, 2023
  • Send Emails with Microsoft Graph API and PowerShell

    November 6, 2023
  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Fix: Remote Desktop Licensing Mode is not Configured
  • Manage Windows Updates with PSWindowsUpdate PowerShell Module
  • Configuring Port Forwarding in Windows
  • Start Menu or Taskbar Search Not Working in Windows 10/11
  • How to Install Remote Server Administration Tools (RSAT) on Windows
  • How to Delete Old User Profiles in Windows
  • Get-ADUser: Find Active Directory User Info with PowerShell
Footer Logo

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


Back To Top