This reference may also help you:
Implementing a Differencing Hard Disk
A differencing hard disk stores the file locator of the parent hard disk inside the differencing hard disk itself. When a virtual machine tries to open a differencing hard disk, both the differencing hard disk and the parent hard disk are opened. The parent hard disk can also be a differencing hard disk, in which case there could be a chain of differencing hard disks which finally end in a non-differencing hard disk.
To have the ability to move hard disks across platforms, the hard disk format is designed in such a way that it can store parent hard disk file locators for different platforms at the same time.
The parent locator table is used only by the differencing hard disks, as described in “Dynamic Disk Header Format” earlier in this paper. The parent locator table stores a platform code for every parent file locator stored in the file. The virtual machine reads the appropriate parent file locator for the current platform and opens the hard disk image.
In Windows, there are two types of platform locators: W2ku and W2ru. The former is the absolute pathname of the parent hard disk, and the latter is a pathname to the parent hard disk relative to the differencing hard disk.
For example, a parent hard disk image located in the root drive on a typical Windows-based machine would be stored as follows:
Type Example
W2ku c:\directory\parent.vhd
W2ru .\directory\parent.vhd
As an example on a typical Apple Macintosh-based machine, the parent hard disk image would be stored as follows:
Type Example
Mac (Mac OS alias stored as a blob)
MacX file://localhost/directory/parent.vhd
The advantage of the relative pathname is that it allows portability of the differencing and parent hard disk to different locations. With the absolute pathname, whenever the parent hard disk is moved, the parent and child hard disks must be explicitly re-linked.
When a differencing disk is being created, pathnames for both types of platform locators on the respective platforms should be initialized if possible.
Note: Versions previous to Microsoft Virtual PC 2004 only stored the absolute pathnames.
Write Operation for a Differencing Hard Disk
For a write operation, all data is written to the differencing hard disk image. The block bitmap is marked dirty for all the sectors written to the particular block.
Read Operation for a Differencing Hard Disk
When a virtual machine reads sectors of a hard disk image, the differencing hard disk subsystem checks the block bitmap in the differencing hard disk. The differencing hard disk subsystem reads the sectors marked dirty from the differencing hard disk and the sectors marked clean from the parent hard disk.
For example, consider a block that holds sectors 4096 through 8191 in both the parent and child hard disk image. The first sector of the block holds the bitmap for the block. A single cell represents a bit in the bitmap and a black dot represents the particular sector in the block has been written to by the virtual machine.