Key takeaways:
Press and Hold Shift at VM Ubuntu server start up,i.e. send ctrl+alt+delete to reboot from VM menu
Press e and edit Ubuntu Grub script
At the end of the last line that starts with linux, append "rw init /bin/bash"
Press F10/ Ctrl+X to reboot
After entering passwordless console, use "passwd root" to reset root password
use "exec /sbin/init" to reboot
next time when logging in, press and hold shift again, and see the line, previous appended text has gone, just normally log in with new password
refs:
https://linux.how2shout.com/how-to-reset-ubuntu-22-04-lts-root-password/