Reset ESXi 5.1 root password

Hello, what is the safest way to reset an ESX 5.1 root password?  Do I really need to reinstall the software, and if so, if I reinstall, will it overwrite the guest OS?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott CSenior EngineerCommented:
ESXi 3.5, ESXi 4.x, and ESXi 5.x

Reinstalling the ESXi host is the only supported way to reset a password on ESXi. Any other method may lead to a host failure or an unsupported configuration due to the complex nature of the ESXi architecture. ESXi does not have a service console and as such traditional Linux methods of resetting a password, such as single-user mode do not apply.

If there's a way to hack it I wouldn't recommend it.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
odddballAuthor Commented:
I was afraid of that.  By reinstalling, will it overwrite the guest OS or corrupt them in any manner?
Scott CSenior EngineerCommented:
From the way the article reads it replaces the password with a new one.  It doesn't say anything about overwriting the current guests you have.  

You could easily set up a quick test to make sure nothing gets lost.

If you have VMware workstation you should be able to give it a go.

Heck, just use the trial version of Workstation if you don't have it.
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Hang on here....there is the VMware Supported method, or other reset method.....and it's safe! The reset method posted here, changes one file! (the password file, funnily enough, nothing else, the same method which is done on most Linux/Unix systems when the root password is lost!).'s generally quicker to re-install, if you do not have the Linux LiveCDROMS to hand, and do not know vi, or Linux, Unix etc

Up to you....

A Re-installation is a re-installation, it does not just update the password, it OVERWRITES EVERYTHING, unless you say preserve VMFS!

Word of caution, sometimes, an upgrade cannot be performed, and you will end up with a TOTAL ERASE of everything, including VMs, so I would advise, a good backup before you start...and read and watch those Prompts, and respond correctly.

@ScottCha is just guessing here!!!! (clearly never done it, in the real world!)

If you have forgotten the password, the VMware Supported method, is to re-install ESXi.

see here

Changing a forgotten root password on an ESX/ESXi host (1317898)

this unsupported method also works to reset the root password

If you decide to re-install, it will detect the existing VMFS datastore, where the VMs are located, and ask you if you want to OVERWRITE and PRESERVE the VMFS datastore.

So select Y(es) to PRESERVE, and then Add the VM to Inventory, after installation.
Scott CSenior EngineerCommented:
Yes, Andrew. That is the method I suggested.

Not the article form VMware.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
From the way the article reads it replaces the password with a new one.

foo-bar, I'm afraid it just does a re-installation, not a password reset, a password reset by way of re-installing the OS, which will require you to reconfigure your ESXi host server.

If you have vCenter Server and use Host Profiles, you can apply a host profile which will also reset the ESXi host password.
odddballAuthor Commented:
so I have a test vm server and I did a reinstallation of vm, which allowed me to change the password successfully.  However, when I run vsphere, none of my guest os's are present.  I can browse the datastore and see them there, but unable to get them to connect into the vsphere client.  As a note, I am running a standalone version.  Is there an easy way to get the guest os back into vsphere or import them?
odddballAuthor Commented:
and one last thing, the data store is on a secondary array local to the server.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
If you browse the datastore, select the VM folder, select and right click the VMX file, and select Add to Inventory.

see Step 6 Register the cloned/copied virtual machine with the Inventory in this EE Article I have written

HOW TO: Clone or Copy a virtual machine in VMware vSphere Hypervisor ESX/ESXi 4.x or ESXi 5.0

when you Power on the VM, you might be asked a question, see here also

HOW TO: Select the right answer to "I Moved It" or "I Copied It" in VMware vSphere (ESXi)
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Accepting multiple solutions

Good Answer:-

Good Assist
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.