VMware's way of shrinking VMDK
Users who use VMware Workstation or Fusion will definitely encounter a headache, that is, the file size of vmdk will only increase but not decrease. Why vmdk will only increase but not decrease is related to the efficiency of data design. But what is more confusing is that Shrink Virtual Disk is often ineffective. In fact, it is caused by incorrect understanding. VMware did not simplify it to completely without thinking. There are also some design factors, because this is related to the type of Guest OS.

Shrink Disk should succeed as long as you follow the steps. It is divided into two stages, Guest OS and Host OS.
Guest OS
Three common OSs are used to illustrate how to achieve the reduction technique. Other operating systems need to find similar commands that can serialize data.
Windows 10
First try to use the built-in disk reorganization in Windows 10.
If it is invalid, download the SDelete version from the Microsoft official website. The function is to clear all the unused space. The principle should be to fill in all 0 for the unused space.
Unzip it and place SDelete.exe under C:\Windows\System32.
Press Win+R to call out the execution window, or click Start>Execute, type cmd and press Enter. Input command
sdelete -c -zc:\
Assuming that your Guest OS has more than one Partition, change the c:\ at the end to the corresponding drive letter, such as d:\, e:\. This step is rarely used.
Linux/Mac OSX
Fill the file zero.dat with infinite 0, it will stop automatically until the hard disk space is full, and then delete the file zero.dat. Because the content is all 0, the software judges that the content of the unused space is empty and can be released correctly.
sudo dd if=/dev/zero of=zero.dat; rm -f zero.dat one line to do
cat /dev/zero> zero.dat; rm -f zero.dat #This line of instructions is also OK
Mac OS is also a Unix architecture, so just a few actions like Linuxe
Host OS
Windows 10 can directly use Clean Up Disks in the Vmware menu.
Other operating systems can use Compact in the Disk above, or use command line compression:
vmware-vdiskmanager -k C:\my.vmdk
Comments
Post a Comment