Hi John,
Thanks for your reply. There might be cache in the virtual disk. Try reboot the VM or type more smaller shrink numbers and see if it works.
If that doesn’t help, you might need to use a data-moving tool. Create a new VHDX of the desired size and use something like robocopy to transfer the contents of the old disk to the new. I would not use this for operating system volumes, but it works well for data-only volumes. In fact, you could take these steps:
- Turn off the owning VM
- Disconnect the VHDX
- Mount the old VHDX and the new in the management operating system
- Use robocopy or a similar tool to transfer the files
- Dismount both VHDXs from the management operating system
- Attach the new VHDX to the VM in place of the old
Robocopy has switches to copy ACLs and file descriptors. You will need to double-check that the operating system reconnects any shared folders, though.
Best Regards,
Ian Xue
If the Answer is helpful, please click "Accept Answer" and upvote it.