Vmware virtual disk shrinking often encounters a large disk when using the vmwarevm, but it is not filled with things, which wastes hard disk space. How can we shrink the Virtual Disk size? First, if the Virtual Disk size is pre-allocated when a VM is created, it cannot be reduced. Note: Before shrinking a virtual disk, you can perform disk fragmentation on the virtual disk to maximize the effect of shrinking the disk. Reducing the virtual disk at www.2cto.com is to reclaim unused space in the virtual disk. That is to say, if there is free space in the virtual disk, this shrinking process will reduce the space occupied by the virtual disk files on the host disk. To shrink a disk, you can convert it to a virtual disk in the format supported by Workstation. The created new lattice Virtual Disk can only be recognized by VMware Workstation 3.0 or later. Restrictions and requirements for shrinkage: the host disk must have the same free space as the virtual disk to be shrunk. (If you use VMware Tools to perform the contraction, there is no such restriction.) The contraction function is only applied to Virtual Disks. You cannot shrink a hard disk or a CD. If the virtual system of a virtual machine has the following circumstances, the shrinking function will not be available. Clone of the source link that contains a snapshot www.2cto.com link. If any virtual disk in the Virtual Machine virtual system has the following conditions, the shrink function will not be available. Pre-allocated disks do not use virtual disk independence-persistent mode non-persistent mode Legacy disks independent disk boot Note: you can change the Virtual Disk mode before enabling the virtual machine. (You must delete all snapshots before, of course) two steps are taken to contract the disk: first, clean up. VMware Tools requires that unused parts (such as deleted files) in all disk partitions be withdrawn) prepare for contraction. Cleanup is performed in the client operating system. Step 2: contract the virtual disk, which is carried out on the host machine. Workstation reduces the size of the Virtual Disk File by clearing the program to reclaim disk space. Method 1: Use VMware Tools for compression. When a virtual machine is opened, you can use the VMware Tools Control Panel to compress the virtual disk of the virtual machine. If a virtual disk has a snapshot, you cannot contract the virtual disk. You can remove the snapshot by selecting the VM> snapshot Management> Delete. In the Linux or FreeBSD client operating system, the preparation for shrinking the Virtual Disk requires the root user permission to run VMware Tools. Make sure that the entire virtual disk is shrunk. Otherwise, you cannot clear or contract the virtual disk if it is not used by the root user. Shrink Virtual Disk: 1. Run the VMware Tools Control Panel Windows client-double-click the VMware Tools icon in the system tray, or Select Start> control panel, and then double-click VMware Tools. Linux or FreeBSD client -- run vmware-toolbox as the root user. (VMware Tools in Red hat Linux is/usr/lib/vmware-tools/bin/vmware-toolbox-gtk) 2. select the Shrink tab 3. select the virtual disk you want to contract, and click Prepare to Shrink to display the progress of cleanup (preparation) in the dialog box. Note: If you do not select some partitions, the disk will still shrink. In any case, the unselected partitions will not be shrunk, and the shrinking process will try to contract as many selected partitions as possible to reduce the size of the virtual disk. 4. After VMware Tools clears the selected shrinking partitions, click Yes. Www.2cto.com Method 2: directly use the VMware workstationtool vmware-vdiskmanager.exeafter the hosts are completed, shut down the virtual machine, and then run vmware-vdiskmanager.exe to contract. c: \ Program Files \ VMware Workstation> vmware-vdiskmanager.exe-k "Windows XP Professional. the parameter usage of vmdk "vmware-vdiskmanager.exe can be viewed with help. c: \ Program Files \ VMware Workstation> vmware-vdiskmanager.exe /? VMware Virtual Disk Manager-build 34685. usage: vmware-vdiskmanager.exe OPTIONS diskName | drive-letter: Offline disk manipulation utilityOptions:-c: create disk; need to specify other create options-d: defragment the specified virtual disk-k: shrink the specified virtual disk-n <source-disk>: rename the specified virtual disk; need tospecify destination disk-name-p: prepare the mounted virtual disk specified bythe drive-letter for shrinking-q: do not log messages-r <source-disk>: convert the specified disk; need to specifydestination disk-type-x <new-capacity>: expand the disk to the specified capacity Additional options for create and convert:-a <adapter>: (for use with-c only) adapter type (ide, buslogic or lsilogic)-s <size>: capacity of the virtual disk-t <disk-type>: disk type id Disk types: 0: single growable virtual disk1: growable virtual disk split in 2 Gb files2: preallocated virtual disk3: preallocated virtual disk split in 2 Gb files The capacity can be specified in sectors, Kb, Mb or Gb. the acceptable ranges: ide adapter: [100.0 Mb, 950.0 Gb] scsi adapter: [100.0 Mb, 950.0 Gb] ex 1: vmware-vdiskmanager.exe-c-s 850 Mb-a ide-t 0 myIdeDisk. vmdkex 2: vmware-vdiskmanager.exe-d myDisk. vmdkex 3: vmware-vdiskmanager.exe-r sourceDisk. vmdk-t 0 destinationDisk. vmdkex 4: vmware-vdiskmanager.exe-x 36 Gb myDisk. vmdkex 5: vmware-vdiskmanager.exe-n sourceName. vmdk destinationName. vmdkex 6: vmware-vdiskmanager.exe-k myDisk. vmdkex 7: vmware-vdiskmanager.exe-p m :( A virtual disk first needs to be mounted at m: using the VMware Diskmount Utility .)