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.
- Poll: How reliable are ChatGPT and Bing Chat? - Tue, May 23 2023
- Pip install Boto3 - Thu, Mar 24 2022
- Install Boto3 (AWS SDK for Python) in Visual Studio Code (VS Code) on Windows - Wed, Feb 23 2022
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.
That link to the vhd tool is dead.
Thanks for the hint. I added a note to the article.
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.
Yes, I also found some download links, but I can’t verify if it is the same tool. It seems Microsoft pulled the tool.