Resetting ESXi Root Passwords

I was recently playing around with VMware’s ESXi hypervisor a few days ago on a lab server when I forgot the password. Happens to the best of us. While the VMs on the server continued running as if nothing was wrong, this was obviously a problem becuase I couldn’t properly shut down, reboot, or update the standalone host.

Since I’m not too familiar with Linux, and the standard practice for resetting a Linux root password terrifies me (boot to a Live CD and do some weird Linux-y things), I got together with the greatest mind of our time and we figured out a way to reset the password without needing a Live CD and manage to preserve the local datastore and all of the associated VMs at the same time.

The procedure (get ready, it’s a doosy) is to run a repair install on ESXi. In our attempt, we ran the ESXi 4.1 installer on an existing ESXi 4.0 installation, and it worked flawlessly (woo hoo!). Because of the way VMware partitions the disk, the repair install overwrote the hypervisor partitions while leaving the local datastore alone, preserving the VMs. One thing we did notice aftewards though was that some particularly sensitive software started throwing licensing errors after we re-added the VMs back into the inventory.

That’s all there is to it though. Just reinstall ESXi using equivalent or newer media, open the datastore browser once you’re back in through vSphere, and re-add the VMs to the inventory. If you had any vSwitches configured, you will also need to redo those, along with any licensing you had, since your configuration was lost, but it’s certainly easier than having to recreate an entirely network.


Posted

in

by

Comments

One response to “Resetting ESXi Root Passwords”

  1. Coral Gables Air Conditioning Avatar

    Since it’s asking me to post a comment on here, I thought I’d throw in my 2 cents… Tip #1 Check out Animoto and add some cool videos on here. Tip #2, run Google Page speed on this and do what it recommends to speed up page loads.

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.