Sunday, June 2, 2013

VirtualBox: setting a home for Virtual Boxes

Sadly, when you install VirtualBox on Linux, by default it chooses your /home/oracle home (my user is oracle) to store the VMs. I hate having stuff installed in my home.

In /home/oracle/.VirtualBox/VirtualBox.xml there is an entry
SystemProperties defaultMachineFolder="/home/oracle/VirtualBox VMs"
You can change this by running VirtualBox and changing preferences (File/Preferences); it's irritating because this requires to open a graphic session, which is not scriptable.



Since in my home partition I have little space, every attempt to create a VM dies with:
vagrant up VBoxManage: error: Could not create the clone medium VERR_DISK_FULL

Another way is to create a symbolic link (mmmmmm) /home/oracle/VirtualBox VMs -> /oracle/VirtualBox VMs
(besides, who chose a folder name containing SPACES???? Are you working at Microsoft or what?)

or also you manually hack the VirtualBox.xml

So far, my experience with Vagrant and VirtualBox has not been very good. These tools still need to be ironed to make them fool (me) proof.

Like, the idea of Vagrant to put all its stuff in a .vagrant.d (initial .) is moronic, it took me a while to find out this hidden repository. I assume you can change this by setting VAGRANT_HOME (see http://emptysquare.net/blog/moving-virtualbox-and-vagrant-to-an-external-drive/ ). It would be so much better if one could choose these settings during an installation phase.



No comments: