Update vSphere from command line

If you upgrade your vSphere hypervisor using command line, you may run into the following error:

esxcli software profile update -p ESXi-6.7.0-20181002001-standard -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
[Errno28]No space left on device
Please refer tothe log file formore details.
  • First, check with df -h the space available. Normally, 1 GB of space should be enough
  • Check the number of inodes with stat -f / or check available inodes by executing the df -i command
  • If you see enough space, enough inodes, delete some log files. you cab find them with
    find/-path"/vmfs"-prune-o-typef-size+50000k-exec ls-l'{}'\;
  • But the most probable thing that may cause the described error can be lack of RAM on the ESXi host. The host, basically, cannot allocate enough RAM for updating. This issue can be resolved by enabling ESXi
    system swap located on another datastore where RAM will be flashed during updates if the problem occurs.