Suppose, not entirely hypothetically, that you have a VM running on VMWare ESXi 6 that fails to boot due to some within-VM issue. For instance, perhaps it is an Ubuntu Linux system with unattended-upgrades active, a modest sized /boot partition, and nothing has been done to stop the accumulation of Ubuntu kernel images....

The obvious fix to this problem is:

  1. Boot the affected system from a live CD

  2. Tidy up the problem causing it not to boot (eg, remove some of the redundant Ubuntu kernel images with something like "sudo apt-get --purge autoremove", and reinstall the most recent one to ensure it is complete, including a completely initrd)

  3. Reboot the system

  4. (Optional, but desirable) do something to avoid the problem reoccuring :-)

  5. Declare success

Unfortunately if the VM is running in VMWare ESXi 6 or similar the first step in this process is the most complicated, because common configuration results in the POST screen clearing too quickly (in 0ms in the case of at least some VMs I had to fix for a customer!), the VM's BIOS default is to boot the hard drive first if there is an OS install on it, and hitting the reset button the VM will detach the virtual CD :-( (Plus if the system is a Linux system that has panic'd due to not being able to find its root file system, it will ignore Ctrl-Alt-Del, forcing a reset or power cycle which then detaches the CD....)

The most direct work around for systems managed by VMWare vCenter is:

  1. Download the live CD ISO image to somewhere accessible to either (a) the Windows vSphere client or (b) the ESXi host running the VM

  2. On the VM go to Edit Settings -> Options -> Boot Options and tick "Force BIOS Setup" to force entry into the BIOS setup screen on the next boot.

  3. Reset the affected VM (assumed to be okay, since it does not boot!)

  4. Observe direct entry into the BIOS setup

  5. Go to the Boot page in the PhoenixBIOS Setup Utility, and select the "Hard Drive" entry, and then use "-" to move it down the order to below the "CD-ROM" entry.

  6. F10 to save the change, and exit.

  7. Attach the live CD ISO image as a Virtual CD (eg, right click on the "CD" icon in the vSphere Client Console, and attach it)

  8. Use VM -> Guest -> Send Ctrl-Alt-Del to reboot the VM (which should work if you catch it while it is in the GRUB menu)

  9. Observe VM booting from the virtual CD.

  10. Fix issue, and reboot.

  11. (Optional, but possibly not desirable) Change boot order back by forcing another entry into the BIOS.

  12. Detach virtual CD, and if necessary (eg, too slow) reboot again

(There is similar workaround for VMWare ESXi and VMWare Fusion, but it involves manually editing the .vmx files, and reimporting them.)