Page 1 of 1

How to choose location of vm?

Posted: 25. Jan 2009, 23:26
by Red Squirrel
I want to organize my VMS so that they are stored on my raid instead of all in the home folder. How can I specify the location of a VM before creating it, or if I move it, how do I go about adding it into the vbox inventory? I figured how to store the disk itself on the raid but I want to store the entire vm that way I don't have to recreate all my VMs should a disaster occur, the raid is where all my data goes and is what gets backed up.

Posted: 26. Jan 2009, 00:04
by baf
Warning untested.

First backup all xml files. Make sure nothing is running.

Then:
VBoxManage unregistervm <name>

Move the file and
VBoxManage registervm <filename>


Good Luck.
Oh and make sure to be very careful if you have snapshots and/or saved state

Posted: 26. Jan 2009, 00:38
by Red Squirrel
I'll give that a shot. If I do try to do snapshots will they automaticly go in the same folder as the vm file or will they go in home directory?

I thinking of just simplifying things and leaving it as is and just adding the home directory to the backup job. As long as I know to put those files back should I reinstall.

also where do registered vms go? I would have figured something like /etc/vbox but that is empty.

Posted: 26. Jan 2009, 00:45
by baf
Settings (and machine/disk/dvd registry) goes into
.vbox/VirtualBox.xml or something like that ( I'm on mac os X myself)

Default for snapshots is a directory "near" the machines.

VBoxManage modifyvm <uuid|name> [-snapshotfolder default|<path>]

Posted: 28. Jan 2009, 02:36
by Sasquatch
I moved my machines and did it as follows:
1. Copy the XML files for backup purposes;
2. Move the Machines and all it's corresponding files to the new location;
3. Edit ~/.VirtualBox/VirtualBox.xml and change the folders listed there for my VMs to the new location.
4. Start VB, see all the machines in accessible state;
5. For new VMs, change the Default folders in the Global Settings to the new location.