Since there is no option to reset the root password with VCSA running, we need to restart the VCSA in single-user mode. To do that, restart the VCSA, and when the PhotonOS logo is displayed, press e on your keyboard to edit the boot loader. Locate the line starting with linux, and at the end of the line add the following:
rw init=/bin/bash
Now press F10 to continue the boot process. Once in the root shell, mount the root partition:
# mount -o remount,rw /
Now change the root password:
# passwd
# New Password:
# Retype new password:
After the password has been changed, unmount the root partition:
umount /
and restart the VCSA
# reboot -f
Confirm that you can log in using the new root password.