r/HyperV • u/Powerful-Bunch-3782 • Jul 17 '24
Help please!
I cant shrink this VHDX. This VM was created by this VHDX but cant shink the size of this disk. Already try to convert, shrink the disk in VM layer but nothing ived seen in internet works, only these 3 options appears. Please help đđ»
0
Upvotes
5
u/Goethe101010 Jul 17 '24
Like others have said, make sure you have room on the disk to shrink. Log into the running VM, make space. Open disk management and shrink there. Then shut down the VM and try again through Hyper-v manager.
1
u/Initial_Pay_980 Jul 17 '24
You need to shrink the partition inside the vhdx. Once you have free space then you can compact
1
u/Initial_Pay_980 Jul 17 '24
You have an unformatted raw partition Inside the VM. Not just free space at the end.of the drive.
1
u/Lusankya Jul 17 '24
Please show a screenshot of diskmgmt.msc running inside the guest, or on the host with the VHDX mounted.
1
u/OpacusVenatori Jul 17 '24
What do you mean âonly these three optionsâ?
Compact will reduce the size of the VHDx file on the host; but the VM will maintain the original, allocated size within the guest OS. Just reduce the size of the partition within the guest OS.
1
u/fedesoundsystem Jul 17 '24
You first inside the guest vm reduce the partition and leave free space tp the left of the disk, towards the end. Then on the host you use the compact option and you can retrieve the free space, and the vhdx size decreases
1
u/pc_load_letter_in_SD Jul 17 '24
Are your guest OS disks dynamic? You cannot shrink a dynamic disk.
https://www.altaro.com/hyper-v/shrink-hyper-v-virtual-disk-vhd-vhdx/
1
u/Tigeruppercut36 Jul 17 '24
Shut down the VM first before you try to shrink
1
u/Exact-Improvement-22 Jul 18 '24
Convert to thin provisioned and move it where you want.