Specifications

www.vmware.com
196
VMware GSX Server Virtual Machine Guide
Converting a Virtual Disk
To convert a virtual disk from preallocated to a growable disk, use the following:
vmware-vdiskmanager -r sourceDisk.vmdk -t 0 targetDisk.vmdk
This converts the disk from its original preallocated type to a growable virtual disk
consisting of a single virtual disk file. All of the virtual disk space is no longer
preallocated, and the virtual disk manager reclaims some disk space in the virtual disk
so it is only as large as the data contained within it.
Expand the Size of an Existing Virtual Disk
To expand the size of a virtual disk, use the following:
vmware-vdiskmanager -x 40GB myDisk.vmdk
This increases the maximum capacity of the virtual disk to 40GB.
Renaming a Virtual Disk
To rename a virtual disk, first remove it from any virtual machine that contains the disk
(choose VM > Settings > <virtualdisk>, then click Remove).
Then use the following:
vmware-vdiskmanager -n myDisk.vmdk myNewDisk.vmdk
To rename the disk and locate it in a different directory, use:
vmware-vdiskmanager -n myDisk.vmdk
..\<new>\<path>\myNewDisk.vmdk
Note: The paths used in these examples assume a Windows host.
To locate the disk in a different directory but keep the same name, use:
vmware-vdiskmanager -n myDisk.vmdk
..\<new>\<path>\myDisk.vmdk
After you rename or relocate the virtual disk, add it back to any virtual machines that
use it. Choose VM > Settings, click Add, then follow the wizard to add this existing
virtual disk.
Defragmenting a Virtual Disk
To defragment a virtual disk, use the following:
vmware-vdiskmanager -d myDisk.vmdk
Remember, you cannot defragment a virtual disk if you preallocated all the disk space
when you created the virtual disk. You cannot defragment a physical disk.