Let me outline two exemplary cases of running Ubuntu in Virtual Box:
Occasional testing of softwares in different Ubuntu versions
We may not want to take the time, and we may not have the hard disk space for a full installation. In this case we may just boot a live session where we install our application for testing. This installation will not be available after a reboot of our VM (but of course it will survive a snapshot).
- The guest OS is not upgraded, therefore bugs will not have been fixed
- No acess to features from guest additions (i.e. 3D graphics)
- Installation of additional librariers or software are volatile
Testing software on a customized guest OS
In case our software has additional dependencies, or we need additional applications for debugging we may not want to load them each time we install the application but rather have an upgraded or customized guest OS for testing purposes.
- Time needed for installation
- Some hard disk space needed for the VM image
We can see that it depends much on the use case when a live system or a full install may be better.
I have both of them at hand to decide this from case to case.
Due to restrictions from a virtualized OS you will never have the performance you have from an installation on bare metal. If performance or 3D capability matters I'd therfore recommend a dual boot installation.
Pre-built virtual machines with Ubuntu as a guest OS are not recommended:
- These machines are customized in a way we can not control (worst of all they will have a predefined fixed hard drive space).
- There is no guarantee that these machines are free of unwanted additions.
- They do not come with an up-to-date upgraded Os, which is a further security issue.
- They are not built on the most recent Virtual Box version, therefore guest additions will have to be reinstalled.
There is not really a benefit from these prebuilt machines as the downloads are much larger as compared to the Ubuntu installation CD. In my experience the additional time for download, and the need for additional tweaking to meet our needs (upgrading, setting locale, set up users, etc.) outweighs far the time you'd need to just install Ubuntu from scratch (should take roughly 20 mins.).
Note that even the most known site for pre-built virtual machines, VirtualBoxes will let you perform a real installation from their download as can be seen from the following note:
the installation is done from the CD, with default parameters set.