What is the error message say, you could also post a screenshot of the error message.
There might be a pre-installed Linux VirtualBox guests made by the maintainers of the distro you are interested in. It's ready to use.
If you really want to install it yourself, make sure your VirtualBox host allocates enough resources to the Linux guest. These settings are in the Oracle VM VirtualBox Manager program.
How can I make a partion of my ssd throughout linux terminal with scripts!! It has 248mg size!!! Thanks any way!!