Tidbits on VHDs - Part 1

1. December 2006 11:12 by Csaborio in General  //  Tags:   //   Comments (0)

Virtual Server has various VHD (Virtual Hard Disks) available for creation, namely:

  • Fixed
  • Dynamic
  • Differencing
  • Linked

In this first part of this blog, I will try and explain how each VHD works. 

Fixed VHDs are the closest thing that resemble a real hard drive.  When you create them and specify its size to 20 GB for example, the actual VHD file will be indeed 20 GB in size.  This means that if you are only using 1 GB of the VHD, it will still be taking 19 GB of space on the server where the VHD is stored.

Dynamic Disks, on the other hand, are not the size you specify at upon creation.  If you specify a dynamic VHD of size 20 GB, it will be originally created as a small drive, and as you write information and need more space, the VHD “dynamically” expands in size.  This operation can have a small toll on the VHD’s performance when it is expanded.  Furthermore, there can be more fragmentation issues since a sequence of bytes can be scattered in different places in the physical drive. 

Differencing Disks have a parent VHD.  Only the difference between the parent and the son will be written to the differencing VHD.  This means that if you need to create 20 Windows XP machines, instead of creating 20 VHDs with Windows XP (something that could take 40 GB), what you can do is set a Windows XP VHD as the parent (2 GB) and set the 20 VHDs as differencing (around 200 MB per disk).  You will be saving a lot of space this way.

Linked VHDs are pointers to real physical disks or partitions.  They are not meant to be used with virtual machines when they are on.  The only reason why you would want to use a linked disk is so that you can carry out a P2V (physical to virtual) migration. 

In my next blog, I will talk about which VHDs work best for which scenarios.