There seem to be a lot of posts that show how to move a VirtualBox or Boot2Docker image to a new hard drive the hard way using the command line. I just came across an easy way to move a virtual box image to an external hard drive to free up space on my main hard drive. As I start playing more with docker I cannot affort to fill my main hard drive up with docker / virtualbox images. Here is the trick.
Then control-click on the image that is stored on your main disk and clone it. Since the default is now your external drive it will clone it to your external drive.
Then boot your cloned VM to make sure it is OK and then delete your original VM from the VirtualBox UI. Then just to be doubly sure it still works.
As an added bonus, if you make new VM’s (i.e. perhaps you downloaded and installed boot2docker) they will be placed on the external drive as that is now the location where all new VMs get created.
Of course it means that you need to plug in your external drive whenever you do anything with boot2docker of VirtualBox. But you have a bunch o disk freed up on your main hard drive.