Changes

Jump to: navigation, search

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

1,549 bytes added, 17:38, 27 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 ''vmware-vdiskmanager'' tool), both of which will be covered in this guide. 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.
* If the virtual disk is configured as ''Independent'' it must be in ''Persistent Mode''.
* Shrinking involves discarding the majority of any unallocated space within the virtual disk. As such, it is not possible to dictate the amount by which the disk should be shrunk. If the shrink process leaves insufficient space, additional space may be subsequently be allocated as outlined in [[How to Increase the Size of a VMware Server 2.0 Virtual Disk]]. == Installing 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''. If the disk to be resized is pre-allocated it must first be convereted to a growable disk, the syntax for which is: vmware-vdiskmanager -r ''<oldfilename>.vmdk'' -t ''<type> <newfilename>.vmdk'' where ''<oldfilename>.vmdk'' is the name of the virtual disk image file to be converted, ''<type>'' is the number from the above table indicating the target virtual disk type, and ''<newfilename>.vmdk'' is the name of the new, converted file.  For example, to convert a virtual disk image file called ''win2008-1_2.vmdk'' to a growable disk called ''new.vmdk'' the following command would need to be executed: <pre>vmware-vdiskmanager -r win2008-1_2.vmdk -t 0 new.vmdk</pre> Once the disk has been converted, the size may be reduced, using the ''-k'' command line option. For example: <pre>vmware-vdiskmanager -k new.vmdk </pre> == Shrinking Virtual Disks Using 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]].
1,798
edits

Navigation menu