Have you ever wondered why it takes so long to create a fixed virtual hard disk (VHD) in Hyper-V or Virtual Server 2005? The Virtual PC Guy dealt with this issue in a blog post. The reason is that the hard disk space assigned to the VHD is wiped out. This is just as if you are using a tool like Active@ Kill Disk to make sure that deleted data can't ever be recovered again. The process is so time-consuming because every byte on the disk has to be overwritten.

Michael Pietroforte

Michael Pietroforte is the founder and editor of 4sysops. He is a Microsoft Most Valuable Professional (MVP) with more than 30 years of experience in IT management and system administration.

It is unnecessary to zero out dynamically growing disks, because they only occupy disk space when they actually write data to disk, thereby erasing all the data still stored on the corresponding hard disk sectors. Fixed virtual disks already occupy the hard disk's space before the virtual machine writes data on it. Therefore, if you don't wipe out the data on the disk, it is possible to recover data that has been stored on the hard disk before the space was assigned to the VHD.

What I wasn't previously aware of is that this is even possible if you move the VHD to another host. This is probably the main reason why such "low level formatting" is required for fixed VHDs. As opposed to hard disks, VHDs can easily be moved to other locations, where people who should not be able to access data from the original host might have access to it.

Of course, in most environments virtual machines are only moved to hosts where the same administrators are responsible. This is where the VHD tool (Update: seems the tool is no longer available) comes in. You can use it to create VHDs without having to first bother with the time-consuming wiping of the corresponding hard disk space. It can also be used to convert and extend existing VHDs.

This is the VHD tool's usage description:

VhdTool.exe /create <FileName> <Size> [/quiet]
VhdTool.exe /convert <FileName> [/quiet]
VhdTool.exe /extend <FileName> <NewSize> [/quiet]

Create: Creates a new fixed format VHD of size <Size>.
WARNING - this function is admin only and bypasses
file system security. The resulting VHD file will
contain data which currently exists on the physical disk.

Convert: Converts an existing file to a fixed-format VHD.
The existing file length, rounded up, will contain block data
A VHD footer is appended to the current end of file.

Extend: Extends an existing fixed format VHD to a larger size <Size>.
WARNING - this function is admin only and bypasses
file system security. The resulting VHD file will
contain data which currently exists on the physical disk.

VHD tool ^

Win the monthly 4sysops member prize for IT pros


Related Posts

  1. Dave S 9 months ago

    That link to the vhd tool is dead.


  2. Author
    Michael Pietroforte 9 months ago

    Thanks for the hint. I added a note to the article.


    • Paolo Maffezzoli 9 months ago

      There are some VHDtool.exe somewhere in internet, but I am not sure if it is really safe download it. Maybe there is an equivalent tool to replace the original one.


      • Author
        Michael Pietroforte 9 months ago

        Yes, I also found some download links, but I can't verify if it is the same tool. It seems Microsoft pulled the tool.


Leave a reply

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



Please ask IT administration questions in the forum. Any other messages are welcome.

© 4sysops 2006 - 2017

Log in with your credentials


Forgot your details?

Create Account