

So, I thought of writing this for my own documentation and also share it with the community for better consumption. In my day-to-day job, I end up using most of these examples under various circumstances and sometimes I have the need to refer to the documentation. The idea behind the article was to provide various options available when using vmkfstools with Virtual Disks. Virtual disk options allow you to set up, migrate, and manage virtual disks stored on your datastores.Vmkfstools is a vSphere CLI tool available on every ESXi host and can be used to perform various activities against the VMFS volumes and virtual disks. You can also perform most of these tasks through the vSphere Client. When you create or clone a virtual disk, you can use the -d|-diskformat suboption to specify the format for the disk. Use the vmkfstools command to create a virtual disk. Use the vmkfstools command to initialize a virtual disk. Use the vmkfstools command to inflate a thin virtual disk. Converting a Zeroedthick Virtual Disk to an Eagerzeroedthick Disk.Use the vmkfstools command to convert any zeroedthick virtual disk to an eagerzeroedthick disk.

Use the vmkfstools command to remove zeroed blocks. Use the vmkfstools command to delete a virtual disk file at the specified path on the VMFS volume. Cloning or Converting a Virtual Disk or RDM.Use the vmkfstools command to rename a virtual disk file at the specified path on the VMFS volume. Use the vmkfstools command to create a copy of a virtual disk or raw disk you specify.Īfter you create a virtual machine, you can use the vmkfstools command to extend the size of a disk allocated to the virtual machine. Creating a Virtual Compatibility Mode Raw Device Mapping.This option converts the specified virtual disk file from ESX Server 2 formats to the ESXi format. Use the vmkfstools command to create a Raw Device Mapping (RDM) file on a VMFS volume and map a raw LUN to this file. After this mapping is established, you can access the LUN as you would a normal VMFS virtual disk. Creating a Physical Compatibility Mode Raw Device Mapping.The file length of the mapping is the same as the size of the raw LUN it points to.


Use the vmkfstools command to map a pass-through raw device to a file on a VMFS volume. With the mapping, a virtual machine can bypass ESXi SCSI command filtering when accessing its virtual disk. This type of mapping is useful when the virtual machine must send proprietary SCSI commands, for example, when SAN-aware software runs on the virtual machine. Use the vmkfstools command to list the attributes of a raw disk mapping.
