At the time you create your virtual machine you were asked to create virtual hard drive (VDI) to hold your new OS.
Choose a size large enough to not run out of space and up to max. 2 TB. If you had created a dynamically growing disk (this is default) the physical space used on your host will only be used to the actually need, but never exceeding the limit you gave here (e.g. 50 GB):
On a default installation Ubuntu will create a partition holding the OS and your data (/
) plus a /swap
partition. Swap size depends on RAM (you are allowed to assign all your phsyical RAM but it is better to leave some for the host). So depending on your virtual memory size the swap partition will add to the virtual hard drive space needed.
In case you do not want to use a swap you need to perform a custom install of Ubuntu ("do someting else").
It is possible to grow the virtual disk after installation but there is more involved than just a command. You may at present be much faster you just installed Ubuntu again, but on a much bigger virtual drive.