VMware ESXi Root and Default Password
Here you will find out:
- VMware root and default password
- how to recover the ESXi default password
- when DiskInternals can help you
Are you ready? Let's read!
VMware root and default password
When installing the ESXi hypervisor, a root password is set. However, if forgotten, administrators cannot change it from the ESXi default. How can this happen, you may ask?
In essence, after configuring the ESXi server, the system administrator may not log into the ESXi server for a long time. After all, if you are not going to reboot the ESXi host from the ESXi console, no password is required. But, if an unexpected situation occurs (e.g., a power failure) or you need to make changes to the ESXi configuration, then you need to enter the root password, which is required to log in. But if the administrator has forgotten the password, that won’t be possible. Of course, there is an option to reinstall the ESXi server, but it will take a lot of time and effort. Is it possible, then, to reset the ESXi default password without reinstalling the server, and how do you do it? Don't panic if you've been told that this is impossible.
This article has a couple of great tips on how to reset the ESXi root password.
How to recover the ESXi default password
VMware Host Profiles is a feature that allows you to reset the ESXi root password. However, you need to do the following:
- 1. Manage the ESXi host via vCenter
- 2. Have a VMware Enterprise Plus license
Now you can start recovering the default password:
- 1. Go to the VMware vSphere web client. To do this, enter the IP address of your vCenter Server in a web browser.
- 2. In the shortcut menu, go to the host profiles and click on the Extract host profile button.
- 3. In the new window, select the ESXi host as the basis for creating the host profile and click Next.
- 4. Now enter the name of the newly extracted profile and click Finish.
- 5. In the Host Profiles tab, select the newly created host profile and select Edit Host Profile.
- 6. In the left pane of the new assistant window, open the Security & Services section.
Next, select Security, then click on User Configuration and finally on root.
Deactivate unnecessary options.
- 7. In the Fixed Password Configuration window, enter a new ESXi password, confirm it and then save it.
- 8. Now go to Host Profiles, right-click the recently edited host profile and select Attach / Detach Hosts and Clusters. Select the ESXi host whose root password you forgot and click on Save.
- 9. Next, the restored ESXi host needs to be put into maintenance mode; this can be done in the Hosts and Clusters section. You are now in a special mode that should be used for the ESXi host when it is in production.
- 10. Now go back to Host Profiles, right-click on the newly edited Host Profile and click Restore.
- 11. Go to the Patch pre-check section to validate the target host and click Fix.
- 12. Once the fix is complete, exit maintenance mode by right-clicking on the ESXi host and choosing Exit Maintenance Mode.
The ESXi password for root will change immediately after the new host profile is applied.
How to reset an ESXi password
This method is versatile and quite effective.
ESXi stores password hashes in a special system file: /etc/shadow, where the password is encrypted. It looks like this:
root: $ 1 $ xxxx $ xxxxxxx: 13354: 0: 99999: 7 :::
When the user enters a password, it is converted into a hash in computer memory. It, in turn, is compared with the hash stored in the system file /etc/shadow. If the match is 100%, then the user has public access to the profile.
So, in order to reset the password in this way, you need some kind of installation media (a DVD-R, say, or a bootable USB stick) and an ISO image of a Linux distribution; for example, Ubuntu.
Now burn the ISO image to the installation media.
Reboot your ESXi host with the forgotten password and boot from the boot drive.
Now right-click on the desktop and then click on Open Terminal.
Go to the /dev/sda5, which contains the /etc/shadow file.
Next, create temporary directories in the virtual file system to mount the partition that contains the /etc/shadow file:
Next, create a directory to store temporary files:
mount /dev/sda5/mnt/ sda5-esxi
Next, select the state.tgz file (where ESXi password hashes are located) and unpack it into a temporary directory:
tar -xf /mnt/sda5-esxi/state.tgz -C /temp/
Now, from the state.tgz file, extract the file local.tgz:
tar -xf /temp/local.tgz -C /temp/
Next, unpack the containing ESXi password hashes and then remove it from the temporary directory:
You can now open the /etc/shadow file in a text editor and view the ESXi password hashes for ESXi users.
To reset the ESXi root password, change the line containing root. This line after editing should look like this:
root :: 13358: 0: 99999: 7 :::
Now save the changes and change to the /temp directory:
Now repack the archives:
tar -czf local.tgz etc.
The new archive with the root password removed should be moved to its standard location:
mv state.tgz /mnt/sda5-esxi/
Next, reboot the server and, after booting the ESXi server, press F2 to see the authentication screen. The password field is blank. Then press Enter. Then set a new ESXi password.
VMFS Recovery for VMware ESXi
DiskInternals VMFS Recovery™ is a professional application that every virtual machine owner should have on their desktop.
It helps recover lost VMDK files and images from damaged and failed disks, while automatically checking the current state of the VMware VMFS datastore, RAID (if used) and volumes, and reading VMFS structures. After searching the data carefully, you always have the opportunity to see the amazing results for free. After you are unconditionally convinced of the competence of the application, buy a license to export data to external storage devices. If you have any difficulties, just activate the Recovery Wizard and follow its instructions.
The VMFS Recovery instructions are as follows:
- 1. Download and install the program on your computer.
- 2. When you open the app, connect via SSH.
- 3. Select and open the disk to activate the disk scan process.
- 4. After that, find the necessary VMDK files and mount them.
- 5. Then browse the VMDK file for free and decide if you want to export them.
- 6. If you do, buy a license for VMFS Recovery™ on the website and get access to export files to external media.
- VMware Horizon and its components
- Want to increase VirtualBox disk size? Here is a guide on how to do it safely!
- VMFS UNMAP: What is It?
- VMFS Recovery software as a solution for NFS data repair
- VMFS Recovery™ for VMware Data Recovery
- Restore a VMDK file
- Restore VMware VM with snapshot(delta.vmdk) files
- repair VMDK files in VMware | DiskInternals VMFS Recovery™
- Restore VMware virtual machine from VMDK file
- VMware vMotion storage: What do You Need to Know
- VMware vs Hyper-V Comparison
- VMFS Block Size: How to Choose
- What is the difference between VMware HA vs vMotion
- What is ESXi Recovery Mode
- How to Fix/Repair Corrupted VMDK Files Effortless
- VMware RAW Device Mapping and File Recovery
- Difference between ESX vs ESXi
- Thick vs Thin Provisioning: All You Wanted to Know
- How to Upgrade VMFS from 3 to 5th version
- Virtualization technology: what is it and how does it work?
- VMware vMotion: all you need to know
- What is VMware HA?
- VMware Fault Tolerance: what is it and how does it work?
- VMware: clone and data recovery
- What is VMware DRS?
- VMware vMotion requirements: for VMs and for hosts
- VMware vMotion vs storage vMotion: all you wanted to know
- VMware FT vs VMware HA: what the difference?
- VMware Workstation and Its Uses
- ESX Partitions: All You Wanted to Know
- What is Space Reclamation and How to Perform It
- What is VMware vSphere
- VMkernel and Its Interactions with Storage
- VMware Infrastructure: What Components are Used
- What is VMware vCenter Server and How Does It Works
- How to Manage VMware ESXi
- Virtualization: How Does It Work?
- VMkernel Ports and Networking Layers
- VMware Cold and Hot Migration: What Is It
- What is Virtual Desktop Infrastructure(VDI)?
- The importance of snapshots in VMWare
- What is vVol and How Does That Work
- What is a VM Cluster and How to Create It
- What is VM Host Server
- Find Your Reason for a Virtual Machine Usage
- Mounting Hard Drives (vmdk files) of a Virtual Machine Running on a ESX Server
- What is Thin Provisioning?
- iSCSI LUN and Data Recovery
- What is VMware vCloud Suite
- VMware Template vs VMware Clone: the differences and common
- VirtualBox: "No bootable medium found" issue
- VM: Hyper-V Integrated Services
- Hyper-V Checkpoint and Its Importance for VM
- Hyper-V Export VM: How Does It Work
- ESXi Free Limitations: Pros and Cons
- Convert VMware to Hyper-V Fast and Safe
- What is Hyper-V VDI and Its Benefits
- VMware: Workstation Pro vs Workstation Player
- Convert VHD to VMDK
- What is VMware vSphere and vCenter
- What is NVRAM? Are these files important?
- VMware vs VirtualBox: What Is The Difference
- VMware Content Library: What Is It and How Does It Work
- Recover Deleted VMDK from Datastore Today
- Is VMware virtual machine inaccessible? Fix it!
- Recover VM from flat VMDK - The Best Solutions
- Mounting Server Disks
- What is VMware VDS and How It Works
- How to Use VirtualBox Correctly
- P2V vs VMware: What is Better for You?
- How to Install Kali Linux VMware
- How to install Kali Linux on VirtualBox
- What is VMware networking?
- VHDX Files and How to Mount Them on Windows
- What is Asynchronous Replication
- Disaster Recovery Checklist: You Need A Plan
- How to open VMDK files
- VMware EVC Mode
- Comparison VDI vs Citrix
- VMware NFS vs VMFS
- NSX-T and NSX-v
- AWS EBS Snapshots
- Hyper-V Nested Virtualization
- About VirtualBox full screen
- About VirtualBox network settings
- About VMware home lab
- Install VirtualBox Extension Pack
- Physical and virtual servers
- What is Hyper-V USB Passthrough
- Hyper-V Virtual SAN
- VMware Player and VMware Workstation
- Thick and thin provisioning
- Install ESXi from a USB
- Steps to update VirtualBox
- Update ESXi
- ESXCLI commands
- Install Ubuntu on VirtualBox
- Remote control an Ubuntu
- Setting up VirtualBox
- About VMware Host Profile
- Create a Virtual Machine
- VMware vSphere 7
- About vSphere Web Client
- About VMware Data Protection
- About VMware vRealize Orchestrator
- The VM session was closed before any attempt to power it on: error code 0x80004005
- Virtual Desktop Infrastructure and VMware Horizon
- The comparison of Citrix and VMware
- 3-2-1 Backup Strategy for Data Safety
- Hyper-V Networking: How to Manage It
- VMware vSwitch
- VMware Network Adapter settings
- VMware snapshot best practices
- Hyper-V NIC Teaming
- VMware vSphere Replication
- Intel VT-x in BIOS: how to enable it?
- VMware Cloud Foundation
- How to use a shared folder properly: VirtualBox, VMware Workstation Player?
- Virtual Disk Service error occurs: your actions
- Result code: e_invalidarg (0x80070057) — how to deal with this error
- Fix: unable to finish connecting to Virtual Disk Service
- What should you do in case of ‘The hardware virtualization is enabled in the acceleration section’ issue?
- The best solutions for Virtual Machine in Windows 10