I had a laptop die and I wanted to preserve the OS drive as a VM, so I created a VM in Hyper-V in Windows 8.1x64 and attached the physical drive and booted successfully. I then defragged and zero'd out free space on the physical drive from within the VM and shut it down. Next, I used Disk2vhd v2.01 to convert the physical disk to my vhdx file, which resulted in approximately 34 GB and is a dynamic vhdx file. So far, success.
Now the problem; I want to convert this vhdx from dynamic to a fixed vhdx, of approx. 40 GB. When I boot up the current dynamic vhdx and attempt to shrink the volume in disk management, it tells me there is not enough free space to complete the operation. The physical disk was 320 GB, and within the running VM it still shows as a 298 GB volume, the same as the physical disk did. I also tried converting the 34 GB dynamic vhdx file to a fixed vhdx from within the Hyper-V GUI, but it did not prompt me for a fixed size and the result was a vhdx file 298 GB in size!
Worth noting, the original physical drive has since been secure erased and had it's platter drilled for disposal, so starting from there is not an option. Moving forward, I only have the 34 GB dynamic vhdx and the 298 GB fixed vhdx files to work with, however at this point I am not sure how to proceed to accomplish my goal. Any assistance with this issue would be greatly appreciated.