6.7

Table Of Contents
By default, ESXi uses its native methods to perform the cloning operations. If your array supports the
cloning technologies, you can off-load the operations to the array. To avoid the ESXi native cloning,
specify the -N|--avoidnativeclone option.
Example: Example for Cloning or Converting a Virtual Disk
This example illustrates cloning the contents of a master virtual disk from the templates repository to a
virtual disk file named myOS.vmdk on the myVMFS file system.
vmkfstools -i /vmfs/volumes/myVMFS/templates/gold-master.vmdk /vmfs/volumes/myVMFS/myOS.vmdk
You can configure a virtual machine to use this virtual disk by adding lines to the virtual machine
configuration file, as in the following example:
scsi0:0.present = TRUE
scsi0:0.fileName = /vmfs/volumes/myVMFS/myOS.vmdk
If you want to convert the format of the disk, use the -d|--diskformat suboption.
This suboption is useful when you import virtual disks in a format not compatible with ESXi, for example
2gbsparse format. After you convert the disk, you can attach this disk to a new virtual machine you create
in ESXi.
For example:
vmkfstools -i /vmfs/volumes/myVMFS/templates/gold-master.vmdk /vmfs/volumes/myVMFS/myOS.vmdk -d thin
Extending a Virtual Disk
After you create a virtual machine, you can use the vmkfstools command to extend the size of a disk
allocated to the virtual machine.
-X|--extendvirtualdisk newSize[bBsSkKmMgGtT]
Specify the newSize parameter adding an appropriate unit suffix. The unit type is not case-sensitive.
vmkfstools interprets either k or K to mean kilobytes. If you do not specify the unit type, vmkfstools
defaults to kilobytes.
The newSize parameter defines the entire new size, not just the increment you add to the disk.
For example, to extend a 4-g virtual disk by 1 g, enter: vmkfstools -X 5g disk name.
You can extend the virtual disk to the eagerzeroedthick format by using the -d eagerzeroedthick
option.
When you use the -X option, the following considerations apply:
n
Do not extend the base disk of a virtual machine that has snapshots associated with it. If you do, you
can no longer commit the snapshot or revert the base disk to its original size.
vSphere Storage
VMware, Inc. 350