I lost password of root account could you please give me a solution.
official solution from vmware is : reinstall
unofficial way: if you have enterprise plus licenses create a host profile that only set the password, put host in maintenance and apply the profile
If the Host is part of a vcenter
1. Add "AD Authentifcation" to the Hosts
2. Visit the Host Client of the ESX by pointing your browser to https://esx/ui
3. Log into ESXi by using your AD credentials
4. Yes you can change now password of the local "root" user
I have performed these steps a week ago for some 6.7 Hosts.
If you have vCenter you can set root password using Host Profiles: