1.0

Table Of Contents
CHAPTER 9 Using Virtual Disks
171
If those two conditions are true, the virtual machine can safely remove the stale lock. If
either of those conditions is not true, a dialog box appears, warning you that the
virtual machine cannot be powered on. If you are sure it is safe to do so, you may
delete the lock files manually. When created by VMware products on Windows hosts,
the filenames of the lock files end in .lck.
Defragmenting and Shrinking Virtual Disks
If you have a virtual disk that grows as data is added, you can defragment and shrink it
as described in this section.
To defragment the virtual disks attached to a virtual machine, power off the virtual
machine, then go to the virtual machine settings editor (VM > Settings).
Select the virtual disk you want to defragment, then click Defragment.
Defragmenting disks may take considerable time.
Note: The defragmentation process requires free working space on the host
computer’s disk. If your virtual disk is contained in a single file, for example, you need
free space equal to the size of the virtual disk file. Other virtual disk configurations
require less free space.
When a virtual machine is powered on, you can shrink its virtual disks from the
VMware Tools control panel. You cannot shrink virtual disks if a snapshot exists. To
remove the snapshot if one exists, choose Snapshot > Remove Snapshot.
1. To launch the control panel in a Windows guest, double-click the VMware Tools
icon in the system tray or choose Start > Settings > Control Panel, then double-
click VMware Tools.
To launch the control panel in a Linux or FreeBSD guest, become root (su -),
then run vmware-toolbox.
2. Click the Shrink tab.
3. Select the virtual disks you want to shrink, then click Prepare to Shrink.
The shrink tool 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.
Shrinking disks may take considerable time.
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 your virtual disks.
For best disk performance, you can take the following three actions, in the order listed: