6.7

Table Of Contents
This option creates a virtual disk at the specified path on a datastore. Specify the size of the virtual disk.
When you enter the value for size, you can indicate the unit type by adding a suffix of k (kilobytes), m
(megabytes), or g (gigabytes). The unit type is not case-sensitive. vmkfstools interprets either k or K to
mean kilobytes. If you do not specify a unit type, vmkfstools defaults to bytes.
You can specify the following suboptions with the -c option.
n
-d|--diskformat specifies disk formats.
n
-W|--objecttype specifies whether the virtual disk is a file on a VMFS or NFS datastore, or an
object on a vSAN or Virtual Volumes datastore.
n
--policyFile fileName specifies VM storage policy for the disk.
Example: Example for Creating a Virtual Disk
This example shows how to create a two-gigabyte virtual disk file named disk.vmdk. You create the disk
on the VMFS datastore named myVMFS. The disk file represents an empty virtual disk that virtual
machines can access.
vmkfstools -c 2048m /vmfs/volumes/myVMFS/disk.vmdk
Initializing a Virtual Disk
Use the vmkfstools command to initialize a virtual disk.
-w|--writezeros
This option cleans the virtual disk by writing zeros over all its data. Depending on the size of your virtual
disk and the I/O bandwidth to the device hosting the virtual disk, completing this command might take a
long time.
Caution When you use this command, you lose any existing data on the virtual disk.
Inflating a Thin Virtual Disk
Use the vmkfstools command to inflate a thin virtual disk.
-j|--inflatedisk
This option converts a thin virtual disk to eagerzeroedthick, preserving all existing data. The option
allocates and zeroes out any blocks that are not already allocated.
Converting a Zeroedthick Virtual Disk to an Eagerzeroedthick Disk
Use the vmkfstools command to convert any zeroedthick virtual disk to an eagerzeroedthick disk.
-k|--eagerzero
While performing the conversion, this option preserves any data on the virtual disk.
vSphere Storage
VMware, Inc. 348