Answer the question
In order to leave comments, you need to log in
How to compress the size of a VHD file?
Good day to all!
The question of compressing (cutting off extra space) in a VHD disk became acute. And--so what we have. A Windows Server 2008 Enterprise virtual machine in VHD format on a Windows Server 2012 R2 server (the virtual machine migrated from the old Win Server 2008 R2 to the new 20012 R2). The idea is that certain data was stored on this virtual machine, which was transferred to the new server, but I would like to leave the OS itself and some settings. The usable data on the disk is only 25GB, while the VHD disk is 350GB.
I would be very grateful if someone tells me how to cut the disk correctly.
Answer the question
In order to leave comments, you need to log in
Turn off the virtual machine, go to its properties.
For a fixed size disk:
Select the disk, click "Change/Edit", then select the "Convert" procedure, select the format, then the "Dynamically Expandable" type, specify a new disk file name, confirm and start the procedure.
All data is transferred to a new disk, which is visible in full size inside the virtual machine, and occupies the same 25 gigs on the host.
For a dynamically expanding disk:
Select a disk, click "Change / Edit", then select the "Compress" procedure, start the process, wait. Get your minimum gigabytes.
Rumor has it that if you first go inside the virtual machine using the Sysinternals sdelete utility, then it will be possible to compress more strongly, but I could not confirm this with tests.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question