The speed of creating a Fixed Sized VHD

Today I had to deliver a few 500GB Fixed Sized VHD’s in our Nobel Hyper-V Cloud Datacenter. The job had to be finished in a few hours involving provisioning the LUN, presenting them to the hosts, creating the VHD, adding the VHD to the Virtual Machines and prepare/format the disks for final use within the VM. Of course this had to be done without downtime to the users. Another very easy job but let me warn you: “It takes a bit of time!”

The VM’s involved were two Exchange 2010 DAG servers, the one in our Hilversum datacenter on an HP BL460G6 blade server connected to HP EVA enterprise grade storage with dozens of FC 450GB 15K disks and the other in the customer’s datacenter in Amsterdam, which serves as a DR site. The DR site has no HP EVA storage and there is no replication. We use a few single Hyper-V ProLiant ML370 servers with a bunch of local 1TB FATA storage. We backup to a local DPM2010 server in Hilversum and replicate that to a second DPM2010 server in Amsterdam. So recovery can be relatively fast.

How about speed?

Creating a 500GB fixed sized VHD on the EVA storage took only 49 minutes or almost 10 times faster.

Creating a 500GB fixed sized VHD on the Direct Attached Storage (DAS) on the recovery Hyper-V Server where the DR instance of the Exchange 2010 VM lived took a little over 8 hours.

Of course this is not a problem but very costly if the customer has to pay by the hour.

I was happy to have started the fixed disk creation the evening before so when I looked this morning both VM’s were ready and waiting to be used.


The fast FC disk image creation


And the slow SATA image creation


Creating a fixed sized VHD takes a fair amount of time because we zero-out all the disk space that has been requested. The advantage is that if the disk has enough free space (see previous defrag blog) the entire fixed size VHD can be written contiguously which improves speed and efficiency. Take a look at Ben Armstrong’s blog for more background.

If you are the impatient type of administrator and you don’t care a great deal about security you might want to look at VHD Tool v2 which was created by Ben Armstrong and released in January 2011 which not only created huge fixed sized VHD’s extremely quickly but also has a repair option.

I created another 500Gb disk on the slower FATA disks with this command:


There was no waiting time. The 500GB disk was created instantaneously. It took me more time to calculate 500GB in bytes than the time needed for creating the non-zeroed fixed sized VHD.

Here are a few other options:

Here are a few examples using VHD Tool.

Create a new 10 GB fixed VHD in the current directory.
VhdTool.exe /create "c:Program FilesMyAppfoo.vhd" 10737418240
Convert an existing flat image file into a VHD & do not output status to the command line.
VhdTool.exe /convert bar.img /quiet
Extend an existing fixed format VHD to a larger size.
VhdTool.exe /extend foo.vhd 21474836480
Repair a Hyper-V snapshot chain broken by expanding the base VHD.
VhdTool.exe /repair base.vhd base_EF2F9402-E85B-402F-A979-631CB287C2C4.avhd

If you want to study the VHD specifications in more detail, I can recommend this document.


  1. June 3, 2011    


    Good hint.. However you are treating dangerously here: – after the size increase the repair process ONLY adjust the metadata portion of the VHD data structures, it does not do anything to bring the internals metadata in compliance with the new container size. You can get away with it in most – but not ALL – of the case as VHD would contain an NTFS and it will recover from most of the size changes. But there are corner case and I have stepped into those.
    Second, you are still stuck with the most annoying feature of Fixed VHD – their huge size. You don’t have a lot of choice with the native MSFT technology because Dynamic VHDs are clearly inferior in performance – which is admitted by MSFT – albeit reluctantly.
    I would encourage you to look at Virsto technology – we provide a complete equivalent VHD objects which are thinly provisioned, exceed Fixed VHDs in performance and fully compatible with all Hyper-V components, including clustering and live migrations.
    Drop me a line, I’ll be happy to give you more info.

    Alex Miroshnichenko
    CTO/Founder, Virsto Software Corporation.

    • adminHans's Gravatar adminHans
      June 3, 2011    

      Thanks Alex,
      I am aware of VHD alternatives although I am curious about how Virsto is reaching better performance than standard Microsoft fixed sized virtual hard disks. I have seen your name before but never found the time to really try and grasp what you are doing. I was contacted by Claude Robinson some time ago and I promised to do a Live Meeting together. You will be invited too ;-)

      Regards, Hans

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>