Posts Tagged ‘VMware ESXi’

Reset Forgotten Root Password on VMware ESXi 5 and ESXi 4

August 10th, 2013 by Admin

Forgot your VMware ESXi Server root password? Try to log on to your ESXi server but for some reason your root password isn’t working anymore? Here we’ll show you a way to reset forgotten root password on VMware ESXi 5 and ESXi 4. But this trick is not officially supported by VMware, so do it on your own risk.

How to Reset Forgotten Root Password on VMware ESXi 5 and ESXi 4?

  1. First of all, you need to boot your ESXi server with a Linux live CD. I prefer GRML, but any live CD will do. Of course, you can also boot from a USB stick.
  2. Find the partition containing a file named “state.tgz”. For my installation, it was on a VFAT filesystem labelled “Hypervisor3”, which is accessible in GRML at “/mnt/Hypervisor3”. You might need to mount it manually with the command

    mount /mnt/Hypervisor3

  3. Unpack the “state.tgz” file somewhere. It contains exactly one file, which is another archive named “local.tgz”.

    cd /tmp
    tar xzf /mnt/Hypervisor3/state.tgz

  4. Unpack the “local.tgz”, and find an “etc” directory containing several configuration files.

    tar xzf local.tgz

  5. Edit the file etc/shadow to change the password.

    vi etc/shadow

    Probably the easiest way is to replace the line starting with “root” with the line of another user account of which you know the password. You only need to change the name at the beginning of the line (before the first colon) to “root”. You’ve then set the root password to a password you know.

    Alternatively, you can just remove the hash altogether (everything between the first and the second colon) and login to the service console as root with no password at all.


  6. Re-pack the files and move the modified state.tgz back to the VFAT partition. Probably it is a good idea to make a backup copy of the original state.tgz in case something goes wrong:

    mv /mnt/Hypervisor3/state.tgz /mnt/Hypervisor3/state.tgz.bak
    rm local.tgz
    tar czf local.tgz etc
    tar czf state.tgz local.tgz
    mv state.tgz /mnt/Hypervisor3/

  7. Reboot back into ESXi and you’re done.

How to Reset Lost Windows Password of Virtual Machine in VMware ESXi / vSphere

August 8th, 2013 by Admin

Once you’ve installed VMware ESXi Server and vSphere client, you can create many virtual machines for your own purposes. It’s a good habit to use different password for every VM but the downside is that you have to remember many passwords. What to do if you forgot Windows password to one of your virtual machine in VMware ESXi / vSphere?

PCUnlocker is a powerful Windows password recovery tool that can successfully reset lost Windows password in a simple and easy way. It can be used to unlock passwords for both physical machine and virtual machine. Here’s a step-by-step tutorial to reset lost Windows password of virtual machine in VMware ESXi / vSphere.

How to Reset Lost Windows Password of Virtual Machine in VMware ESXi / vSphere?

  1. Download the zipped ISO image of PCUnlocker and save it on your physical machine. Unzip the download file and you’ll get a bootable ISO image file: pcunlocker.iso.
  2. Open up your VMWare vSphere Client and log into your ESXi server. Turn off the virtual machine that you want to reset password for if it is running. Right-click the virtual machine and select “Edit Settings”.
  3. In the Hardware tab, select the “CD/DVD drive 1”. Under Device Type, check the “Client Device” to enable remote CD drive.


  4. Switch to the Options tab, then select the “Boot Options”. Under the “Power-on Boot Delay” you can specify how long the delay will be when you start / restart a VM. I’ve set 2s delay on booting to give myself time to press the Esc key to access the Boot Menu.


  5. Power on your virtual machine, it should display a BIOS screen with options at the bottom and a counter. press Esc key to access the Boot Menu.


  6. In the top menu of vSphere client, click on the CD-ROM icon and select “CD/DVD Drive 1” -> “Connect to ISO image on local disk”. Browse to the pcunlocker.iso file you’ve downloaded and click Open. The image is now mounted.


  7. Choose the CD-ROM Drive from the Boot Menu and press Enter. It will boot off of the CD image.


  8. In less than one minute, PCUnlocker program will start and it displays a list of Windows local accounts existing in your virtual machine. Choose a user account and click on “Reset Password” button. It will unlock / reset your forgotten Windows password instantly.

  9. Restart the virtual machine. you can then log back in to your VMware vSphere virtual machine without a password! It’s that simple!