Recently I have been struggling to enable hardware accelerated fast provisioning in vCloud Director. It is not particularly well documented so I am putting all the necessary steps here for the benefits of others.
First some theory: VMware technical marketing storage guru Cormac Hogan explains on his personal blog new vSphere 5.1 storage enhancement in vCloud Director and also the new NFS VAAI Fast File Clone primitive. vCloud Director has been supporting linked clone based fast provisioning since version 1.5. However in the current version 5.1 we fully support the hardware offload. A linked clone (first used in VMware View) is a duplicate of a virtual machine that uses the same base disk as the original with a chain of delta disks to track the differences between the original and the clone. It is used mainly to speed up the VM provisioning operations where it takes just a second or so to create a clone whereas a full clone operation can take minutes. It brings also significant storage efficiency. However it has also some drawbacks – the main is the loss of performance. As we can create clone of a clone a long chain of related delta disks is created (by default up to 30) and the virtual machine’s disk read I/O operation has to traverse through the chain to find the right block. Also by design delta disks are not storage aligned as they contain the block content plus its location.
So here comes the hardware offload. If NFS storage is used we can use the Fast File Clone VAAI primitive which offloads the clone creation (basically a vmdk file copy) to the storage hardware. NFS has advantage here over the block storage as the storage array has no notion of vmdk files. I have seen EMC and NetApp implementations and will describe the latter as it can be easily simulated with the NetApp Edge Virtual Storage Appliance which can be downloaded with 90 day evaluation licenses here: (note NetApp Edge requires 2 vCPUs and utilizes them 100% all the time!).
- NetApp supports NAS VAAI with firmware Data ONTAP 8.1 in cluster mode and Data ONTAP 8.1.1 in 7-mode. The NetApp Edge Appliance I used came with Data ONTAP 8.1.1 in 7-mode.
- FlexClone file technology is used to create hardware offloaded linked clones therefore it must be licensed. FlexClone does not physically copy any data blocks just a new metadata is created which points to the original blocks as shown in the picture taken from the NetApp Storage Management Guide.
If FlexClone is not licensed, vCloud Director can still offload the cloning to the array however slow full clone is created instead by the array. The Eval license comes with FlexClone license key which must be entered with license add <license code> command from the Data ONTAP console.
- In order to enable NFS VAAI on vSphere a storage vendor VMkernel module must be installed. NetApp provides NetApp NAS Plugin (NetAppNasPlugin.v18.zip). It must be either incorporated to the ESX installation image profile or installed manually from the ESXi shell:
esxcli software vib install -d /path/to/NetAppNasPlugin.v18.zip
- VAAI must also be enabled on the NetApp. This is done by enabling VMware vStorage support by running the following command from Data ONTAP console:
options nfs.vstorage.enable on
- If everything done correctly the Hardware Acceleration column in the vSphere list of datastore should show Supported. More info about the datastore can be displayed by running command vmkfstools -Ph /vmfs/volumes/<datastore>
~ # vmkfstools -Ph /vmfs/volumes/NetAppNFS1
NFS-1.00 file system spanning 1 partitions.
File system label (if any): NetAppNFS1
Capacity 28.5 GB, 28.5 GB available, file block size 4 KB
Partitions spanned (on “notDCS”):
NAS VAAI Supported: YES
Is Native Snapshot Capable: YES
- Once we assign the NFS datastore to a StorageProfile which is used by a Provider VDC in vCloud Director we should see it in the vCloud Director > System > Manage & Monitor > vSphere Resources > Datastores & Datastores Clusters menu. Here we must check the Enable VAAI fast provisioning checkbox in the datastore General properties, which instructs vCloud Director that on this particular datastore linked clones will be hardware offloaded.
- Now we can create a Organization VDC with Fast Provisioning enabled and test its functionality.
A few notes:
- Maximum length of FlexClone chain is 32,767 which is much higher than vCloud Director default VAAI chain length 256. In cases where storage array does not support chain length 256 it must be lowered by changing the value in the vCloud Director database (table config -> VirtualMachine.AllowedMaxVAAIChainLength)
- You can see if a particular vmdk was create by hardware snapshot by examining its vmdk descriptor file:
isNativeSnapshot=”yes” … hardware offloaded snapshot
isNativeSnapshot=”no” … regular vSphere REDO logs based snapshot
- The concept of shadow VMs stays the same as with regular fast provisioning. FlexClone operation cannot span FlexVols even if both are on the same aggregate. Therefore a fully cloned Shadow VM is created first when a clone operation between datastore is initiated. Then a regular vSphere snapshot is performed on the Shadow VM and then a Native Snapshot is created for the target clone. Shadow VMs are registered in the System VDC resource pool.
- Shadow VM is not deleted automatically even if all her clones on datastores are removed. This actually makes sense as additional clones could be created and leverage the fast clone operation. It can be deleted from original VMs “Shadow VMs” tab.
- Native clones cannot be storage vMotioned.
- I have seen statement that only VM hardware 9 is supported however I have successfully tested it with VM hardware 8.