VMware Tools Help |
Shrinking Virtual Disks
Shrinking a virtual disk reclaims unused space in the virtual disk. If there is empty space in the disk, this process reduces the amount of space the virtual disk occupies on the host drive.
Note: ESX Server can shrink the size of a virtual disk when a virtual machine is exported. The space occupied by the virtual disk on the ESX server, however, does not change.
Shrinking a disk is a two-step process: a preparation step and the actual shrink step. In the first step, VMware Tools reclaims all unused portions of disk partitions (such as deleted files) and prepares them for shrinking. This allows for the maximum shrink possible. This step takes place in the guest operating system.
The shrink process itself is the second step, and it takes place outside the virtual machine. The VMware application reduces the size of the disk based on the disk space reclaimed during the preparation step.
Requirements for shrinking virtual disks include the following:
• The host must have free disk space equal to the size of the virtual disk being shrunk.
• VMware Tools must have sufficient access rights to write a file in the partition’s directory. If it cannot do so, change the directory access rights or deselect that partition. In some configurations, it is not possible to shrink virtual disks. If your virtual machine uses such a configuration, the Shrink tab displays information explaining why you cannot shrink virtual disks.
When a virtual machine is powered on, you shrink its virtual disks from the VMware Tools control panel.
1. To launch the VMware Tools control panel, open a terminal window, become root (su -), and run the following command:
1. vmware-toolbox & Running VMware Tools as root ensures that the whole virtual disk is shrunk. If you shrink the virtual disk as a non-root user, you cannot prepare to shrink the parts of the virtual disk that require root-level permissions.
Note: On NetWare guests, instead of using vmware-toolbox, use the vmwtool shrink command. For instructions, see the documentation for your VMware product.
2. Click the Shrink tab.
3. Select the virtual disks and partitions you want to shrink, and click Shrink. Note: If you deselect some of the partitions, the whole disk is still shrunk. However, those partitions are not prepared for shrinking, and the shrink process does not reduce the size of the virtual disk as much as it could otherwise.
A progress bar appears for each partition. You can abort the operation at any time by clicking Cancel.
4. After VMware Tools finishes preparing the selected disk partitions, respond to the prompt to begin shrinking the disks. If you click Yes, the virtual machine freezes and VMware Tools shrinks your virtual disks. After that, the virtual machine continues to run normally.
If you click No, you can delay shrinking the virtual disks. You can shrink the disks at a later time by using the Shrink tab.
Shrinking disks can take considerable time.
Note: Shrinking a virtual disk reclaims unused space on the disk. You might also want to defragment the virtual disk, which rearranges files, programs, and unused space on the virtual disk so that programs run faster and files open more quickly. For information about defragmenting virtual disks, see your VMware product documentation.
VMware Tools Help |