VMware Tools installation and upgrade tips and tricks

The VMware Tools package provides drivers (such as VMXNET3, PVSCSI, SVGA etc.) and services that enhance the performance of virtual machines and make several vSphere features easy to use. Here are some tips and tricks when working with VMware Tools:

  • An overview of the VMware Tools versions mapping can be found here, link
  • The latest VMware Tools versions can be downloaded from here, link
  • Within VMware ESXi, the VMware Tools are located under: /vmimages/tools-isoimages
  • The latest VMware Tools version 10.3.10 is compatible with ESXi 6.0.0 to 6.7 U3
  • To view what VMware Tools components are installed on a Windows operating system: open Regedit and browse to the following location.
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Features\10176710886A59A4C938D6DEE96B37D5

Names with a squire or minus are not installed. Another method in Windows 10 for example is going to the Apps & Features and select: modify VMware Tools

  • A silent or unattended default installation can be done using the following command. This command does not installed the NSX components:
 Setup64.exe /s /v "/qb REBOOT=R" /l c:\windows\temp\vmware_tools_install.log

  • Use the ADDLOCAL and REMOVE option to define what components to install. The following command installs all the components expect the Hgfs, SVGA,VSS, AppDefense and the NetworkIntrospection component. This VMware Tools configuration can be used for example for a Horizon View Golden image.
setup64.exe /s /v" /qb REBOOT=R ADDLOCAL=All REMOVE=Hgfs,SVGA,VSS,AppDefense,NetworkIntrospection"" /l c:\windows\temp\vmware_tools_install.log

The following VMware Tools component values can be used:

Component Values Component Description
Drivers Audio Audio driver for 64-bit Operating Systems
BootCamp Driver for Mac BootCamp Support
MemCtl VMware Memory control driver for memory management
Mouse VMware mouse driver
PVSCSI VMware Paravirtual SCSI adapter
SVGA VMware SVGA driver
Sync Filesystem Sync driver, which enables backup applications to create application-consistent snapshots. This driver is used if the guest operating system is earlier than Windows Server 2003. Newer operating systems use the VSS driver.
ThinPrint Driver that enables printers added to the host operating system to appear in the list of available printers in the virtual machine. VMware Tools does not support ThinPrint features for vSphere 5.5 and later.
VMCI Virtual Machine Communication Interface driver. This driver allows virtual machines to communicate with the hosts on which they run without using the network
Hgfs VMware shared folders driver. Use this driver if you plan to use this virtual machine with VMware Workstation, Player, or Fusion. Excluding this feature prevents you from sharing a folder between your virtual machine and the host system.
VMXNet VMware VMXnet networking driver.
VMXNet3 Next-generation VMware VMXnet networking driver for virtual machines that use virtual hardware version 7 and higher (ESX(i) 4.x and higher)
FileIntrospection NSX File Introspection driver, vsepflt.sys.
NetworkIntrospection NSX Network Introspection driver, vnetflt.sys.
VSS Driver for creating automatic backups. This driver is used if the guest operating system is Windows Vista, Windows Server 2003, or other newer operating system. Linux and older Windows operating systems use the Filesystem Sync driver.
AppDefense VMware AppDefense component. The AppDefense components consists of glxgi.sys kernel mode driver and gisvc.exe user mode service.
Toolbox Perfmon Driver for WMI performance logging.

The latest version of the VMware Tools component values can be found here, link

PowerCLI

To identify and upgrade the VMware Tools versions PowerCLI is your friend. First install the PowerCLI module, link. After the module is installed, connect to the vCenter Server.


$vcsa = "vcsa03.lab.local"

Import-Module VMware.PowerCLI
Connect-VIServer -Server $vcsa

Identify VMware Tools versions

To get the VMware Tools versions of the running VMs use the following PowerCLI command:

Get-VM | Get-VMguest | Where {$_.State -eq 'Running'} | Select VmName, ToolsVersion
  • Get all the running VMs that don’t have VMware Tools version 10.3.10 installed:
Get-VM | Get-VMguest | Where-Object {$_.State -eq 'Running' -and $_.ToolsVersion -notlike '10.3.10'} | Select VmName, ToolsVersion
  • Get all the running VMs that have an outdated version of VMware Tools:
Get-VM | Get-VMguest | where-object {$_.State -eq 'Running' -and $_.ExtensionData.ToolsversionStatus -eq 'GuestToolsNeedUpgrade'} | Select VmName

Update VMware Tools

Once you have an overview of all the VMware Tools versions that are outdated is easy to upgrade them to the latest version. In this example, the -NoReboot option is used so the OS will not be rebooted. Make sure when using -NoReboot option that the reboot will be planned in a maintenance window. This stops for example installing Windows Updates because there is a pending reboot action that needs to be performed first.

First export all the VMs to a CSV file that will be saved under c:\temp\vms.csv

 
Get-VM | Get-VMguest | where-object {$_.State -eq 'Running' -and $_.ExtensionData.ToolsversionStatus -eq 'GuestToolsNeedUpgrade'} | Select VmName | export-csv c:\temp\vms.csv -NoTypeInformation

Verify the CSV file and make sure only the VMs are listed that need to be upgraded. After that import the CSV and update the VMware Tools using the following commands:

$vms = Import-Csv c:\temp\vms.csv
$vms | % { get-vm -name $_.VmName | Update-Tools -NoReboot}

 

Runecast Analyzer makes hardware checking against the VMware HCL easy

Runecast Analyzer is a tool that helps VMware administrators to proactive manage there vSphere environment. It discovers potential risks in the VMware environment before they can cause a major outage. It uses best practices, security hardening guides (VMware, DISA STIG, PCI-DSS v3.2.1 and HIPAA) and known issues found in the VMware Knowledge Base to protect the Software Defined Data Center (SDDC).  Runecast Analyzer supports the following VMware products:

  • VMware vSphere
  • VMware vSAN
  • VMware NSX-V
  • VMware Horizon

Runecast Analyzer introduced a new feature called “Automated VMware HCL” and “ESXi Compatibility Simulation“. The “Automated VMware HCL” feature checks the VMware ESXi host hardware, driver and firmware versions against the VMware Hardware Compatibility List (HCL). The VMware Hardware Compatibility List (HCL) lists all the physical hardware components, driver and firmware versions that are supported by VMware. Keeping the hardware aligned with the VMware HCL is essential for a healthy, stable and supported VMware environment but can be difficult to perform. For example see the blog post below how to identify a networkcard and the supported driver.

Identify NIC driver and supported driver version for ESXi server

 

Within the “Automated VMware HCL” feature you can enable “ESXi Comparability Simulation“. ESXi comparability simulation checks the existing hardware against a newer VMware ESXi version before upgrading to this new version so you can verify if the hardware, driver and firmware levels are supported.

Automated Hardware Compatibility

After deploying the Runecast Analyzer appliance and connecting to one or more vCenter Servers, the first scan can be performed by clicking on the purple “Analyze Now” button. When the scan is completed select “HW Compatibility” on the left menu bar. By default all ESXi hosts are listed. In the action pane you can specify a specific clusters or one or more host(s).

The screenshot shows the host, ESXi release, hardware summary and the compatible status of the BIOS and I/O devices. The BIOS and I/O Devices are red in this example which means they need attention. All the hardware, firmware and driver  results can be exported to a CSV file. Per ESXi host you can drill down to the server hardware.

The BIOS state needs an update, it’s reported as possible incompatibility “Not Found” in the HCL Data field. When clicking on the “HCL online” button we’ve got redirected to the VMware Compatibility List (HCL).

The VMware HCL tells that the BIOS level that matches is version 1.2. After the BIOS view we go to the I/O devices by clicking on the I/O Devices tab

The Intel I350 Gigabit and the Samsung NVMe SSD Controller needs attention. When looking at the Intel I350 in the HCL we see that the the firmware level is okay and that the installed driver version is 0.1.1.0 is old. The HCL reports that version 1.4.1 is needed.

ESXi Compatibility Simulation

With the Hardware Compatibility Overview there is another feature called “ESXi Compatibility Simulation“.  ESXi Compatibility Simulation checks the existing hardware against a newer VMware ESXi version before upgrading to this new version so you can verify if the hardware, driver and firmware levels are supported.

After turning on the ESXi Compatibility Simulation feature and selecting the ESXi version to upgrade to you can fire the simulation. In this environment I want to upgrade to ESXi 6.7 U2 and it shows that the BIOS not compatible.

Conclusion

It can be difficult and time consuming for VMware admins to check if the server hardware is aligned with the VMware Hardware Compatibility List (HCL) for maintaining a healthy, stable and supported environment. Runecast Analyzer makes this very easy and fast by performing a simple scan and see if the hardware of the VMware environment is complaint with the VMware HCL.

Another great feature is the ESXi Compatibility Simulation. Again with a simple scan you check if the hardware is compatible against a newer version of ESXi before actually upgrading to this version. The Automated Hardware Compatibility and ESXi Compatibility Simulation are great new features that saves a lot of value time investigating if the VMware environment is compliant.

You can download a 30 day full trial version of Runecast Analyzer and try it yourself.

 

PowerCLI installation, updating and troubleshooting tips

PowerCLI is a must have tool for every VMware Administrator when you want to automate something in your VMware environment. In this blog I highlight the installation, updating and some troubleshooting tips for deploying and running PowerCLI on Windows OSes.

PowerCLI installation

  • Uninstall PowerCLI 6.x and earlier from the Add/remove programs or Programs and Features if exist.
  • Make sure you have a internet connection.
  • Check if Windows Management Framework 5.1 is installed for Windows 7,8 and Windows Server 2012 R2 and earlier OSes. Open PowerShell en enter:
$PSVersionTable
PS C:\$PSVersionTable

Name Value
---- -----
PSVersion 5.1.17763.592
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.592
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
  • If WMF 5.1 is not installed. Install the WMF 5.1 can be downloaded here, link. Windows 10, Windows Server 2016 and above have PowerShell version 5.1 already installed.
  • Installation PowerCLI
PowerCLI installation with admin rights:
Install-Module VMware.PowerCLI

Use the -AllowClobber when you get: A command with the name 'Export-VM' is already available on this system.
Install-Module VMware.PowerCLI -AllowClobber

Installation of PowerCLI without admin rights:
Install-Module VMware.PowerCLI -Scope CurrentUser

These modules are installed in the %homepath%\Documents\WindowsPowerShell\Modules
  • Allow the execution of local scripts
Admin rights needed:
Set-ExecutionPolicy RemoteSigned
  • Disable certificate checking and CEIP
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false -ParticipateInCeip $false

Updating PowerCLI

The following steps can be used to update a PowerCLI 10 or 11 installation

  • Make sure you have a internet connection.
  • Check the PowerCLI version
Get-Module VMware* -ListAvailable
  • Update the existing PowerCLI version
Update-Module -Name VMware.PowerCLI
  • Check the version of PowerCLI
 
Get-Module -Name VMware.PowerCLI -ListAvailable

Troubleshooting PowerCLI

The following troubleshooting options can be used when having problems with the installation and running of PowerCLI such as:

Could not load file or assembly……………….

  • Disable the Anti Virus.
  • Uninstall PowerCLI 6.x and earlier from the Add/remove programs or Programs and Features if exist.
  • Uninstall PowerCLI.
Get-Module VMware.PowerCLI -ListAvailable | Uninstall-Module -Force
  • Check the  paths for VMware modules entries in the path. Remove VMware folder if exist.
$env:PSModulePath.Split(';')
  • List All the VMware modules and remove VMware modules.
Get-Module -Name VMware* -ListAvailable
  • Check for old PowerCLI modules and installation such as:
C:\Program Files (x86)\VMware\Infrastructure\PowerCLI\Modules
  • List registered snapins.
Get-PSSnapin -registered
  • Delete the registry keys of the old PS snapins.

  • Reboot the Windows system.

Try to install the PowerCLI module using a clean install as described above.