Can I copy a VM from one machine running VB to another

This is for discussing general topics about how to use VirtualBox.
Post Reply
acomber
Posts: 8
Joined: 27. Jan 2012, 19:23
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: W2003, linux, solaris

Can I copy a VM from one machine running VB to another

Post by acomber »

Hi

I have VirtualBox installed on two different PCs. The hardware for the two machines is NOT the same. Is it possible to create a VM on one machine and then make a copy which I can then run on another (my second) machine? If so, can anyone provide a link to document explaining how or some instructions?

Many thanks.

Angus
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Can I copy a VM from one machine running VB to another

Post by Perryg »

The hardware for the two machines is NOT the same.
Explain the difference.
acomber
Posts: 8
Joined: 27. Jan 2012, 19:23
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: W2003, linux, solaris

Re: Can I copy a VM from one machine running VB to another

Post by acomber »

Perryg wrote:
The hardware for the two machines is NOT the same.
Explain the difference.
By that I mean the host OS hardware. - They are both PCs - Intel based.

I am assuming that this does not matter. But can someone please confirm and next step for me would be getting started in how to copy the VM. Can I just copy the contents of the appropriate /VirtualBox VMs/<vm_name> folder?

Any help would be much appreciated.

Angus
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Can I copy a VM from one machine running VB to another

Post by Perryg »

Yes it should work.
Copy the *entire* guests folder to the other machine and dbl click the *.vbox file to register it
acomber
Posts: 8
Joined: 27. Jan 2012, 19:23
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: W2003, linux, solaris

Re: Can I copy a VM from one machine running VB to another

Post by acomber »

I have also found information on VboxManage clonevdi. It seems I just need to pass as parameters vdi file to copy and 2nd param, new file name. But I am not sure what this is doing. It seems to just make a copy of the vdi file. I can easily do this using the native operating system copy. So not really sure of the purpose of this command?
acomber
Posts: 8
Joined: 27. Jan 2012, 19:23
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: W2003, linux, solaris

Re: Can I copy a VM from one machine running VB to another

Post by acomber »

Perryg wrote:Yes it should work.
Copy the *entire* guests folder to the other machine and dbl click the *.vbox file to register it
That sounds very easy. OK I will try that.
acomber
Posts: 8
Joined: 27. Jan 2012, 19:23
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: W2003, linux, solaris

Re: Can I copy a VM from one machine running VB to another

Post by acomber »

I have digged further and it seems there is a vdi file which is a pure image and an associated .vbox file which is an xml file describing the hardware environment. so I am hoping I can just copy those 2 files to real machine2 and off I go.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Can I copy a VM from one machine running VB to another

Post by Perryg »

Do you have snapshots?
Look it does not get any easier than what I explained above. You can make it hard if you like but if there are snapshots, or any other diff disks you are more than likely going to have issues.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Can I copy a VM from one machine running VB to another

Post by mpack »

The procedure for doing this has changed a lot in the last year, so my advice to you is to stop digging up obsolete info, and follow Perry's advice. Especially stop digging on sites outside this one, as the info given IME is often plain wrong, in addition to being crazily obsolete (e.g. the advice to use "VBoxManage clonevdi" is about 3 years obsolete).

OTOH, one resource it would do no harm at all to dig into is the current official user manual. You will find nothing about "VBoxManage clonevdi" in there, except a note that it's retained for backwards compatibility.
acomber
Posts: 8
Joined: 27. Jan 2012, 19:23
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: W2003, linux, solaris

Re: Can I copy a VM from one machine running VB to another

Post by acomber »

Hey thank you all for the help. The advice is helpful. It sounds like VB has changed quite a bit. So I will copy as advised:

Copy the *entire* guests folder to the other machine and dbl click the *.vbox file to register it.

Many thanks.
Post Reply