ESXupdate error code 10

While scanning a ESXi 4.1.0 (build 348481) host from the host update manger tab to see if the host is still compliant. I got a error : The host returns esxupdate error code: 10. check the update log file and esxupdate.log files for more details


In my default installation there is no esxupdate logging enabled. So first step enable esxupdate log. Go to /etc/vmware/esxupdate/esxupdate.conf and make this file writable (chmod +w /etc/vmware/esxupdate/esxupdate.conf) edit the file and go to the [log] section and add /locker/db/esxupdate.log after file =. So the result should look like this.

esxupdate.conf file 

If you do another scan the log file will be used. When opening the logfile you will see a some Debug and Info lines  add the end of the log file i saw this line:

FileIOError: (‘/var/tmp/cache/metadata-704667013’, “Cannot create dir /var/tmp/cache/metadata-704667013: [Errno 17] File exists: ‘/var/tmp'”)

it looks like the san process does not have enough rights to make the directory. I solved this problem by this command on the command line: mkdir -p /tmp/scratch/var/tmp  the –p option is for no error if existing, make parent directories as needed. The problem can also be solved by a reboot but in my case that will cost me more time.