I was working with Virtualbox 6.1 with ubuntu distribution 18.04. The display resolution was too small and I wanted to change it by following this post. I did not follow accordingly, and I just tried to install Guest edition from the following option.

It messed up my full distro. After installation and rebooting the ubuntu, even if I was giving the right password, I cannot pass the login screen.

Solution
Press ctrl+alt+F3 for the tty login page. (This can be ctrl+alt+(press any button in between F1-F7, see which one works for you))
Give username. Press Enter.
Give the Password. Press Enter.
If you can login, there is still hope for you.

Run df -h

We can see the /dev/sda1 that is actual drive that we have created during the installation. This screenshot was taken when the problem was solved. When I was facing the problem there was extra /home folder in the column of Mounted on (that is not showing when the problem was solved).
Tried to cd /home but no permission.

sudo ls -al /home

In the /home folder I could not see my user folder rpprnx (username). At this point, we can understand our distro is not booting from our desired sata drive (in my case /dev/sda1). To see the details of dev/sda1,

sudo mount /dev/sda1 /home
sudo ls -al /home

Oh! NOW I can see my rpprnx folder in the location of /home/home/rpprnx. To solve the problem, I ran following commands from this post.

sudo apt update
sudo apt clean
sudo apt autoremove

Run df -h
We will see the above screen shot with out any extra /home folder.

Restart the Ubuntu and Hopefully, you can log in now.!!