Sorry to hear you are having issues. Sounds pretty frustrating. I understand that you are trying to get a VM running with cPanel installed.
cPanel is a third party service and they have a preconfigured image available from the Marketplace. It seems like you are trying to deploy this image and facing an issue. The guide provided by cPanel can be found here.
I tested the cPanel image and also found issue with the default configuration. I logged in during the install and see that it failed. Ideally cPanel would provide an updated Marketplace image to prevent this issue.
2024-04-19 15:58:06 788 [1658] (FATAL): cPanel & WHM does not support Ubuntu 20.04 on version 120. Please refer to our additional installation instructions at https://go.cpanel.net/ubuntu-install-procedure
Note, WALinux did install automatically, but it took some time for this to complete. It wasn't necessary for me to manually install it for this image.
Since this image is out of date and requires lots of upgrades before being able to install cPanel, I recommend installing cPanel on a fresh image. I used Ubuntu 22.04 LTS image. By default Ubuntu does not use selinux and I did not have any issues installing cPanel. Once the VM was running I logged in and ran these commands:
sudo su
cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
[2024-04-19 16:29:46 +0000] [17620] ( INFO): cPanel install finished in 14 minutes and 33 seconds!
[2024-04-19 16:29:46 +0000] [17620] ( INFO): Congratulations! Your installation of cPanel & WHM 11.120 is now complete. The next step is to configure your server.
I am not sure what issue you were having with the password. When you create a VM you can setup to either use a SSH key or password. I recommend choosing the SSH key method. Once inside the VM obtaining root or sudo commands shouldn't require a password.
Hope this helps! Let me know if you still have questions or need further assistance.
If you still have questions, please let us know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts.
If the answer has been helpful, we appreciate hearing from you and would love to help others who may have the same question. Accepting answers helps increase visibility of this question for other members of the Microsoft Q&A community.
Thank you for helping to improve Microsoft Q&A!