How to Enter, Exit, Troubleshoot vCenter Emergency Mode

Have you ever encountered a situation where vCenter doesn't start properly and go into emergency mode? To easily solve it, you can read this article to view the detailed steps.

Zelia

By Zelia / Updated on December 14, 2023

Share this: instagram reddit

What is vCenter emergency mode

vCenter Emergency Mode is a special diagnostic mode that can be used to troubleshoot problems with vCenter Server. When vCenter Server enters Emergency Mode, only a limited set of services are started to help isolate and resolve issues that may prevent vCenter from operating properly.

In vCenter Emergency Mode boot, administrators can perform a range of diagnostic tasks, such as checking logs, verifying database connectivity, and restarting services, to determine what may be causing problems with vCenter Server. This enables administrators to find and resolve problems faster, resulting in less maintenance time and downtime.

vcenter-emergency-mode

How to enter and exit vCenter emergency mode

Sometimes you automatically go into emergency mode. But when you want to enter or exit emergency mode, which is not as simple as opening or closing a window, you need to perform the following steps:

Steps to enter vCenter emergency mode

1. Log in to the vSphere Web Client and select the vCenter Server instance from the inventory panel.

2. Click the Actions menu and select Reboot.

click-action-and-select-reboot

3. In the Reboot vCenter Server dialog box, select Enter maintenance mode and click OK.

select-enter-maintenance-mode

4. When vCenter Server shuts down completely, start the vCenter Server Appliance and press the spacebar to interrupt the boot process.

5. Select Emergency Mode from the boot menu and press Enter.

Steps to exit vCenter emergency mode

1. Press Ctrl+Alt+F1 to switch to the console and log in as the root user.

2. Run the following command to start all vCenter services.

service-control --start –all

service-control-start-all

3. Wait for all services to start up and press Ctrl+Alt+F2 to switch back to the vCenter Server Appliance console.

4. Run the following command to start the vCenter Server service.

vpxd_servicecfg service start

5. Wait for the vCenter Server service to start up and run the command exit to log out of the console.

Troubleshooting vCenter failed to start through emergency mode

There can be various reasons for vCenter to enter emergency mode, such as lack of disk space, database failure, overuse of resources, etc. All can cause vCenter to enter emergency mode. The following are solutions for vCenter emergency mode troubleshooting:

Step 1. From the ESXi host portal where the VCSA is executing, take a snapshot of the VCSA server in its current state.

Step 2. After the VCSA server restarts, press the E key repeatedly until the GRUB boot startup screen appears.

Step 3. As seen in the below image, add the following text at the end of the line where it says "linux". (This instructs the OS to boot in emergency mode.)

systemd.unit=emergency.target

os-boot-in-emergency-mode

Step 4. Press F10 to continue to boot and land at a terminal prompt. Then enter the following command:

/bin/sh
/bin/mount
blkid (This command shows a list of the storage devices)

continue-to-boot

Note: Look for the “sda” numbers of the TYPE=ext4.

Step 5. Type the following commands to replace it with the storage locations in step 4.

e2fsck -y /dev/sda1

replace-it-with-the-storage-location

* This step is to check the file systems of the storage and perform any corrections.

e2fsck -y /dev/sda3

check-file-systems-storage-and-perform-any-corrections

Step 6. Restart the VCSA (Action >> Power >> Reset) and the VCSA should restart and hopefully be fixed.

restart-vcsa

Step 7. Test your VCSA to make sure it is working and remember to remove the snapshot from the host.

test-vcsa

vCenter Emergency Mode is indeed a very useful diagnostic tool that can help you quickly diagnose and resolve situations where there are problems with vCenter Server. However, preventing problems is still the best way to go. You should back up vCenter Server regularly, avoid installing untested plug-ins, and continuously monitor your system as well as your network connection, etc.

Necessary data protection: regular vCenter backup

Here I introduce you AOMEI Cyber Backup, a VMware backup software that allows you to back up multiple running virtual machines, either managed by vCenter Server or on a separate ESXi host. Emergency mode activation may mean that there will be data loss, but don't worry because once you have backed up your VM data with AOMEI Cyber Backup, restoring your data becomes very easy.

The steps are so simple that it will not take no longer than 10 minutes to download AOMEI Cyber Backup and add VMs from VMware vCenter or ESXi host in the centralized web console.

✤ Agentless Image Backup: Create independent and image-based backup for VMware ESXi and Hyper-V VMs.
✤ Support Free ESXi: Support both paid and free versions of VMware ESXi.
✤ Various Backup Methods: Perform full, incremental or differential VM backup to capture only changed data and save storage space.
✤ Automated Hot Backup: Auto backup running VMs and notify via email.
✤ Restore from Any Point: Restore a whole VM to usable state from any history backup version.

Download Free TrialVMware ESXi & Hyper-V
Secure Download

And here are the steps on how to quickly back up virtual machines managed by vCenter after installing:

Step 1. Access to AOMEI Cyber Backup web client, select Source Device, click VMware >> +Add VMware Device. Then Add vCenter or Standalone ESXi to add a host. And then click to Bind Device.

bind-device

Step 2. Create Backup Task: Navigate to Backup Task and Create New Task. Then select VMware ESXi Backup for Backup Type. After that, set the Task Name, Device, Target, Schedule and Cleanup according to your need.

create-backup-task

Step 3. Click Start Backup and choose Add the schedule and start backup now or Add the schedule only.

start-backup

Step 4. When your backups are completed, it’s easy to restore your virtual machines to another place when a disaster strikes. Navigate to Start Restore, you can change restore location here to create a new VM to another datastore or host.

restore-to-new-location

Conclusion

Emergency mode for vCenter Server is an important function used to protect multiple vCenter Server and virtual machines. When vCenter Server enters emergency mode, it restricts access to the system and stops some critical services so it can go diagnose the problem.

It's impossible to predict the severity of a problem with your data. It could be a minor issue that only requires a simple fix, or it could be a major problem that results in the loss of critical information. By taking proactive steps to ensure that your data is frequently backed up, you can safeguard against potential issues and protect your important information.

Therefore, the emergency mode is an emergency stop when an error occurs to prevent the situation from getting worse. But it might be better if you can avoid the error by data backup.

Zelia
Zelia · Editor
Zelia is an editor from AOMEI Technology.She mainly writes articles about virtual machine. Writing is one of her hobbies and she wants her articles to be seen by more people. In her spare time, she likes to draw and listen to music, and it is a pleasure for her to focus on her own world.