VirtualBox – moving virtual disks
Having installed VirtualBox I created a few virtual machines, with 20GB virtual disks each. After all, I’ve got a 1TB hard disk in my computer.
When Linux started complaining about running out of disk space I realised that my main drive is a 256GB Solid State Drive, and that is where VirtualBox was storing the virtual disks. Time to move the virtual disks. Please note that it is a bit of a manual process and, whilst it worked fine for me, if you’ve already invested a lot of time setting up your virtual machines, I suggest that you test this out by moving one or two VMs first.
- Stop all VMs, stop VirtualBox
- Find a folder called “VirtualBox VMs” (probably in your home folder), and move it to the new location
- Or move just a few files first, to make sure it works
- Restart VirtualBox
- In File -> Preferences -> General, point the Default Machine Folder to the new location
- All your existing VMs are now broken. Delete them
- One at a time: Machine -> Add
- Select the .vbox file from the new folder