A Hyper-V VM has following drives C:\ and E:\. Below are the space specifications of C: and E: drive:
Total Size of C: drive is 270 GB and Free Space is 160 GB.
Total Size of E: drive is 1 TB and free space is 0.9 TB
I used disk2vhd tool to create a online clone of the drives of the VM. When I ran the disk2vhd utility it created the .VHD file of C: drive for only 45 GB and E: drive of around 100 GB. Then I created a new VM using the newly created .VHD files of C: and E: drive. After booting the new Virtual machine I could see the original 270 GB of C: drive with free space of 160GB and E: drive of 1TB and free space of 0.9 TB.
Now I would like to know how the .VHD file is created only with 45GB for C: drive and 100 GB for E: drive and when converted as a virtual machine it provides the exact format and size of the disk. Can anyone help me to know what exactly happens when converting to .VHD format and how it compresses the data size.