How to expand, shrink or do other disk operations in VMware from cmd
In most cases to utilise your vm-disk it needs to be dynamic. So if you have preallocated space for your disk then convert it to a dynamic one.
[bash]# make the vm-disk from pre-alloc. to dynamic (-t 0 = dynam. single file)
vmware-vdiskmanager -r sourceDisk.vmdk -t 0 targetDisk.vmdk
# expand the size of a vm-disk
vmware-vdiskmanager -x 40GB myDisk.vmdk
# shrink a vm-disk
vmware-vdiskmanager -k myDisk.vmdk
#You can also rename a vm-disk once you have removed from VMware library
vmware-vdiskmanager -n myDisk.vmdk myNewDisk.vmdk[/bash]
In some cases you might not be able to shrink it, then it is best to use VMware Converter which does the job fine by selecting the partition/volume holding the system and ommit the secondary “larger” partition wich you should have previously repartitioned i.e. PartitionMagic and left only the useful part of the drive.