VMware virtual machines in use, as software and data increase, the virtual disk occupies a larger amount of hard disk space, but after the data is deleted, it does not automatically reduce the physical hard disk space occupied
Instead, it continues to occupy the appropriate size. If you need to solve the above problem, you need to shrink the wmware virtual disk, the author summarizes the commonly used three methods, respectively, as follows:
WMware version: 8.0.4 build-744019
Virtual machine system: CentOS release 6.3 (Final)
Method One, in the Linux system, if the installation of Vmware-tools only need to execute the following command
[[email protected]5201351 ~]# vmware-toolbox-cmd disk shrink/// can also specify other partitions
When the progress bar runs out, the SSH connection is disconnected, and the local terminal automatically starts shrinking the disk.
Method Two, enter the Linux GUI, use the Vmware-toolbox command, open the Vmware-tools graphical interface.
[[email protected]5201351 ~]# vmware-toolbox // disk shrink by Operation
The above command is just a preparation phase before the disk shrinks, and when the progress bar is complete, you will be prompted as follows, and clicking Yes will start shrinking the disk.
Method Three: On the virtual machine software with the compact visualizer operation, follow the steps below.
(1) In the Linux system, the virtual disk useless space all filled with zero, you can use the following command:
[[email protected]5201351ddif=/dev/zero Of=/zero. file bs=2m // can also be added to the Count parameter, which can have a value of the remaining space size/2m[[email protected]5201351 rm -rf/zero. file
(2) Close the virtual machine, select the virtual machine, right--->settings, select the disk, select the compact under Utilities, the disk will immediately shrink, the operation as shown:
Method Four: Using the Vmware-vdiskmanager Disk Management tool provided by the VMware software, this command is a command-line tool. Here's how to use it:
(1), locate the Disk Management file for the specified virtual machine, and execute the following command:
E:\VMware system\bridged\aa01>vmware-vdiskmanager-k mini_centos64.vmdk // Execution of this command requires attention to two points, 1. System needs to be shut down 2. Disk without snapshots
Summary: General VMware Disk shrink using the following three methods can be, each has its own advantages and disadvantages, which
Method One, method two, you must install the VMware Tools tool in the operating system , with the advantage that you can shrink a virtual disk with a snapshot
Method Three, the use of VMware's own visual compact tool, you need to operate in the case of system shutdown, You can also shrink a snapshot of the virtual disk (recommended)
Method four, using VMware's own command line Virtual Disk Management tool, but also to operate in the case of system shutdown, the disadvantage, can not shrink the disk with a snapshot
This post is from http://www.cnblogs.com/5201351/p/4290401.html
Several ways to shrink a VMware virtual machine disk