How to create a chained differencing disk of another differencing disk in Virtual Box

diff()diskmanagementvirtualbox

How to create a differencing disk (a chained one) from a disk that is already a differencing image? I would like to have:

 W2008 (base immutable) 
  -> W2008+SQL2008 
     (differencing, with SQL installed) --- This I can do.
    -> W2008+SQL2008+SharePoint 
       (chained differencing with Sharepoint installed on top of SQL2008)

There's some info about it the manual:
http://www.virtualbox.org/manual/ch05.html#diffimages

Differencing images can be chained. If another differencing image is created for a virtual disk that already has a differencing image, then it becomes a "grandchild" of the original parent. The first differencing image then becomes read-only as well, and write operations only go to the second-level differencing image. When reading from the virtual disk, VirtualBox needs to look into the second differencing image first, then into the first if the sector was not found, and then into the original image.*

I don't get it…

Best Answer

The instructions are great.

This thread is old, but here is my solution to getting a separate disk from a snapshot:

  1. Create the snapshot of the state you want to save. Go to the snapshot directory for the VM and find the name of the snapshot (check date and time).
  2. Go to the commend line and use "VBoxManage clonehd" on the snapshot. This takes the snapshot and creates a new disk from it that includes all the information from the previous disks that the snapshot linked to.
  3. Use the new disk as the basis for your VM.

Sample usage (under Linux):

VBoxManage clonehd /data/vm/Win7/Snapshots/{35fe3c30-572c-4edd-9fd2-3accdb6bfe19}.vmdk win7-work.vmdk --format VMDK

You can leave the --format VMDK off if you stick to native .VDI format. I use VMDK format in case I need to use other VM software in the future.

Related Topic