Reset lost VCenter 6.5/7.X root password

0

So you forgot your root password. No worries. This is an easy fix.

  1. Backup your VCenter (export the config)
  2. Find the name of the host the VCenter runs on.
  3. Connect to the host running the VCenter.
  4. Issue a shutdown command to the VCenter
  5. Wait for it to power down.
  6. Snapshot the VM. Def do some research on VCenter snapshots. If this is your ONLY vcenter its not a big deal and managing the snapshot is straight forward, but if you have external PSC’s, are operating in linked mode, etc, things can get crazy. If your operating in Linked mode I recommend that you power down ALL the vcenters, and snap them all prior to continuing. Its overkill – but if shiz gets crazy, you will be glad you did.
  7. Power on the VM and as its coming up press the E key to enter the GNU Grub edit menu.
  8. The second or third line down should look something like “linux /$photon”, find that line and add : “rw init=bin/bash” to the end of it (Without the quotes). It should look something like:

9. Press F10 to continue booting and then run this command : mount -o remount,rw /
10. Type the command passwd and then provide a new password
11. Type umount / and hit enter
12. Type reboot -f
13. Confirm you can login to the VAMI https://name:5480
14. Assuming you can get into the VAMI now with root, delete the snap from step 6.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.