How to copy a VM to another Windows PC?

This is for discussing general topics about how to use VirtualBox.
Post Reply
DavidA
Posts: 82
Joined: 21. Dec 2010, 12:31
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Centos 5

How to copy a VM to another Windows PC?

Post by DavidA »

Hi

There are many threads and articles about cloning a VM, but please will someone tell me the best way to copy a VM from one machine to another? I simply want to give another user my VM.

I think it best not to give them all snapshots of the VM - I want simply to give them my latest snapshot.

I am running VB 4.0.8. Hoping for a simple answer :)

Best regards

David
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: How to copy a VM to another Windows PC?

Post by Sasquatch »

If the VM is created with version 4.0, you can simply copy the VM folder and use Machine > Add on the other system to add the VM to VB.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
DavidA
Posts: 82
Joined: 21. Dec 2010, 12:31
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Centos 5

Re: How to copy a VM to another Windows PC?

Post by DavidA »

Sasquatch wrote:If the VM is created with version 4.0, you can simply copy the VM folder and use Machine > Add on the other system to add the VM to VB.
Thanks for your reply. My VM has numerous snapshots. I am thinking that it would be nice to copy just the most recent snapshot to the new machine. Would the correct way to do that be to first copy the VM folder to the new machine as you suggest, then add the VM on the new host, and then 'Delete' each snaphsot in turn, starting at the most recent, on the new host?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How to copy a VM to another Windows PC?

Post by Perryg »

You may want to look at CloneVDI Tool and see if this will do what you need. It allows for cloning from the last snapshot IIRC, but read all the entries and user help files first (inside the zip file).
DavidA
Posts: 82
Joined: 21. Dec 2010, 12:31
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Centos 5

Re: How to copy a VM to another Windows PC?

Post by DavidA »

Perryg wrote:You may want to look at CloneVDI Tool and see if this will do what you need. It allows for cloning from the last snapshot IIRC, but read all the entries and user help files first (inside the zip file).
Thanks, I have seen that tool. However, I would like to understand the basic principles of what is going on inside VirtualBox, rather than adopt another tool at this time.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How to copy a VM to another Windows PC?

Post by Perryg »

That's your decision of course. I only suggested the use of this tool due to the inherent fragility of snapshots IMHO. Make one mistake or even a PC hiccup and you run the risk of loosing it all. Just be very careful and have very good backups of everything VBox.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: How to copy a VM to another Windows PC?

Post by Sasquatch »

You can see how it goes without flattening the snapshot tree and just add the machine on the new Host. But things might turn ugly and you have to discard the current state. I had to do that when I reinstalled my laptop (did a full reinstall, including partition order). The VMs were moved to a safe location, then I added them manually to VB. This resulted in an unbootable VM until I discarded the current state and thus reverted to the last snapshot state (all changes since were lost).
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply