Difference between revisions of "How to Convert a VMware Pre-allocated Virtual Disk to a Growable Virtual Disk"

From Virtuatopia
Jump to: navigation, search
(New page: VMware Server supports both ''growable'' and ''pre-allocated'' virtual disks. In addition, the disks can be specified to be contained in a single file, or divided into multiple 2GB files. ...)
 
Line 1: Line 1:
 
VMware Server supports both ''growable'' and ''pre-allocated'' virtual disks. In addition, the disks can be specified to be contained in a single file, or divided into multiple 2GB files.
 
VMware Server supports both ''growable'' and ''pre-allocated'' virtual disks. In addition, the disks can be specified to be contained in a single file, or divided into multiple 2GB files.
  
The virtual disk type is defined at the point that the disk is created. Whilst this is generally not a problem, VMware Server does not support the shrinking of pre-allocated virtual disks. Before a pre-allocated disk can be reduced in size, therefore, it is necessary to first convert it to a ''growable'' disk. This can be performed using the Virtual Disk Manager tool ('''vmware-vdiskmanager'').
+
The virtual disk type is defined at the point that the disk is created. Whilst this is generally not a problem, VMware Server does not support the shrinking of pre-allocated virtual disks. Before a pre-allocated disk can be reduced in size, therefore, it is necessary to first convert it to a ''growable'' disk. This can be performed using the Virtual Disk Manager tool ('''vmware-vdiskmanager''').
  
 
== The vmware-vdiskmanager tool ==
 
== The vmware-vdiskmanager tool ==

Revision as of 17:19, 27 October 2008

VMware Server supports both growable and pre-allocated virtual disks. In addition, the disks can be specified to be contained in a single file, or divided into multiple 2GB files.

The virtual disk type is defined at the point that the disk is created. Whilst this is generally not a problem, VMware Server does not support the shrinking of pre-allocated virtual disks. Before a pre-allocated disk can be reduced in size, therefore, it is necessary to first convert it to a growable disk. This can be performed using the Virtual Disk Manager tool (vmware-vdiskmanager).

The vmware-vdiskmanager tool

The VMware Disk Management Tool is a command line tool which is installed by default with VMware Server. The executable file is named vmware-vdiskmanager and is located in \Program Files\VMware\VMware Server on Windows hosts, and /usr/bin on Linux systems.

The tool accepts a number of command-line arguments, a full listing of which can be obtained by running vmware-vdiskmanager with no options.

vmware-vdiskmanager

Virtual Disk Types

The type to which a virtual disk is to be converted is specified using the -t flag, together with the target disk type. This is represented by a number as outlined in the following table:

Type Identifier

Description

0

Growable (single .vmdk file)

1 Growable (multiple 2GB files)
2 Pre-allocated (single file)

3

Pre-allocated (multiple 2GB files)

4 Pre-allocated ESX
5 Compressed for streaming

Performing the Type Conversion

vmware-vdiskmanager -r  win2008-1_2.vmdk -t 0 new.vmdk

  Creating disk 'new.vmdk'
  Convert: 100% done.
Virtual disk conversion successful.