6.0.1

Table Of Contents
Renaming a Virtual Disk
This option renames a virtual disk le at the specied path on the VMFS volume.
You must specify the original le name or le path oldName and the new le name or le path newName.
-E --renamevirtualdisk oldName newName
Cloning or Converting a Virtual Disk or RDM
Use the vmkfstools command to create a copy of a virtual disk or raw disk you specify.
A non-root user is not allowed to clone a virtual disk or an RDM. You must specify the original le name or
le path oldName and the new le name or le path newName.
-i|--clonevirtualdisk oldName newName
-d|--diskformat [thin|zeroedthick|eagerzeroedthick|rdm:device|rdmp:device]
-W|--objecttype [file|vsan|vvol]
--policyFile fileName
-N|--avoidnativeclone
Use the following suboptions to change corresponding parameters for the copy you create.
n
-d|--diskformat species disk formats.
n
-W|--objecttype species whether the virtual disk is a le on a VMFS or NFS datastore, or an object on
a Virtual SAN or Virtual Volumes datastore.
n
--policyFile fileName species VM storage policy for the disk.
By default, ESXi uses its native methods to perform the cloning operations. If your array supports the
cloning technologies, you can o-load the operations to the array. Specify the -N|--avoidnativeclone option
to avoid the ESXi native cloning.
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 le named myOS.vmdk on the myVMFS le system.
vmkfstools -i /vmfs/volumes/myVMFS/templates/gold-master.vmdk /vmfs/volumes/myVMFS/myOS.vmdk
You can congure a virtual machine to use this virtual disk by adding lines to the virtual machine
conguration le, 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 aach 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
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 le named myOS.vmdk on the myVMFS le system.
vmkfstools -i /vmfs/volumes/myVMFS/templates/gold-master.vmdk /vmfs/volumes/myVMFS/myOS.vmdk
Chapter 26 Using vmkfstools
VMware, Inc. 289