We have a production server that is used 24/7, running inside Hyper-v. The guest OS is Server 2008 R2. It has a dynamically expanding VHDX and is very close to reaching the maximum size. Is it possible to shrink it without any downtime?
I have seen recommendations of using sdelete -z but one of the problems is the physical drive that the VHDX resides on has a capacity of 1.79TB (52.1 GB Free as of now) and the max size of the VHDX shows 1.82TB, so I don't know if using sdelete will cause the VM to fail/pause if it tries to make the VHDX larger than the physical drive?
If shrinking it without downtime is not possible, is there a way to prevent the VHDX from growing any larger (the guest OS shows 639GB of free space) and just use the existing allocated space? Any help would be greatly appreciated.