NSX Appliance failed with the error “fsck exited with status code 4”

  • Post category:NSX-T / VMware
  • Post last modified:July 26, 2024

error

Sometimes you may come across an issue where the NSX Manager fails to boot and give you the error “fsck existed with status code 4“. This generally happens due to underlying file-level corruption.

In order to fix this you can follow the below procedure.

Procedure 1:

Manually run fsck on the affected filesystem. For e.g. fsck /dev/sda3

1. Connect to the console of the appliance.
2. Reboot the system.
3. When the GRUB boot menu appears, press the left SHIFT or ESC key quickly. If you wait too long and the boot sequence does not pause, you must reboot the system again.
4. Press e to edit the menu.
5. Choose the top Ubuntu line then enter the user name root and the GRUB password for root (not the same as the appliance’s user root). The default password is VMware1 or NSX@VM!WaR10 depending upon version.
6. Press e to edit the selected option.
7. Search for the line starting with Linux delete everything till ro and add rw at the end.

Edit this line till ro

Replace ro with rw

8. Press Ctrl-X to boot.
9. Run fsck on the affected filesystem for e.g. fsck /dev/sda3.

Procedure 2:

For this, you would need the Ubuntu Image on the Datastore so that we can mount it on the CD/DVD Drive. In case if you don’t have a CD/DVD Drive you can add the Hardware to the Existing VM by going to Edit Settings:

  • Add the Datastore ISO as mentioned below:

a

  • Check the Mark: “During the next boot, force entry into the BIOS setup Screen”

  • Power On the VM and Select “Try or Install Ubuntu

  • Here you should see the Ubuntu Logo

  • Select the Option Try Ubuntu

  • Open Terminal on Ubuntu and run fsck to fix the corruption.
sudo fsck -y /dev/sda2

  • Validated if the issue is fixed.

  • Now you can disconnect the CD/DVD Drive and then Reboot the Appliance to boot the NSX Again.

Side Issue:

After this, the manager may show Login incorrect multiples times and fail to boot up properly.

  • You can follow the same procedure as above to boot the OS to either Terminal or Command Line and run the below command:
fsck /dev/mapper/nsx-tmp

Please add sudo in the beginning if you are running this from Ubuntu.

Ashutosh Dixit

I am currently working as a Senior Technical Support Engineer with VMware Premier Services for Telco. Before this, I worked as a Technical Lead with Microsoft Enterprise Platform Support for Production and Premier Support. I am an expert in High-Availability, Deployments, and VMware Core technology along with Tanzu and Horizon.

Leave a Reply