Can I clone/export a VM in VirtualBox from 4.1.10 and import into 4.1.12?

I have some OS installs in VirtualBox 4.1.10 on openSUSE 11.3. I want to clone them and put them into VirtualBox 4.1.12 on openSUSE 12.1. Will there be any issues with this? What’s the best way to do this (steps)?

Let me say that I have just copied over the disk image to a different PC and created a new config that points to the file. There are several settings to remember and reset, but its not all that hard to do really if you don’t find a cloning answer.

Thank You,

You could/should have copied the config file too (it’s an .xml file). The machine uuid is not going to change. Plus, if you create a new configuration, the network adapter of the virtual machine will get a new MAC address - among other changes. I don’t know if it matters to you (probably not), but it might for some people.

It might be worthwhile to put together a real procedure to do a clone I guess, but a changing mac address has made little difference for openSUSE copies. I often will make a clean install of the latest, set to KDE, GNOME and such and I don’t even update them. I then make a copy for each machine for testing where I can test a new bash script and such. It has not seemed to matter with Windows XP either. So, have you already described the clone process somewhere before for VirtualBox?

Thank You,

Here’s a very simple example where it would matter: Your virtual machine (no matter which OS) receives its IP trough dhcp (the easiest and most common case). Your dhcp server (if you happen to have one of course) always reserves the same IP to this particular MAC address. Only this IP (or an IP within this range) is allowed to access some other servers in your lan. If the MAC address has changed, your virtual machine will receive a random IP and might be unknown or unwelcome in your lan … and you’ll have to change edit your DNS records too, etc, etc.

Of course if you’re just using a virtual machine to play with, it doesn’t matter. But if you just take the virtual machine (the .vdi file) and create a new configuration - which is possible and uncomplicated - you might also change other virtual hardware components if you don’t remember the previous configuration (amount of ram and video memory, number of CPUs, or whatever devices you enable). You might also end up with an EFI Bios, if you blindly check this option. lol!

Anyway, the simplest by far is to copy the .xml file as well.

I might have described and scripted the creation process of a virtual machine (basically that’s what vboxlive does), but there is no clone process. Just copy the .vdi and the .xml. You can use vboxmanage to change anything you need in the configuration file, and you use this command in scripts. Well, yes, in this case, you could set up a clone process and keep or change what you want. The command is documented.

# vboxmanage --help

It actually has options to clone virtual machines and virtual disks. That would be the answer then:

# vboxmanage --help | grep clone
  clonevm                   <uuid>|<name>
  clonehd                   <uuid>|<filename> <uuid>|<outputfile>

But it’s not impossible that you can do that with VBox GUI too - although not every option is available in the GUI (same for KVM).