4

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...

WooYek
  • 304
  • 2
  • 8

2 Answers2

2

Not what I expected, as I treat this task as a Disk Managment area...

You need to create a machine that will (and stays) you template, each time you install on this machine something that is worth to be released as a template disk - take snapshot. When a snapshot is taken the current disk is frozen and a new differencing image is created.

Then you can attach this frozen disk to another machine, creating antoher differnecing image.

Whan you want some control on where the disk are stred and how are they named, you need to disconnect disk form snapshots (eg. disregard snapshots), and reatach these discs uder new location and name - they will be properly recognized as a chained differencing images.

Thus getting a cleaner hierarchy and better way to chose them when they being attached.

user60561
  • 143
  • 5
WooYek
  • 304
  • 2
  • 8
  • How do you disconnect a disk from snapshots? For the life of me I cant find this feature in virtualbox --- seems the only way is to manually edit the VM XML files? – Adam Aug 20 '10 at 02:40
  • I do not, I leave them be. – WooYek Apr 24 '12 at 14:26
2

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.

petrus
  • 5,287
  • 25
  • 42
Brendon
  • 21
  • 1