Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've just inherited a very simple VM setup with a pair of ESXi servers clustered and everything is pretty much hooked up. Problem is I do not have the root passwords for the servers and no one has any idea what they are (password guessing has been tried).

From my understanding, ESXi does not have a single-user mode or anything equivalent. What are my options short of backing up the VMs and nuking the site?

share|improve this question
2  
I know that you just inherited this and the loss/absence of the root password is not your fault, but WOW! How does that happen? –  joeqwerty Mar 6 at 20:18
    
@joeqwerty, easily, no one writes things down. –  Daniel Goldberg Mar 8 at 14:58
add comment

2 Answers 2

up vote 8 down vote accepted

For ESXi, the only supported method to change the password is to reinstall.

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 you have two hosts and they have the resources to support it, you could vMotion (and/or storage vMotion) the servers all onto a single host, remove and rebuild the empty host, add it back into the cluster. Then move all the guests onto the rebuilt host and remove/rebuild the remaining host. This would allow you to rebuild without incurring any downtime on the guests. Depending on your infrastructure and depending on the number of virtual machines to move, the two hosts should take less than a day to rebuild unless you have extraordinarily large or complex host configuration.

Also, if you are on an older version of ESXi, this would also be a good time to check your current hardware against the HCL and move up to the latest version if supported (After upgrading your vCenter server first of course).

Regarding non-supported methods that I will mention but don't necessarily advise.

  • Use vCenter to join each host to an AD Domain and setup and configure an AD user as an admin to the host and allow AD authentication. Use the vSphere client to connect directly to the host using AD credentials to login. Once connected this way, you should be able to change the password for the root account through the vSphere client connected directly to the host. I've used this in a pinch and it does work.
  • Generate a host profile that specifies the password and attach it to the host. This can be done but still requires the host to be put into maintenance mode. Haven't used this method myself personally.
share|improve this answer
add comment

There are methods to reset an ESXi host's root password, provided you have physical or out-of-band access to the server.

  • I've done this with Host Profiles by reapplying the profile gleaned from another host to the affected server. But you likely don't have the licensing to support this.
  • I've also have to use the boot CD/Live CD approach (also here), which assumes some Linux knowledge and involves setting an empty password or a known encrypted password in the shadow file.

As to how this can happen... Poor documentation, evil terminated administrators, a data center technician who left CAPS-LOCK on when building the servers, my bad memory, etc, :)

share|improve this answer
    
I never said there wasn't other methods - only that the only officially supported method for ESXi is to reinstall. :) I haven't seen the BootCD approach before but have seen the host profiles method before. I also added an additional method in my answer below that I have used before. The licensing with host profiles can be worked around as well - grab a trial license key and apply it for the duration as needed and then reapply your full key after you are done. –  Rex Mar 6 at 20:38
    
I added the other answer as the "official" one but this is actually going to help me out if the bosses sign off on this. Thank you. –  Daniel Goldberg Mar 9 at 19:15
    
@DanielGoldberg You're welcome. –  ewwhite Mar 9 at 19:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.