Link to home
Start Free TrialLog in
Avatar of odddball
odddball

asked on

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?
ASKER CERTIFIED SOLUTION
Avatar of Scott C
Scott C
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of odddball
odddball

ASKER

I was afraid of that.  By reinstalling, will it overwrite the guest OS or corrupt them in any manner?
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.
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!). BUT...it'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

http://vm-help.com/esx/esx3i/Reset_root_password.php

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.
Yes, Andrew. That is the method I suggested.

Not guessing...read the article form VMware.
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.
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?
and one last thing, the data store is on a secondary array local to the server.
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)