How to choose location of vm?

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Red Squirrel
Posts: 118
Joined: 25. Jan 2009, 05:28

How to choose location of vm?

Post 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.
baf
Volunteer
Posts: 829
Joined: 27. Sep 2008, 06:18
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: linux,xp,win7
Location: Luleå or Skellefteå, Sweden

Post 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
Some say: "You learn as long as you live".
My way: "You live as long as you learn".
Red Squirrel
Posts: 118
Joined: 25. Jan 2009, 05:28

Post 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.
baf
Volunteer
Posts: 829
Joined: 27. Sep 2008, 06:18
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: linux,xp,win7
Location: Luleå or Skellefteå, Sweden

Post 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>]
Some say: "You learn as long as you live".
My way: "You live as long as you learn".
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post 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.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply