About Rave Computer: Media Room
The Rave Review: Bits & Bytes

In this Quarter's Bits & Bites we will take a look at the different volume types which VMware supports. Now you might ask yourself "Why do I need to be concerned with the volume type?" The answer is performance and type of Guest you are rolling out.

For either an Exchange server or some sort of Database server, disk performance can become the limiting factor with performance, more so than say a Citrix or Remote Desktop server because of the quantity and frequency of writes to "disk." Typically you might find Thin provisioned disks allocated to Citrix Guest's and an RDM or Thick provisioned disk allocated to Exchange or Database server Guests. Now the disk itself is in a lot of respects virtual, if only I could virtually be at work while in reality I am at home.

VirtualDiskType Since VI API 2.5

Description: The types of virtual disks that can be created or cloned.

eagerZeroedThick:

An eager zeroed thick disk has all space allocated and wiped clean of any previous contents on the physical media at creation time. Such disks may take longer time during creation compared to other disk formats. NOTE: This value may be removed before release if Satyam confirms that remote vmkfstools can implement this option by using preallocated followed by an explicit call to ZeroFillVirtualDisk_Task


preallocated:

A preallocated disk has all space allocated at creation time and the space is zeroed on demand as the space is used.


raw:

Raw device.


rdm:

Virtual compatibility mode raw disk mapping. An rdm virtual disk grants access to the entire raw disk and the virtual disk can participate in snapshots.


rdmp:

Physical compatibility mode (pass-through) raw disk mapping. An rdmp virtual disk passes SCSI commands directly to the hardware, but the virtual disk cannot participate in snapshots.


sparse2Gb:

A sparse disk with 2GB maximum extent size. Disks in this format can be used with other VMware products. The 2GB extent size makes these disks easier to burn to dvd or use on file systems that don't support large files.


thick:

A thick disk has all space allocated at creation time. This space may contain stale data on the physical media. Thick disks are primarily used for virtual machine clustering, but they are generally insecure and should not be used. NOTE: This value may be removed before release if Satyam confirms that remove vmkfstools can implement this option by using preallocated (why should anyone care if we lazily zero the disk even though they didn't ask us to.


thick2Gb:

A thick disk with 2GB maximum extent size. Disks in this format can be used with other VMware products. The 2GB extent size makes these disks easier to burn to dvd or use on file systems that don't support large files.


thin:

Space required for thin-provisioned virtual disk is allocated and zeroed on demand as the space is used.


Below is how you might create and eagerZoredThick disk via CLI:

Q: IN VMWare ESXi 4, what's the easiest way to convert an existing virtual machine's .vmdk to eager-zeroed thick?

A: The easiest is always via vCenter server when you enable FT for a single vCPU VM in HA cluster, this process will automatically convert the disk from lazy zeroed to eager-zeroed thick. Other than that you have to do it manually using vmkfstools (e.g. vmkfstools -k myVM.vmdk)

But take note, you cant just convert existing thin to eager-zeroed thick (especially in vSphere we like to use thin) this will not work as it can only convert preallocated vmdk to overcome this problem you need to clone it and specify the desired disk format

vmkfstools -i myVM.vmdk newdisk.vmdk -d eagerzeroedthick

once done
mv myVM.vmdk old.vmdk (backup old vmdk)
mv newdisk.vmdk myVM.vmdk (attach to VM)

Test your vm, if it works fine then delete old.vmdk & myVM-flat.vmdk. Take note, your renamed myVM.vmdk will be using newdisk-flat.vmdk as vmdk file is just the disk descriptor file, it will point to specific flat file you can fix this by editing the vmx file if you want.

I recommend to always to use -i not -k as corruption may occur (nothing is perfect) and at least you have backup

Just to add, preallocated vmdk = thick disk if you are not aware, thin disk will grow up to the max specified size as you add data to it, this is new in vSphere

* No warranty express or implied is made for any information provided.