HTML5, CSS3, jQuery, JSON, Responsive Design...

Backing up VirtualBox Disk Images

Michael Brown   March 24 2009 09:51:48 PM
Part 8 of Setting up a home test environment for Notes/Domino 8.5

Copying Via Your OS

You can simply back up the .VDI image files by copy them around using your OS's file manager, e.g. Windows Explorer, Nautilus for Gnome Linux or Mac OS X's Finder.  But there's a couple of points to watch out for.
  1. The .VDI files are big!  So, if you're backing up to an external hard drive, you're going to have problems if that drive is formatted as FAT32 (as most of them are).  FAT32 has a maximum file size of 4 Gigabytes (although I actually have problems with any files bigger than 2 Gig) which is smaller than most .VDI image files are likely to be.  You have two options here:
    1. Split the .VDIs into smaller files before backing them up to your FAT32 drive.  This is one advantage that VMware has over VirtualBox: it allows you to create your virtual disk image as a collection of smaller files, instead of only one file.
    2. Format your external drive to a format that allows larger files.  Such formats include Windows NTFS and Linux EXT2 or EXT3.  I went for NTFS because later versions of Ubuntu to can read from and write to NTFS volumes natively.  Be warned that reformatting a disk will wipe all the existing data on it.

  2. OS copies preserve the original .VDI file's unique ID.  This is fine for backups or if you're copying the .VDI for use on another (physical) machine.  But if you're copying .VDI images for use on the same physical machine then it's going to cause problems.

    If you're from the Lotus Notes world, an OS copy of a .VDI file is roughly analogous to what happens when you make an OS copy of a Notes database: i.e., you end up with a replica because the OS doesn't know anything about Notes Database unique IDs.  VirtualBox .VDIs have their own unique ID, called the UUID, and you cannot add a .VDI image as a new media to VirtualBox if there is already another .VDI added that has the same UUID.  VirtualBox will simply tell you that the operation is not permitted.  To make a proper VirtualBox "copies", you must use VirtualBox's own tools to make the copy.

Copying Via VirtualBox Tools

Under Linux, you'll have to use a Terminal prompt to make the copy.  The syntax is:

VBoxManage clonehd source.vdi target.vdi

And because it's UNIX it's case sensitive.  If you don't include a path to source.vdi or target.vdi then VirtualBox will make the copies in the Default Hard Disk Folder, as defined in VirtualBox's main settings (File->Settings->General from the main VirtualBox client menu).  If you want to make copies from or to another folder, then you'll need to include the paths in the source.vdi and/or target.vdi entry.  E.g:

VBoxManage clonehd /home/mikey/vboxdisks/fedora10.vdi /home/mikey/vboxdisks/fedora10newcopy.vdi

The VBoxManage tool will give you a test update of its status during the copy, as shown below.  It will also show you the UUID of the new .VDI file.

Image:Backing up VirtualBox Disk Images

Please note that the .VDI that you're copying should not be in use by VirtualBox when you are making the copy.

Previous - Running Domino in terminal mode with Screen | Next - Copy files via VirtualBox Shared Folders

No Comments Found