Recovering VM That Will Not Boot

Sometimes a VM will not successfully boot because there is a reference to a volume that is is not accessible.  That reference would typically be in the /etc/fstab file on the root volume.  To recover from such an occurrence, you can try the following steps:

  1. Open a console connection with the VM by selecting the console button.
  2. Reboot the VM.  Interrupt the grub bootloader before it launches the boot process by pressing a key during the countdown.
  3. Move the cursor onto the first line beginning with "kernel"; press "e".
  4. Move the cursor to the end of that line and type "single"; press Return.
  5. Press "b" to boot using the modified kernel parameter.  
  6. Login as root.  The root volume will be in read-only mode. You will need to change it to read/write by typing "mount -t ext3 -o rw,remount /dev/sda1 /".
  7. Edit fstab by typing "vi /etc/fstab".
  8. Navigate the cursor to the line controlling the volume that cannot be accessed.  Type "I", then insert a # at the beginning of the line.
  9. Press Escape then type "wq".  That will save the change and exit the editor.
  10. Reboot.

If you have done all of this, your VM should reboot successfully, provided of course, that was the only problem causing the failure.

Related Pages: Extending a Linux volume