How to fix non booting VMware Player / ESXi VM, due to corrupt file system.

How to fix non booting VMware Player / ESXi VM. This can be caused when a vm is incorrectly powered off or your server loses power. 

1.1error.png

Above is an example from a broken installation.

This is most often caused when the host PC or VM is switched off mid write-cycle, causing the virtual hard disk to become corrupted. You may see the error "No init found. Try passing init= bootarg.". To fix you need to attach a CDROM drive to the host VM and boot into a Linux LiveCD and fix the file system. Here's what to do, in this case it's a VMware Player vm.

1. Launch VMware Player, and open the .vmx file of the vm.

2. Click "Edit virtual machine settings".

3. Click "CD/DVD" then check "Connect at power on" and select "Use ISO image file" then browse and select a Linux LiveCD ISO file (Note - It's MUCH quicker using an ISO rather than an actual physical Linux LiveCD and for this I used Ubuntu 14.04 32bit)

4. Start the VM. In order to get it to boot from the CD you may have to set the boot order in the BIOS first. As soon as the vm starts, highlight the window and repeatedly tap the F2 key to enter the BIOS. Set the CDROM as the first boot device under the BOOT menu, select F10 to save and exit.

vmbios.png

5. You should now boot-up from the LiveCD. Select "Try Ubuntu" and wait for the desktop to load.

6. Once the desktop has loaded tap "Ctrl + Alt +T) to launch a terminal, the affected drive is usually SDA1 so at the prompt type the following:

fsck -y /dev/sda1

7. You should be told that fixes have been made to the disk.

Fix_vxhd_fs2.jpg

8. Next, power off the VM and from the settings remove the CDROM drive. The vm should now start-up as normal.

Have more questions? Submit a request

Comments

Powered by Zendesk