I am running EJBCA in virtualbox as mentioned at https://ejbca.org/download.html . When I try to "Create Browser Certificate" or "Create certificate from CSR", it is asking for
Username
and
Enrollment code
Where do I get the username and the enrollment code?

You have to create an end entity before (you must be connected to the administration GUI, and already imported the p12 file in your browser)
You can follow the three follwing link to create an end entity :
In this last step that you will define your username and password.