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.

I use VirtualBox 4.1.x on my Ubuntu machine and I've set up several virtual machines. Since there are several ways one can move a VM in VirtualBox to another computer, I was wondering which one is the recommended way:

(1) Use the "Import/Export utility";
(2) Copy the entire VM folder, containing the .vdi and .vbox files;
(3) Clone the VDI using "Virtual Media Manager" and then recreate a VM on the target machine but using the cloned VDI as the hard disk.

I have successfully used the 1st method several times and it has always worked but the problem is that after exporting and importing, the disk image is transformed into .VMDK and no .VDI anymore!

The 2nd method is probably the easiest but I'm not sure that simply copying the files will work or not on the target machine. When searching about this method, I found some people had problems which they had to edit the VirtualBox.xml file to solve it!

At last there's the 3rd method but it requires the extra work of creating a VM similar to the original VM configuration, which is not desirable.

It's clear from the above explanation that my desired method is the 2nd one, but I need expert advice on this if it works or not. I don't want any XML editing get in my way!

So what's the best method of safely transferring my VM's to another computer with VirtualBox ?

share|improve this question
    
Just transfer the files and place them in the same location. –  Ramhound Aug 18 '13 at 21:16
add comment

1 Answer 1

up vote 9 down vote accepted

Well done for doing your research. I regularly use all three options.

Option 1 is the easiest because it combines the whole VM into a single file and transfers it over without issue pretty much every time. However, in my experience when creating the OVA or OVF file for export it throws away all snapshots and if done incorrectly can result in a VMDK file. When you re-import the VM you should be able to select what type of HDD file you want created, VDI or VMDK.

Option 2 is my preferred option and although I have had to edit the XML file a few times it's been my own fault for messing something up. Make sure that when you copy the VM, you get ALL the files associated with it. The issues I ran into were when certain snapshots and secondary VDI files were in the wrong directory and weren't copied properly. If you copy all the files (and permissions) you should not have any problems whatsoever.

Option 3 is less desirable because then you have 2 copies of a VM, and it can cause licensing issues, network issues, etc, depending on how you clone the VDI file.

In summary, I would definitely recommend option 2, just make sure you get all the needed files when you move it over.

share|improve this answer
    
Thanks for the reply. I will wait a few more days to see if anyone else has any other point. (+1) –  Seyed Mohammad Aug 19 '13 at 8:08
    
Looks like no one has anything to add ... So I'm marking this as the answer. –  Seyed Mohammad Aug 27 '13 at 7:09
add comment

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.