How to move VirtualBox machines to another hard drive
Recently I needed to free up some space on my Mac’s internal hard drive and decided to move my Virtualbox virtual machine disk images to an external drive.
At first I thought it was going to be as easy as just copying the .vdi files to the other drive and then pointing each Virtualbox machine to the new location of its corresponding .vdi file. Turned out it isn’t quite that easy.
For future reference, here’s what I did:
- Shut down the machine
- Use clonehd to create a clone. Open a Terminal window and enter vboxmanage clonehd [original] [clone], replacing [original] with the full paths to the .vdi file you want to clone and [clone] with the location where you want the clone, i.e. vboxmanage clonehd /VM/ubuntu10.10.vdi /Volumes/ExternalDisk/VM/ubuntu10.10.vdi.
- Open VirtualBox and go to Settings - Storage for the machine.
- Remove the disk in the Storage Tree.
- Add the cloned disk instead.
- Start the machine to verify that it works.
The Cloning disk images section of the VirtualBox manual notes that there may be problems with drive IDs and newer Linux distributions. I did not notice any such problems, but YMMV.
- Previous post: Screen readers, list items and list-style:none
- Next post: Authentic Jobs turns six
Comments are disabled for this post (read why), but if you have spotted an error or have additional info that you think should be in this post, feel free to contact me.
Subscribe / follow
Sponsors
Authentic Jobs
- Remote Sensor Software Developer at charity: water (New York, NY, Ne, US)
- HL7 Experienced Developer at Entermotion
- Technical Consultant- New York & Chicago at arvato Systems North America (New York and Chicago, In, US)
- Web Designer/Web Designer Senior at University of Michigan (Ann Arbor, Mi, Mi, US)
DreamHost web hosting
Use the promo code 456BEREASTREET3 to save USD 20 when you sign up for DreamHost

