Hello,
Compacting a virtual hard disk reclaims unused space in the disk. If a disk has empty space, this process reduces the amount of space the virtual hard disk occupies on the host drive. You must power off a virtual machine before you compact its virtual hard disk.
You cannot compact a virtual hard disk if disk space is preallocated or if the virtual hard disk is mapped or mounted.
For similar tasks, it is highly recommended to take a valid backup before (for your VM and for your data), because in IT shit happens :smileywink:
Please consider marking this answer "CORRECT" or "Helpful" if you think your question have been answered correctly.
Cheers,
VCIX6-NV|VCP-NV|VCP-DC|
@KakHassan
linkedin.com/in/hassanalkak