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.