VirtualBox

Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#4752 closed defect (worksforme)

Allow virtual machines to be run from multiple locations simultaneously.

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

Description

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 (2)

comment:1 by Frank Mehnert, 14 years ago

Resolution: worksforme
Status: newclosed

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 by Ivo Smits, 14 years ago

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.

© 2023 Oracle
ContactPrivacy policyTerms of Use