Ticket #4752 (closed defect: worksforme)

Opened 5 years ago

Last modified 4 years ago

Allow virtual machines to be run from multiple locations simultaneously.

Reported by: omega Owned by:
Priority: minor Component: other
Version: VirtualBox 3.0.4 Keywords: manager, directories, home folder
Cc: Guest type: Linux
Host type: Linux


I use both external and internal drives to store virtual machines. This creates an issue as it appears as though I can only run VMs located in my home directory. Most suggestions I've heard to this issue are to provide a new base directory for vbox to run from, but I want to run virtual machines from two or more separate locations...

Is there any way the vbox UI can enumerate systems from multiple locations, discern when they are "unavailable" (perhaps grey them out?) and allow them to be started from those locations?

Change History

comment:1 Changed 4 years ago by frank

  • Status changed from new to closed
  • Resolution set to worksforme

You can do the following:

$ VBoxManage --nologo createvm --name foo
Virtual machine 'foo' is created.
UUID: 882e0d1b-e058-4f5b-a570-6296f1007b9c
Settings file: '/home/user/.VirtualBox/Machines/foo/foo.xml
$ mkdir /home/bar/foo
$ mv /home/user/.VirtualBox/Machines/foo/foo.xml /home/bar/foo
$ VBoxManage registervm /home/bar/foo/foo.xml

After that, the data for machine foo will be stored in the directory /home/bar/foo. Make sure that you store the virtual disk there as well. If the directory /home/bar/foo is not available (because the drive is not plugged, you can still start the GUI but it would tell you that you cannot start that specific VM.

comment:2 Changed 4 years ago by UFO

You could also:

  1. create a VM in your home directory (using the GUI for example)
  2. move the VM files to the other drive (mv /home/user/.VirtualBox/Machines/foo /media/external)
  3. create a symlink in your home directory to the files on the external storage (ln -s /media/external/foo /home/user/.VirtualBox/Machines/)

If the VDI file is stored in another directory, you can do the same (move, then symlink) for the VDI file - or simply move and then attach the VDI from it's new location.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use