Difference between revisions of "How to Reduce the Size of a VMware Server 2.0 Virtual Disk"

From Virtuatopia
Jump to: navigation, search
Line 3: Line 3:
 
* At least one of the virtual machines currently using the virtual disk must have the VMware Tools package installed.
 
* At least one of the virtual machines currently using the virtual disk must have the VMware Tools package installed.
  
* It is only possible to reduce the size of a virtual disk which was initially configured as ''growable''. ''Pre-allocated'' virtual disks cannot be reduced in size. To shrink the size of a pre-allocated disk it must first be converted to a growable disk (see [[How to Convert a VMware Pre-allocated Virtual Disk to a Growable Disk]] for steps on how to perform this conversion).
+
* It is only possible to reduce the size of a virtual disk which was initially configured as ''growable''. ''Pre-allocated'' virtual disks cannot be reduced in size. To shrink the size of a pre-allocated disk it must first be converted to a growable disk (see [[How to Convert a VMware Pre-allocated Virtual Disk to a Growable Virtual Disk]] for steps on how to perform this conversion).
  
 
* There must be no current snapshots of any virtual machines which utilize the virtual disk.
 
* There must be no current snapshots of any virtual machines which utilize the virtual disk.

Revision as of 17:30, 27 October 2008

This HowTo covers the steps necessary to shrink a VMware Server 2.0 virtual disk. Before beginning this process it is important to understand a few requirements:

  • At least one of the virtual machines currently using the virtual disk must have the VMware Tools package installed.
  • There must be no current snapshots of any virtual machines which utilize the virtual disk.
  • If the virtual disk is configured as Independent it must be in Persistent Mode.

Installing VMware Tools

If VMware Tools are not currently installed on the guest operating system, steps to perform the installation are outlined in Understanding and Installing VMware Tools.


Accessing the VMware Tools Control Panel

Once the VMware Tools are installed into the guest operating system of a virtual machine using the virtual disk, the shrink process is initiated using the VMware Tools Control Panel.The VMware Tools control panel provides a graphical environment in which a variety of VMware Tools settings may be configured and virtual disks reduced in size (although this feature is not available for pre-allocated virtual disks).

The default configuration for VMware Tools on Windows should have placed a VMware Tools icon in the Windows notification area in the bottom right hand corner of the Windows task bar (where the date and time are typically displayed) and also as an icon in the Windows Control Panel (accessed via Start->Control Panel).

The following figure illustrates a taskbar from a Windows server 2008 desktop containing the VMware Tools icon (the second icon from the left in the notification area):


The Vmware Tools icon in the Windows notification area


Once the taskbar icon has been located, double click on it to invoke the VMware Tools control panel interface.

To invoke the VMware Tools control panel on Linux, FreeBSD and Solaris systems, simply execute the following at a command-line prompt (note that since the control panel will appear in its own window on the desktop the trailing '&' character is used to run the process in the background, thereby freeing up the command line shell for running other commands):

/usr/bin/vmware-toolbox&

Once loaded, the control panel will appear as follows:


The VMware Tools Control Panel

Shrinking the Virtual Disk

The shrink tab of the VMware Tools control panel allows virtual disks associated with the virtual machine to be reduced in size by reclaiming unused areas on the disk. In the first instance, free space on the disk is reclaimed within the guest operating system. Subsequently, the virtual disk image on the host file system is then reduced in size by the VMware Server software.

To shrink the disk, select the Shrink tab of the VMware Tools Control Panel. Within the Shrink page, select the disk and click on the Shrink button. A number of confirmation dialogs will be displayed seeking confirmation that the size of the disk is to be reduced. Once confirmation has been received, VMware Server will reclaim unused space on the disk and reduce the size of the physical virtual disk image (.vmdk) file on the host system.

If the shrinking process reduced the size of the virtual disk by too much, simply enlarge the disk to the desired size following the instructions in the Virtuatopia How to Increase the Size of a VMware Server 2.0 Virtual Disk How To.