You can use the ‘vmkfstools’ in an ESXi SSH-Shell to copy virtual disks, or expand them, or whatever
Expand a virtual disk:
vmkfstools -X 30G ./DISK.vmdk
Be sure not to use the *-flat.vmdk file!
After expansion use GParted to expand the partition inside the virtual disk.
Clone a virtual disk:
vmkfstools -i ./OLD.vmdk ./NEW.vmdk
# vmkfstools - OPTIONS FOR FILE SYSTEMS:
vmkfstools -C --createfs vmfs3
-b --blocksize #[mMkK]
-S --setfsname fsName
-Z --spanfs span-partition
-G --growfs grown-partition
deviceName
-P --queryfs -h --humanreadable
-T --upgradevmfs
vmfsPath
OPTIONS FOR VIRTUAL DISKS:
vmkfstools -c --createvirtualdisk #[gGmMkK]
-d --diskformat [zeroedthick|
thin|
eagerzeroedthick]
-a --adaptertype [buslogic|lsilogic|ide]
-w --writezeros
-j --inflatedisk
-k --eagerzero
-K --punchzero
-U --deletevirtualdisk
-E --renamevirtualdisk srcDisk
-i --clonevirtualdisk srcDisk
-d --diskformat [zeroedthick|
thin|
eagerzeroedthick|
rdm:<device>|rdmp:<device>|
2gbsparse]
-X --extendvirtualdisk #[gGmMkK]
[-d --diskformat eagerzeroedthick]
-r --createrdm /vmfs/devices/disks/...
-q --queryrdm
-z --createrdmpassthru /vmfs/devices/disks/...
-v --verbose #
-g --geometry
-x --fix [check|repair]
vmfsPath
OPTIONS FOR DEVICES:
-L --lock [reserve|release|lunreset|targetreset|busreset|readkeys|readresv] /vmfs/devices/disks/...
-B --breaklock /vmfs/devices/disks/...