Backtrack:  
 
by lunarg on March 19th 2015, at 12:39

Using the vSphere (Web) Client, it is only possible to "upgrade" your virtual hardware to the latest version supported by your ESX host. Sometimes, it's necessary to set the hardware version to a specific version, rather than just the latest supported one. This can be done through PowerCLI (for use with vCenter) or ESXi Shell (for free ESXi).

Before you begin, note that you have to power down a VM before you can change the hardware version.

PowerCLI

You need VMWare vSphere PowerCLI installed on a computer, and access to a vCenter server (can be appliance or full version for Windows) with the necessary credentials.

Connect to the vSphere server:

$cred = Get-Credential
Connect-VIServer -Server <vcenter-server> -Credential $cred

Once connected, you can list all the registered VMs and their hardware version:

Get-VM | Select Name,Version

To set the version for a particular VM:

Set-VM -VM <vm-name> -Version v<hw-version-number>

Example: change the version for a server called SRV01 to version 9: Set-VM -VM SRV01 -Version v9

ESXi Shell

For free ESXi, you can use the shell to set the hardware version.

Log in on the ESXi shell, either at the server itself, or through SSH.

First, you need to retrieve the VM-ID of the VM you want to change the hardware version for. The command to change the version only accepts a reference to the VM by its VM-ID:

vim-cmd vmsvc/getallvms

You get a list of all VMs running on the ESX host. The first column contains the VM-ID you need.

To actually change the hardware version for a VM:

vim-cmd vmsvc/upgrade <VM-ID> vmx-<hw-version-number>

Example: change the version for a server with a VM-ID of 10 to version 9: vim-cmd vmsvc/upgrade 10 vmx-9

Manually edit the .vmx file

Although not officially supported, you can also manually change the hardware version of a VM by manually editing its .vmx file.

Depending on what product you're using, download the .vmx-file to your computer, and open it with a plain text editor (such as Notepad).

Look for the line that starts with:

virtualHW.version = "a-number"

Change the number to the hardware version you want. Save the file, then upload the file back to the original location, overwriting the old one.

Be careful when using this method. Using the CLI checks whether the requested hardware version change is possible with the current configuration of the VM. Manually changing the hardware version does not provide this control mechanism. A combination of an unsupported hardware version, along with the presence of certain virtual hardware and/or settings, could result in your VM no longer operating properly when the hardware version is changed.

Try powering up your VM. If it does not power on, revert to the previous hardware version.

Limitations

There are limitations to which hardware version you can select:

  • You cannot downgrade a VM if it contains hardware not supported by the lower hardware version.
  • You cannot start a VM with a hardware version higher than what is supported by the underlying ESX host (e.g. an ESX 4.x cannot run HW version 8 or higher).
  • Not all products can properly downgrade a VM.

More information about hardware versions, and which VMWare products support which versions can be found here: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003746

 
 
« November 2024»
SunMonTueWedThuFriSat
     12
3456789
10111213141516
17181920212223
24252627282930
 
Links
 
Quote
« You only find out who is swimming naked when the tide goes out. »
Warren Buffett