I'm using OS X. I had a VM with several nested snapshots. I wanted to move this to a new location, but I didn't have enough free disk space to use "clone".
Because I'm on a Mac, the various instructions here didn't quite work for me. This is what I did:
Move the various files (the
.vdi file, and the folder named after the VM, which contains the
.vbox file, the
Snapshots folder etc) from the default
~/VirtualBox VMs to the new location.
~/Library/VirtualBox/VirtualBox.xml with a text editor, updating
MachineEntry with the new
.vbox file location.
.vbox file with a text editor, updating the first HardDisk entry with the new
.vdi file location.
Using the VirtualBox interface, I also changed VirtualBox > Preferences > General > Default Machine Folder to point to where I want to create new VMs in the future. (This setting seems to be stored in the
~/Library/VirtualBox/VirtualBox.xml file... although this setting can be modified in the UI, it seems that for these other settings, we need to resort to the file editing I describe above.)