How to Reset vCenter Server Appliance Root Password

The root password is something that every server admin should keep in a well-secured vault or database, and believe me – a text file is not a good place. It would also be a good idea to remember the root password, but sometimes that’s not easy. Passwords are usually very complex, containing about 15 or more various characters. One day, there may be a situation where you forget the root password for your vCenter Server Appliance, or the password has just expired. Resetting the root password of the vCenter Server Appliance is a relatively easy task, however, it requires restarting the vCenter Server VM. Restarting vCenter does not affect VMs as they are running on ESXi hosts, however cluster features such as DRS, HA or vMotion will not work during reboot.

In this article, I will show you how to reset vCenter Server root password step by step.

This method works for vCenter Server Appliance version 6.5 / 6.7 / 7.x / 8.x.


Resetting root password in vCenter Server Appliance

Resetting the root password requires restarting the vCenter Server Appliance VM. This is needed because we need to access the GRUB bootloader menu, which is not available when the VM is running. Before restarting, take a snapshot of the vCenter Server Appliance VM in case there are any issues and you need to roll back.

Follow the root password reset instructions:

1. Take a snapshot.

Right-click on vCenter Appliance VM. From Snapshots menu choose Take Snapshot.

2. Now you need to access the ESXi that your vCenter Server VM is running on. This is to access the VCSA VM through the console.

Log in to the ESXi web GUI, select VCSA VM and from the Console menu select Open browser console. A console window will pop-up.

3. Once you have console opened it is time to reboot the vCenter Server Appliance VM.

Right-click on the VM and choose Guest OS, then Restart.

4. Now watch the console. When you see the Photon screen, press E.

5. You are now in the GRUB bootloader menu.

Use the arrow keys to go to the end of the linux line and right after $systemd_cmdline make a space and add the following:

rw init=/bin/bash

Once added, press F10 to continue booting.

6. Type following command:

mount -o remount,rw /

Press Enter.

7. To change the password, type the following command:

passwd

And enter the new root password twice. Confirm by pressing Enter.

8. If the password has been updated successfully it is time to reboot the VCSA.

Type the following command:

umount /

Press Enter.

Then reboot the appliance by running the following command:

reboot -f

Press Enter.

9. Once vCenter is up, confirm that the new root password is working by logging into vCenter Server Appliance Management Interface (VAMI).

https://vCenter_IP:5480

If the new password is ok, vCenter is running fine, you can go ahead and delete the snapshot.


Setting password to never expire

If you have a strong root password, consider disabling root password expiration. This can be done in VAMI, under Administration, then Edit next to Password Expiration Settings. Just select Password expires – No.


Thank you for reading! Here are some links you may be interested in:

One thought on “How to Reset vCenter Server Appliance Root Password

Add yours

Leave a comment

Create a website or blog at WordPress.com

Up ↑