I am unable to connect via vSphere or SSH to an ESXi hypervisor box that manages two important virtual machines. I do not recall changing any passwords and the data centre does not have any credentials. I suspect we messed up sshd_config, since I have tried every password I know 50 times.
If I restart the hypervisor, e.g. to reinstall ESXi, the VMs will stop and not be restarted automatically, which would be disastrous if we cannot reclaim access to the hypervisor.
What are my password reset/recovery options to get root access to the same hypervisor configuration with no data loss and as little downtime as possible?
If there is no way to reset root password, what safe steps can I take to backup/snapshot the two VMs (one Ubuntu, one Windows 2008 Server) and move them to a fresh server, bearing in mind that I cannot SSH into the hypervisor?
Edit: Great feedback so far, thanks guys. More details: Local storage, RAID-1, pretty standard hardware otherwise. Yes, I can arrange physical access to the box or schedule maintenance at the data centre. AFAIK, vSphere uses SSH to talk to the hypervisor, but I could be wrong here.
Generally speaking, you can't reset a lost root password on ESXi. I'm going to assume that you do not have any other form of access to the server either (vSphere, or other non-root accounts). This means that you cannot perform a backup or snapshot of the VMs using any client-side tools.
Option #1) Reinstall ESXi. Good news is you can reinstall and your VM's won't be touched. Bad news is someone at the data center will have to do this, and you'll have to trust them not to screw it up. [edit] You mention you can arrange physical access, so this is less of a concern as you can complete this yourself!
Start by powering off your VMs. Then power off the ESXi host (you'll have to hold the power button). Next, boot off an ESXi installation CD.
During the install process, the installer will detect the existing version of ESXi. It will prompt to either overwrite, or preserve the existing VMFS datastores. You want to preserve them! After this, the installation continues as normal and you'll end up with a vanilla ESXi install.
After a reboot, a data center tech will need to configure stuff like your IP settings, and then they can hand it off to you. First thing - you'll need to log in via vSphere, and re-attach your VM's. Open the datastore, browse to the VM folder, right-click on the .vmx, and choose "Add to Inventory". (Be sure to double check the VM settings to be safe.)
At that point, you should be able to power the VMs on with no issue. If you are asked if you "moved or copied" the VM, choose "moved".
Option #2) You edited your post to mention it's a RAID-1 and you can arrange physical access.
You could power off the server, pull 1 drive, and connect it to another box. Copy the VM files off as a backup. Re-attach the drive to the original server and complete Option #1 above to restore access.