Page 1 of 1
[SOLVED] Suffices to backup VDI file?
Posted: 7. Aug 2010, 19:30
by kebabbert
If I want to backup a virtual machine, does it suffice to only backup the VDI file? The rest of the files will automatically recreated when I attach the VDI file and create "new"?
Re: Suffices to backup VDI file?
Posted: 7. Aug 2010, 19:53
by Sasquatch
The VDI is just the hard drive image. The settings can't be created based on this single file, you have to back them up too. If you want to back up your VMs, then you can just back up the entire .VirtualBox folder.
Re: Suffices to backup VDI file?
Posted: 8. Aug 2010, 11:04
by kebabbert
Really? The reason I ask is because I can clone a VDI with
VBoxManage clonehd /FullPath/old.vdi /FullPath/new.vdi
And then I can attach the new.vdi - but there are no settings for new.vdi. Just a VDI file. So all settings are recreated from new.vdi? Is this correctly understood by me? Hence, I could just backup the VDI file? Or?
Re: Suffices to backup VDI file?
Posted: 8. Aug 2010, 11:23
by mpack
The settings are not embedded in the VDI in any way - and anyway remember that one VM can use several VDI files.
All I do to backup a VM is back up the VDI, and back up the VM settings xml separately. If I need to restore the VM xml then all I do is create a new VM using the backed up XML as a manual reference. However please note that this changes the VM UUID: as an XP user this doesn't bother me, but Win7 guests would care. There are ways around the VM UUID problem for those that care enough to research it.
[Edit: I should have said that in the worst case, I create a new VM. Of course if the old VM is still intact except for say a damaged disk, then all I need do is restore the disk].
Re: Suffices to backup VDI file?
Posted: 8. Aug 2010, 12:24
by MarkCranness
AFAIK, Windows 7 (and Vista) also care about the VirtualBox hard disk UUID.
Re: Suffices to backup VDI file?
Posted: 8. Aug 2010, 12:31
by Sasquatch
Win 7 does not care about the HD UUID. It will not trigger a reactivation. I've tested this myself, only the VM UUID does this.
Re: Suffices to backup VDI file?
Posted: 9. Aug 2010, 04:05
by MarkCranness
I haven't tested it myself, but I know
Microsoft say this about Windows 7 activation:
Specific information sent or received: During the activation process, the following information is sent to an activation server that is maintained by Microsoft:
- Computer make and model
- Version information for the operating system and software using Genuine Advantage
- Region and language settings
- A unique number assigned to your computer by the tools (globally unique identifier or GUID)
- Product key (hashed) and product ID
- BIOS name, revision number, and revision date
- Hard drive volume serial number (hashed)
I note it does NOT explicitly say BIOS UUID (created from the VM UUID by VirtualBox) or BIOS serial number.
Re: Suffices to backup VDI file?
Posted: 9. Aug 2010, 10:37
by mpack
Sasquatch wrote:Win 7 does not care about the HD UUID. It will not trigger a reactivation. I've tested this myself, only the VM UUID does this.
And in any case the subject is moot, since backing up the VDI file does not change the HD UUID. We are talking here about backing up using a simple host OS file copy.
Re: Suffices to backup VDI file?
Posted: 9. Aug 2010, 21:26
by Sasquatch
MarkCranness wrote:I haven't tested it myself, but I know
Microsoft say this about Windows 7 activation:
[...]
I note it does NOT explicitly say BIOS UUID (created from the VM UUID by VirtualBox) or BIOS serial number.
The VM UUID is not the BIOS UUID, but the hardware UUID. If you would replace your motherboard with the exact same type, Windows 7 will probably trigger a reactivation.
Re: Suffices to backup VDI file?
Posted: 9. Aug 2010, 22:40
by kebabbert
Ok, I created an OVF file from my fresh install. And I backup the OVF file. But, that was dumb. When I import the OVF file, I get a VMDK file, I do not get a VDI file. So now I have OVF file and I can get VMDK file.
Every VirtualBox command is operating on the VDI file. Not on the OVF or VDMK file. So I must convert back to VDI every time when I want to use a VirtualBox command. This means it is better to back up the VDI file. I should not back up the OVF file. Always backup the VDI file. Never back up the OVF file.
So to back up the VDI file, which files do I need to backup? The entire directory is the safest, right?
Re: Suffices to backup VDI file?
Posted: 9. Aug 2010, 22:57
by Sasquatch
Yes, the entire .VirtualBox directory is the best option. That way, you can restore the entire situation, snapshots, everything in case your system fails from a fatal crash. You can also easily restore it to another user, you only need to check if the paths are still valid. If you don't change the default paths, then they should be relative instead of absolute and are thus easy transferable.
Re: Suffices to backup VDI file?
Posted: 9. Aug 2010, 23:02
by kebabbert
So I can restore the entire .Virtualbox folder to another user? Good.
But I can not restore the entire .VirtualBox folder to another computer, say an Ubuntu computer? I am using OpenSolaris...
Re: Suffices to backup VDI file?
Posted: 9. Aug 2010, 23:07
by Sasquatch
No, you can only restore the .VirtualBox directory to a similar OS. Solaris is not like Linux, so you can't exchange configurations between them. You can however transfer the config from Ubuntu to Fedora for example, or from Windows XP to Windows 7. As long as the paths are still valid. Differences in the workings of the OS and version registration in the XML files prevent cross-platform transfers (think about the audio system and the physical network adapter names, as well as shared folder paths).
Re: Suffices to backup VDI file?
Posted: 11. Aug 2010, 06:49
by MarkCranness
Sasquatch wrote:MarkCranness wrote:I haven't tested it myself, but I know
Microsoft say this about Windows 7 activation:
[...]
I note it does NOT explicitly say BIOS UUID (created from the VM UUID by VirtualBox) or BIOS serial number.
The VM UUID is not the BIOS UUID, but the hardware UUID. If you would replace your motherboard with the exact same type, Windows 7 will probably trigger a reactivation.
Yes, my bad. The serial number and UUID are DMI type 1 = System, not BIOS.