During a recent upgrade I found that one of the ESXi hosts just would not update using Update Manager. The error I was seeing was “Cannot run upgrade script on host”.
After a bit of searching I found this article which related to ESXi 5.1 upgrade to 5.5 but the steps worked well to fix the issue I was seeing.
In order to fix the issue I performed the following steps:
Step 1: Disable HA for the cluster
Step 2: Go to vCenter Networking. Select the distributed vswitch and then select the hosts tab. From here, right-click on the host you need to reboot and select Remove from vSphere Distributed Switch
Click Yes to remove the host from the switch.
Step 3: Remove the host from the cluster
Step 4: Enter the host into maintenance mode and then choose to reboot.
Step 5: Connect via SSH to the ESXi host and run the following commands to uninstall the FDM agent:
cp /opt/vmware/uninstallers/VMware-fdm-uninstall.sh /tmp
chmod +x /tmp/VMware-fdm-uninstall.sh
Step 6: Reboot the host
Step 7: Add the ESXi host back to the cluster
Step 8: Re-add the host to the Distributed vSwitch. Go to Networking -> select the distributed vswitch. Right-click and select Manage Hosts.
Select the host
Select vnics for Uplinks to be managed by the switch
Step 9: Turn vSphere HA back on for the cluster the host resides on.
Step 10: Run the upgrade again from Update Manager and this time it will work.