Changes

Jump to: navigation, search

How to Reduce the Size of a VMware Server 2.0 Virtual Disk

636 bytes removed, 15:33, 28 October 2008
no edit summary
This HowTo covers the steps necessary to shrink a VMware Server 2.0 virtual disk. Two techniques are available, one involving VMware Tools and the another using the commandline command line ''vmware-vdiskmanager'' tool), both of which . Both approaches will be covered in this guide.
Before beginning this process it is important to understand a few points:
 
* Shrinking currently only appears to be supported on Windows hosts. The VMware documentation states that shrinking is not available on Linux hosts.
* 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).
* Shrinking reduces the amount of space a virtual disk currently occupies on the host system. It does not reduce the size of the disk as far as any guest operating systems using the disk are concerned. When more disk space is needed by a guest, VMware increases the size of the virtual disk image to accommodate the guest. This process is repeated in increments as more space is needed until the maximum specified virtual disk size is reached.
 
== Shrinking a Virtual Disk from the Command Line ==
The size of a VMware virtual disk may be reduced from the command line using the ''vmware-vdiskmanager''tool. If the disk to be shrunk is pre-allocated it must first be converted to a growable disk, the syntax for which is:
vmware-vdiskmanager -r ''<oldfilename>.vmdk'' -t ''<type> <newfilename>.vmdk''
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 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 a terminal 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)as super-user:
<pre>
/usr/bin/vmware-toolbox&
</pre>
Once When loaded, the control panel will appear as follows:
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.
1,798
edits

Navigation menu