I have a Hyper-V virtual machine "TS3" running Windows Server 2008 with 278GB space allocated, but only using 100GB of space.
So I wanted to shrink the VHDX size. When I ran "Shrink" option in Disk Mgmt.msc, I got an error "Access denied".
I tried different suggestions on Google, but to no avail. So I ran Disk2VHD in TS3 and it created 72GB VHDX file.
Then I created a new VM "TS3 - VHDX" using existing 72GB VHDX file. But when I fired up the new VM, it still shows that hard drive size is 278GB in "My Computer".
Furthermore, when I tried to shrink it using DiskMgmt.msc, I still get "Access denied"error.
I don't mind seeing 278GB in "My Computer" of the VM as long as real size of VHDX is till 72GB.
My objective is to reduce the VHDX file and free up overall hard drive space on HyperV server.
But I am curious why the VM would not display current HD size based on VHDX file size?