VMware Cloud Community
CompuAnnan
Contributor
Contributor
Jump to solution

VMware ESXi 7.0.1 root password reset

i have problem with my vmware esxi 7.0.1 root password. we changed it but did not keep record of the new one and it was lost. we need to reset the password.

i have several vm machines and i do not want to lose them.

i tried upgrading to newer version(tried it on other stand alone server not the one i have problem with) but did not work since it did not ask for a new root password.

i can not restart or shutdown since i wont be able to turn on my vm machines again and i will get in big problem.

is there a way to reset the root password without losing my vm machines? 

Tags (2)
Reply
0 Kudos
1 Solution

Accepted Solutions
SCIJLW
Contributor
Contributor
Jump to solution

Are you on vCenter by chance?  If so, then you can use Host Profiles to reset the root password.  Otherwise, you can re-install ESXi with a new password and it won't reformat the VMFS drives, if you have ESXi on a separate drive(s) from the VM datastore.  If they are intermingled, I would export the VMs and then re-install, re-import the VM.

View solution in original post

24 Replies
scott28tt
VMware Employee
VMware Employee
Jump to solution

Thread reported so moderators know it should be moved to the area for ESXi.

 


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos
CompuAnnan
Contributor
Contributor
Jump to solution

is it wrong to post it here?
Reply
0 Kudos
CompuAnnan
Contributor
Contributor
Jump to solution

is it wrong to post here?
Reply
0 Kudos
scott28tt
VMware Employee
VMware Employee
Jump to solution

I can't remember which area you posted your thread in originally, but if you look at the path towards the top of the page you'll see it was moved by a moderator:

Screenshot 2022-03-09 at 09.21.28.png


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos
SCIJLW
Contributor
Contributor
Jump to solution

Are you on vCenter by chance?  If so, then you can use Host Profiles to reset the root password.  Otherwise, you can re-install ESXi with a new password and it won't reformat the VMFS drives, if you have ESXi on a separate drive(s) from the VM datastore.  If they are intermingled, I would export the VMs and then re-install, re-import the VM.

irigoyen
Enthusiast
Enthusiast
Jump to solution

As @SCIJLW already reffered. You can do it with Host profile.

Here the KB: https://kb.vmware.com/s/article/68079

CompuAnnan
Contributor
Contributor
Jump to solution

hi thanks for your reply. no i am not on vcenter.

Reinstalling ESXI keeps my VM drives? no risk at all?

they are all on the same drive.

Reply
0 Kudos
Tibmeister
Expert
Expert
Jump to solution

LILO?

Reply
0 Kudos
mrtgokul
Contributor
Contributor
Jump to solution

If your Esxi server is managed by vCenter we can use PowerCLI to reset your Password. This wont cause any downtime.

Reply
0 Kudos
CompuAnnan
Contributor
Contributor
Jump to solution

Reinstall with new password worked for me. All VM machine remained and no harm. 

Thanks for all the help from everyone

Reply
0 Kudos
kmoriwawon
Contributor
Contributor
Jump to solution

Hi CompuAnnan, how did you do this? did you boot the server with a boot disk and go through the process of reinstall? 

Reply
0 Kudos
ggathagan
Enthusiast
Enthusiast
Jump to solution

This is frequently stated without including the caveat regarding the need for the correct licensing.

The licensing for vSphere Essentials and Essentials Plus includes vCenter, but does not include access to creating Host Profiles.

I don't know if vSphere Standard includes it or not.

Reply
0 Kudos
Kinnison
Commander
Commander
Jump to solution

Hi,


@ggathaganhe is right, it is true that using host profiles "solves the problem" but as long as the licenses available are at the enterprise (plus) level, at least that's what it says on the documentation.


But forgive me, immediately after installation, configuring an account functionally equivalent to the default account "root" (= administrator) and then use that new account, takes a few minutes, just as it takes to take note of the credentials, (maybe) print them and keep them in a safe place.


Regards,
Ferdinando

Reply
0 Kudos
ggathagan
Enthusiast
Enthusiast
Jump to solution

True, but that user only exists in the vCenter environment, not on the host hardware itself.
If, like me, you use a terminal session to install updates to the host hardware, you'll need the root password on the host hardware.

Reply
0 Kudos
Tibmeister
Expert
Expert
Jump to solution

OP is talking about the ESXi root password

"i have problem with my vmware esxi 7.0.1 root password"

Reply
0 Kudos
Kinnison
Commander
Commander
Jump to solution

@ggathagan


I did not say never to use the "root" account again, but having an alternative account with the same "identical" privileges allows you to use "root" account as little as possible, allows you to "reset" the latter account password without particular problems and avoids "being cut off" in case the root account is blocked for one reason or another.


Regards,
Ferdinando

ggathagan
Enthusiast
Enthusiast
Jump to solution

@Kinnison 
I completely agree with you,
Sadly, since that preemptive measure was not taken, the owner of the original post does not have that option.

Reply
0 Kudos
Kinnison
Commander
Commander
Jump to solution

@ggathagan,


I will tell you, every now and then on this or other forums the question of how to "reset the password of the root account of an ESXi host" is not uncommon as it is not common setting up an alternate account because so much can be remedied with the vCenter object or the Active services Directory.

Instead, I am of the idea that infrastructures built around vSphere (but not only them) should be as independent as possible any other service provided by virtual machines placed on them or not. I am getting old now but I got into the habit of not using on principle (or at least as little as possible) default administrative accounts a few decades ago.


Regards,
Ferdinando

Reply
0 Kudos
CompuAnnan
Contributor
Contributor
Jump to solution

i managed to reset the password using a new installation of VMWare ESXI but with option to keep the existing VM machines.

All vm-machines were saved and I could add them again without any problem.

Everything worked well for me and still working all fine till now.

I hope others who need root password reset would benefit from my post.