Limit Maximum Size of Disk in vCloud Director

Although cloud services are providing access to abstracted seemingly infinite physical resources, the truth is that the physical infrastructure is not limitless. Pooling and distributed resource scheduling for compute, storage and network helps but at the end there is always a physical host, LUN or network uplink which constraints the granularity of scaling.

When it comes to storage it is the datastore size that limits the maximum size of virtual disk a cloud consumer can attach to his/her VM. While thin and fast provisioning and dedupe (NFS/VSAN) can be used to fit more data and storage DRS can shuffle the data around when a particular datastore is filling up at the end the service provider should not allow creation of arbitrary size of vdisks (vSphere maximum is 62 TB) to avoid datastore out of space condition. For example letting customers provision 4 TB thin disks on 3 TB LUNs is just asking for trouble.

Before vCloud Director 8.10 service providers were leveraging blocking tasks with custom orchestration to check if provisioned VM is within provider specified limits (RAM size, vDisk size, max vCPUs). There is reference implementation published here: CPU and Memory Limit enforcement for vCloud Director.

vCloud Director 8.10 brings hidden configuration option where service provider can globally set the maximum allowed size of virtual disk.

The option can be set with cell-management-tool command on a vCloud cell with the following syntax:

$VCLOUD_HOME/bin/cell-management-tool manage-config -n vmlimits.disk.capacity.maxMb -v 1000000

which would set maximum size of disk to 1000000 MB which is 1 TB.

Note: the command is run on one vCloud cell and its impact is immediate (no need to restart anything).

If the tenant tries to provision larger vDisk he will get the following error:

Disk Limit

Note that the limit is not enforced for system administrators and existing disks are not affected.

What should be the limit is out of scope for this post as there are many considerations that should be taken into account:

  • datastore size
  • can datastore grow?
  • thin provisioning
  • fast provisioning
  • tenant snapshots
  • provider snapshots (backup software generated)
  • yellow and red datastore thresholds
  • Storage DRS
  • deduplication on the array
Advertisement

5 thoughts on “Limit Maximum Size of Disk in vCloud Director

  1. Hi Tom, judging by the syntax of the command, it looks like there is scope for other parameters like vCPUs and Memory to be limited in a similar manner. Can you confirm or deny?

  2. Hi Tom! Nice feature! Do you have any thoughts on using blocking tasks or another vCloud Director mechanism to limit the available options in the vCpu and Memory to reflect a service catalog offering. Think of a fixed number of vcpu and mem combinations that are available. Currently vCloud Director offers too much choice to tenants to be usefull for my usecase. I use vRA instead but that adds to the licensing cost on a per-vm basis.

  3. Hi, This feature seems bugged currently. If you set the limit to 500GB and you have an existing VM over this size this will prevent you from adding a second VM into the same vApp which the first VM resides within. The check seems to be against the vApp and not the individual VMs.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.