VMware Tools upgrade fails with vix error code = 21009, due to missing "C:\Windows\Temp\vmware-SYSTEM" folder
search cancel

VMware Tools upgrade fails with vix error code = 21009, due to missing "C:\Windows\Temp\vmware-SYSTEM" folder

book

Article ID: 313617

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

When upgrading VMware Tools in a Windows virtual machine running on VMC SDDC, you may experience VMware Tools upgrade failure with the following error message.

Error message in vCenter WebUI: 
Error upgrading VMware Tools. vix error code = 21009


The following events are seen in vmware.log file 

YYYY-MM-DDTXX:XX:XX.XXXX In(05) vcpu-1 - TOOLS INSTALL Error copying upgrader binary /usr/lib/vmware/isoimages/windows.iso::VMwareToolsUpgrader.exe (=> C:\Windows\TEMP\vmware-SYSTEM\VMwareToolsUpgrader.exe) into guest, HgfsStatus = 1.
YYYY-MM-DDTXX:XX:XX.XXXX In(05) vcpu-1 - ToolInstall: Removing tools upgrade timeout handler
YYYY-MM-DDTXX:XX:XX.XXXX In(05) vcpu-1 - TOOLS INSTALL entering IDLE state.
YYYY-MM-DDTXX:XX:XX.XXXX No(00) vcpu-1 - ConfigDB: Setting toolsInstallManager.updateCounter = "2"
YYYY-MM-DDTXX:XX:XX.XXXX In(05) vcpu-1 - VigorConfig: hash updated
YYYY-MM-DDTXX:XX:XX.XXXX No(00) vcpu-1 - ConfigDB: Setting extendedConfigFile = "<VM NAME>.vmxf"
YYYY-MM-DDTXX:XX:XX.XXXX No(00) vcpu-1 - ConfigDB: Setting toolsInstallManager.lastInstallError = "21009"
---

Environment

VMware vCenter

VMware ESXi 

Cause

This issue occurs due to missing "C:\Windows\Temp\vmware-SYSTEM" folder in the guest OS of the target virtual machine, During the upgrade process the installer copies some binaries and installation files to the above location and fails to do so as the folder is missing. 

Resolution

In order to resolve this, please verify if there are any automatic tasks or operations that delete folders under "C:\Windows\Temp\" within the guest OS.

Please reboot the target virtual machine and confirm that the "C:\Windows\Temp\vmware-SYSTEM" folder is re-generated. Once the folder is available, perform the upgrade again. 

To workaround without reboot:

Restart tools:

From within the guest OS:

1.  Stopping and starting the VMTools service recreates the "C:\Windows\Temp\vmware-SYSTEM" folder.

2.  Launch a cmd.exe as administrator, and run the following commands:

sc stop vmtools

sc start vmtools

From the ESX Host:

1.  Perform an FSR (Fast Suspend Resume) on the VM in question.

2. Run the following command to get a list of all running VM's and their associated ID:

vim-cmd vmsvc/getallvms

3.  Find the ID of the VM in question, and replace it in the following command, then run the command:

vim-cmd vmsvc/power.suspendResume <vm-id>

 

After either of the above options is completed, the temporary folder should be present, and an auto-upgrade can be performed.

Additional Information