Page 1 of 1
Backup, clone and export - differences?
Posted: 1. Nov 2011, 22:32
by janpeter
Hi
I run VB for about two years with Mac OS X as host and I am very happy with it.
Today I ran the latest version of VB.
I have read the manual about: snapshot, clone and export but do not really get the difference.
Now I want to install some software (in Windows XP) but I may want to revert
and redo the process in a different way. I see different options:
1) Just backup the whole folder for the VM (on an external HD) and if I get problems after installation of the software
I just delete and restore the whole folder from my external HD.
2) Use snapshot
3) Clone the machine before installation.
Make installation on say the clone and if I do not like what I get delete the clone
and go on with the original.
4) Export the machine and save the file on an external HD.
If I have problem after installation I import back the original VM.
I guess alternative 4) is mainly for export to another hardware and give the possibilty to package
several VM in one package. But the pros and cons of alternative 1) -3) I do not fully understand.
Appreciate some guidance or ref to manual for info.
Thanks
Re: Backup, clone and export - differences?
Posted: 1. Nov 2011, 23:24
by Perryg
While I don't normally subscribe to snapshots as they are way to fragile it is a good choice if you need a quick restore point.
My personal choice is to actually backup the guest. VirtualBox has made the easy if you created the guest with at least version 4.*.
Guests created prior need to be cloned to be sure that you have a fully available copy to revert to.
There is a tool
CloneVDI Tool but it requires you to run in wine (if MAC supports that)
So clone the guest and use the snapshot is the safest way to try any update that you may want to regress. If the snapshot fails you always have the backup.
Re: Backup, clone and export - differences?
Posted: 2. Nov 2011, 14:27
by mpack
We already had the snapshots conversation quite recently: snapshots should not be confused with backups if you value your data. A snapshot allows you to quickly roll back changes inside the guest OS, at the cost of additional space and complexity on the host OS. They do
nothing to back up the
host OS, which is where all your VM data is really stored.
Export is a v3 feature which allows you create a VM package that can be unpacked on another vendors VM platform, e.g. VMWare. You also have a corresponding import feature. In v3 this was suggested as a backup/portability feature but it has many downsides in that role, including making many changes to your working VM.
Cloning and copying are virtually the same thing, though copying is usually taken to means simple copying using the host OS, with no ability to tweak the copy, e.g. no ability to change UUIDs so that the copy can be used at the same time as the original. I use both copying and cloning: the former when I just want a straight copy as backup, the latter when I want a new VM similar to an old VM.
| Edit: ps. I'm no Mac expert, but I know that yes, there is a version of Wine for Mac. There is also something called WineBottler which I believe helps integrate Windows apps into the Mac front end. |
Re: Backup, clone and export - differences?
Posted: 9. Nov 2011, 08:29
by janpeter
In response to Perryg.
So when I restore from backup I just (delete originals) and restore appropriate files, right?
I run VBox under Mac OS X 10.6.8 and here I find files at different places:
- user/Library/VirtualBox
- user/Library/VirtualBox/HardDisks
- user/Library/VirtualBox/Machines
- user/VirtualBox VM - and here are different new machines after upgrade to ver 4.1.4
If I have an older HardDisk under Library I guess I need to restore everything under /Library/VirtualBox
or only the HardDisks (or even /Machines)?
Before I upgraded tp 4.1.4 I had 3.1.2 and befor that 2.2, thus sparce upgrade.
The change of folder of the HardDisks to stay directly under user and not user/library may
have come by upgrade to ver 4 (adapation to Mac OS C 10.7 Lion perhaps)
My main worry is that VirtualBox need files that have some "absolute position" on the physical harddisk
like you may have on a PC for certain low level "files". Under Mac OS X with VBox 4.* is there any need
for "absolute position" of files, or can I just move around files (the ones I see)?
Thanks
Re: Backup, clone and export - differences?
Posted: 9. Nov 2011, 16:08
by Perryg
- user/Library/VirtualBox
- user/Library/VirtualBox/HardDisks <= version 4.*
- user/Library/VirtualBox/Machines <= version 4.*
- user/VirtualBox VM - and here are different new machines after upgrade to ver 4.1.4
Since you have a mixed environment you have to be sure that when backing up you include the VirtualBox.xml file. Usually this file in located in your user space (not sure where in a MAC). As for the first location you specified this usually is the program files and those I do not back up since they can be installed again.
Suggestion: If you do not have/need to retain snapshots, I would convert the older machines into the new Ver. 4.* format. This will cleanup the HardDisks and Machines folder and all important data will reside in one folder (VirtualBox VMs). I have found that while in theory it is not supposed to matter, running in the mixed environment can cause issues.
To answer your question about absolute pointers, yes there is but as I said before the program can simply be installed again. The data can not. The data also requires an absolute pointer (VDI, snapshots, and configuration) which is stored in the VirtualBox.xml file. In version 4.* and later this file is not as important/fragile. But before version 4.* it is imperative that this file be backed up. Reconstruction is all but impossible should it become corrupt, damaged, or lost.
Re: Backup, clone and export - differences?
Posted: 10. Nov 2011, 07:05
by Etepetete
@janpeter
Not too long ago I wrote detailed directions on how to take a mixed installation, i.e. Ver.3 and Ver. 4 VMs and convert it to a "pure" Ver. 4 installation. It was written for a user running on a windows host. You might want to
take a look at it, to see what such an endeavor entails. Of course, you will have to apply the steps according to the particulars of your Mac host.
Re: Backup, clone and export - differences?
Posted: 9. Dec 2011, 15:47
by janpeter
I looked through your suggested procedure.
You made it for a slightly more complicated situation I suspect.
Would the following simplified scheme work?
1) Make a clones of the VMs I have (one Windows XP and one Ubuntu machine).
Perhaps save these somewhere else also.
2) Uninstall the VirtualBox.
My host is Mac OS X 10.6.8 and I think easier to uninstall than on Windows.
3) Install VirtualBox again
4) Restore the cloned machines to the correct folder i.e.
under user/VirtualBox VMs
On Mac OS X 10.6.8 and VBox ver 4.* it seems all VBox stuff are placed
under user/VirtualBox VMs
while before VBox ver 2.* and 3.* they where place
under user/Library/VirtualBox
Thus, my idea is that the cloning process in ver 4.* are able to handle a Windows XP SP3 installation
done in ver 2.* in a complete way, that can be used by other VBox installation (anyware) right?
I understood that import/export is for interaction with VM from other vendors
while cloning should work between different VBox installations
Or do I miss something import here involving absolute pointers?
Thanks
Re: Backup, clone and export - differences?
Posted: 9. Dec 2011, 17:23
by mpack
Yes indeed, cloning the entire VM is a easy way (new to VBox v4.1) to convert a v3 VM to v4 format. The only "downside" of using cloning for this purpose is that it changes the VM and hard disk UUIDs. This
may provoke Windows into requesting reactivation, Linux guests
may fail to boot if they happened to identify the boot drive using its UUID. Both problems are relatively easy to recover from.
Cloning can also be slow: it may involve copying quite large disk images. So when I had several v3-v4 conversions to do I soon abandoned cloning and used a procedure somewhat similar to Etepetete's, though I editing the old xml rather than create a new VM (editing the xml has the advantage of preserving the VM UUID, and would work for VMs which use snapshots and/or have lots of "ExtraData" etc). Details
here.
Re: Backup, clone and export - differences?
Posted: 14. Dec 2011, 15:26
by janpeter
I am not sure what to do but I think I understand the issue better.
My basic "problem" is that I just want to clean up the folder structure for VirtualBox,
i.e. I want all (two) my VM be in the same folder tree. The first VM is Windows XP and was made
under VBox ver 2.*, while the second is Ubuntu made in VBox ver 3.*.
Perhaps it is enough to just clone the Windows XP virtual machine, then I get it in
the same folder tree as the second Ubuntu VM. Then simply stop using the
original VM for Windows XP and eventually delete that one. Right?
Alternatively I could export that original Windows XP VM and import it again
to get in the right folder structure. However, in the correspondence above
was mentioned that export/import affect the VM but not clear to me how?
or what to check up?
(All this preparation to upgrade host to OS X Lion from todays Snow Leopard and
also to simplify future maintenance).
Thanks