Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

VirtualBox seems to lack the obvious "File -> Open" menu option. Frustrating!

More details...

I recently got a new workstation and I moved my VirtualBox and VMWare Player VMs from the old PC to the new.

The VMWare Player VMs are a snap... you go to "File -> Open a Virtual Machine...", find the .vmx files from the old PC, and voila! It's up and running. All the required files apparently are in the same folder.

With VirtualBox there just doesn't seem to be a way to do that. Looks like VMs are tied to the original host in some magical/invisible way like registry entries, etc.

share|improve this question

11 Answers 11

up vote 4 down vote accepted

If you want to use an existing virtual hard disk and 'open' it into Virtual Box - you need to go to File > Virtual Media Manager and select 'Add'.

Browse to your existing disk and select ok. This registers a disk with Virtual Box. Now you need to attach this disk to a new or existing VM to actually use it.

share|improve this answer
1  
I created a new machine and then attached the old disk to it... not very intuitive but works for me! Thanks –  Alex R Sep 16 '10 at 2:32
2  
When I try that (adding a .vhd created w/ Win7 Virtual PC) I get the error: Failed to open the hard disk V:\ProgramData\VirtualPC\CleanTesting_XP sp1.vhd. Parent medium with UUID {199e419e-a076-d811-81ef-8eeb0865d5ed} of the medium 'V:\ProgramData\VirtualPC\CleanTesting_XP sp1.vhd' is not found in the media registry ('C:\Users\Clay/.VirtualBox\VirtualBox.xml'). –  Clay Nichols Dec 14 '10 at 14:46
7  
Add new does not work in VirtualBox 4. Any other solution? –  Codism Apr 8 '11 at 21:30
2  
For VirtualBox 4 and up (no "Add" button), see Kevin's comment. –  Alex Che Aug 1 '12 at 16:06
1  
This answer appears to be obsolete. –  Bryce Jan 3 at 19:16

The previous answers appear obsolete.

As of version 4 of the Oracle VirtualBox Manager, the "Add" option is hidden in the "Machine" menu (which is an operating system menu). Just select Add, and navigate to the .vbox file you want. This works great even if the vbox file is on an external drive: if the drive is later removed, the missing boxes are simply marked as 'inaccessible'.

enter image description here

share|improve this answer

In the machine folder there is a *.vbox file. Drag it into the VM list in VirtualBox.

share|improve this answer
    
This worked for me on VirtualBox 4.1.18. Just dropped the virtual machine *.xml file to the VM list. Also needed to add the system's virtual disk back again in the system / storage dialog. –  Alex Che Aug 1 '12 at 16:03
    
Worked for me on Ubuntu 12.04 & VirtualBox 4.1.12 –  David Kaczynski Sep 4 '13 at 19:46
1  
Doesn't seem to work in VirtualBox 4.3.6 on Windows. Won't allow me to drop anything on the window. :-( –  Simon Feb 10 at 1:07

Importing existing virtual machines from another host into VirtualBox 4 and above on Windows hosts:

  1. Importing the vdi virtual disk:
    1. Go to the menu: File ⇨ Virtual media manager
    2. Drag and drop the [vm_name].vdi into the list
  2. Adding the imported machine to the vbox manager list:
    1. Double-click on the [vm_name].vbox file in the directory of the vm, to add this machine to the vbox manager list
    2. Double-click on the [vm_name].vbox inside the vbox manager list to start the appliance
  3. Sidenotes:
    1. If the VM comes from an older vbox release, you will have an [vm_name].xml inside a sub directory instead of a [vm_name].vbox in the same directory as [vm_name].vdi
    2. Copy the [vm_name].xml into the same directory as the [vm_name].vdi and rename it to [vm_name].vbox
    3. Proceed with step 1.1 or 2.1 depending on the actions you have already taken
share|improve this answer
    
Unfortunately it doesn't seem to allow you to drop a VMDK on the Virtual Media Manager window in VirtualBox 4.3.6 on Windows. :-( –  Simon Feb 10 at 1:13
    
@Simon Find the .vbox file and double click it. It added itself to the list of VMs in the manager for me (Windows 8.1) –  Bojangles Mar 14 at 9:21

By default, VirtualBox loads its configuration data from the folloing paths:

  • On Windows, this is %HOMEDRIVE%%HOMEPATH%\.VirtualBox; typically something like C:\Documents and Settings\Username\.VirtualBox.
  • On Mac OS X, this is $HOME/Library/VirtualBox.
  • On Unix-like systems (Linux, Solaris), this is $HOME/.VirtualBox.

This means that machines are specific to the logged in user. If you need to set a common place to store machines between different users you can override the default locatiion by setting the VBOX_USER_HOME environment variable. VirtualBox will use the path in this variable as its store for VM configuration data.

See the VirtualBox help topic on VirtualBox configuration data for more information.

share|improve this answer

I'm not sure I see a problem here. In VirtualBox if you are opening a new VM (one you might have created on a different computer) you use File/Import Appliance and then browse for the file to open. After importation it can be found in the main VM panel.

If you created the VM on the same computer then it's already in the left pane of the main program window.

It may be different from what you're used to but I don't see why it would be frustrating...

share|improve this answer
    
No luck... "File/Import Appliance" requires an OVF file, which doesn't exist (I guess, I could have created one by doing "Export Appliance" on the old computer, but it's too late now). –  Alex R Sep 12 '10 at 15:10
    
I think the V'Box documentation is pretty clear on this requirement. Unfortunate that you can't go back and redo. What files DO you have available? Maybe there's a way to convert? Or load the old files back on VMware and re-export? –  hotei Sep 12 '10 at 16:20

Regarding errors like this:

Failed to open the hard disk V:\ProgramData\VirtualPC\CleanTesting_XP sp1.vhd. Parent medium with UUID {199e419e-a076-d811-81ef-8eeb0865d5ed} of the medium 'V:\ProgramData\VirtualPC\CleanTesting_XP sp1.vhd' is not found in the media registry ('C:\Users\Clay/.VirtualBox\VirtualBox.xml').

VirtualBox seems to cache the UUID associated with a virtual disk filename. It's not in the file the message says; it must be stored elsewhere. Apparently VirtualBox 4 doesn't support unregister/register disk commands any more.

In the end, I found if I changed the name of the VDI file, then it no longer matches the cached entry and VirtualBox doesn't complain.

share|improve this answer
    
This doesn't seem to work on 4.3 releases. When I try every answer to this question I always get this message :( –  Álvaro G. Vicario Dec 12 '13 at 11:35
    
I've now found File > Virtual Media Manager. This allows you to deallocate VDI images from machines and remove them from the media registry. They can then be re-added to a VM as desired. –  Ben McIntyre Dec 13 '13 at 0:51
    
Correction to my previous comment: I was getting this error message because the original disk image was not self-contained—it was linked to an undo disk or it was a diff over another image or something like that. –  Álvaro G. Vicario Dec 13 '13 at 8:58
    
Yes, I had errors like this because some of my machines were based on snapshots of VMDK images. My eventual solution was to create a new blank machine with the root VMDK attached, then create another blank machine with the VMDK snapshot attached, and then finally I could double-click my VBOX file and it would load without errors. –  Simon Feb 10 at 4:55

If you are on a Unix-like computer you can do this:

find /path/to/vms -name "*.vbox" -exec VBoxManage registervm {} \;

You just need to remember to provide the entire path to the .vbox file. If you specify a relative path it will foolishly assume that it is relative to your home folder.

For example, I did this after rebuilding my workstation:

$ find /store/vm -name "*.vbox" -exec VBoxManage registervm {} \;

It found and re-registered all of my virtual machines.

share|improve this answer

On Debian, I edited ~/.VirtualBox/VirtualBox.xml and also the machine.xml I want to import : ~/VirtualBox VMs/$machine/$machine.xml

Close VirtualBox, add in VirtualBox.xml :

<MachineRegistry>
  <MachineEntry uuid="{$find-in-machine.xml}" src="/$fullpath-to-machine.xml"/>
</MachineRegistry>

Relaunch VirtualBox, add host-only network if needed, import ext pack if needed (https://www.virtualbox.org/wiki/Downloads), install virtualbox additions if needed : sudo apt-get install virtualbox-guest-additions-iso.

Start your VM.

share|improve this answer

On Mac OS X, simply open the .vbox file (from the Finder) and it gets added to the list of virtual machines.

share|improve this answer

In VirtualBox 4.3.8 running on a Win 7 host the solution works very smoothly by doubleclicking on the .vbox file of the machine - it even found the respective disks and associated them. Earlier I tried the registervm command line option but that complained about the attached hard disk not being found, as the documentation predicts. I then associated the .vdi virtual harddisk filetype with Virtualbox.exe, not sure if that helped.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.