• VMware vCenter Update Manager fails to upgrade the ESXi host at 92%.
  • Cannot upgrade from ESXi 6.0 to ESXi 6.7 using the ISO image.

OSError: [Errno 39] Directory not empty: /bootbank/state.XXXXXXX (where XXXXXXX is a number)

To resolve this issue, ensure that the /bootbank/state.XXXXXXXX directory is empty. 

To ensure the /bootbank/state.XXXXXXXX directory is empty:

  1. Log in to the ESXi using SSH with root account.
  2. Run this command:

    cd /var/log
     
  3. Using the grep command, find state.XXXXXXX and its corresponding directory within the vua.log file (replace XXXXXXX with the number indicated in the error)

    For example:

    grep state.31110473 vua.log
     
  4. Run these commands:

    cd /bootbank/
    ls -l

    Note: The preceding commands may also be required on /altbootbank because this directory can also hold state.XXXXXXX.
     
  5. Run this command to change directory to state.XXXXXXX directory indicated in the /var/log/vua.log file:

    cd state.XXXXXXX

    For example:

    cd state.31110473
     
  6. Run this command:

    ls -l

    You see an output similar to:

    -rwx—— 1 root root 18297 Jan 10 2011 local.tgz
     
  7. Note the name of the file within the state.XXXXXXX directory. For example, local.tgz.
  8. Run this command to move the files up one directory level:

    mv * ../

     
  9. In vCenter Server, remediate the host.
     
    1. Select the ESXi host.
    2. Click the Update Manager tab.
    3. Click Remediate.

Leave a comment