Page 1 of 1
Cloning - to a different disk?
Posted: 15. Mar 2012, 15:23
by sternfan
Hi all,
I am interested in using cloning for backups, however from what I can tell it places the clone in the same location as the original VM (not ideal for a backup). Is it possible for a clone to be on another disk/location?
Thanks,
Rob
Re: Cloning - to a different disk?
Posted: 15. Mar 2012, 15:25
by mpack
You don't need to clone to make backups. In fact it's better if you don't. Just copy the VM folder to secondary storage (advice only good if VM was created by VirtualBox v4.0 or later).
Re: Cloning - to a different disk?
Posted: 15. Mar 2012, 15:52
by sternfan
Why not use clone for backups? My testing works pretty well - I have an Ubuntu LAMP VM that I tinker with - make a clone, shut down the original and restart the clone in only a few minutes. I had been doing backups in the past by exporting to a network share then testing by doing an import. This works well but is time intensive compared to cloning.
Copying the VM folder - can this be done while the VM is running?
Thanks,
Rob
Re: Cloning - to a different disk?
Posted: 15. Mar 2012, 16:35
by mpack
Cloning modifies the UUID and potentially makes other changes too. A backup should not have any mods.
The VM files are not guaranteed to be in a fully consistent state until the VM is shut down, so it is not advisable to copy the VM folder while the VM is running. Whether is it possible or do it not, I've never needed to find out.
Re: Cloning - to a different disk?
Posted: 19. Mar 2012, 13:45
by sternfan
Ok - looks like there is a bunch to figure out here. If cloning doesn't actually make a true clone - then what good is it? What is it actually for? While thinking on this, I went back to the manual. The first line on cloning reads:
"To experiment with a VM configuration, test different guest OS levels or to simply backup a VM, VirtualBox can create a full or a linked copy of an existing VM." (emphasis mine)
So how dangerous is it to rely on clones? What's the worse that can happen?
Rob
Re: Cloning - to a different disk?
Posted: 19. Mar 2012, 16:04
by mpack
I will not attempt to justify the exact choice of wording in the manual, as I didn't write it.
As to the purpose of cloning: it's to make a working copy of an existing VM, i.e. a new VM that can work on the same host while the original VM is still registered. That means that certain identifiying features such as UUIDs and MAC addresses may have to change.
sternfan wrote:So how dangerous is it to rely on clones? What's the worse that can happen?
The worst that can happen is that the clone VM fails to boot up. On Linux the change of disk UUID can mean that the disk isn't found during boot. I'm not a Linux expert but I believe the fix is to edit the grub boot stuff. On Windows the change in disk UUID, VM UUID, MAC address etc can change the hardware sufficiently that certain apps will refuse to run and Windows itself may need to be reactivated - and then you'll have problems because you can't have two different activated profiles with the same product key.
To me the whole thing is obvious: if you want a guaranteed good backup of a working setup then you make an
exact copy, not a similar copy. Still, it's your risk, so do it your own way by all means.