Some times ago I wrote about an undocumented feature that allows to limit maximum disk size for VM in vCloud Director. I was asked numerous times if there is similar setting for vCPU and RAM maximums. Today I discovered there is, however it should be considered an experimental feature. I still find it useful as misconfigured VM with extremely large number of vCPUs or huge RAM will impact the host it is running on and cause excessive swapping or high CPU ready times so it is in best interest of the vCloud Director system administrator to prevent it. The other option is to use blocking tasks as described here: CPU and Memory Limit enforcement for vCloud Director and in a blog here.
The limit is set with cell-management-tool command on any cell. Restart of the cell is not necessary.
$VCLOUD_HOME/bin/cell-management-tool manage-config -n vmlimits.memory.limit -v 65536
$VCLOUD_HOME/bin/cell-management-tool manage-config -n vmlimits.cpu.numcpus -v 16
The settings in the example above will limit maximum size of a VM to 16 vCPUs and 64 GB RAM.
Some observations:
- The limit is vCloud Director instance wide and also applies to system administrators
- VM with resources set above the limit will fail to be powered on with an error:
The operation could not be performed, because there are no more CPU resources
or
The operation could not be performed, because there are no more Memory resources - It can be cheated by using CPU or memory hot add and adding resource beyond the limits to an already powered on VM
Again, consider it an experimental feature and use at your own risk.
Hi Tom. Is there any documents for cell management tool. I want to learn “cell-management-tool manage-config” parameters.
https://docs.vmware.com/en/vCloud-Director/9.1/com.vmware.vcloud.admin.doc/GUID-E00C7B95-26B3-4323-9258-F2F056ECB127.html
The manage-config subcommand just creates entry in the vCloud DB config table with given values. There are hundreds of possible config options some of them configured with VCD UI/API, some only manually. Some internal, some experimental, some documented (KBs), some just described on this blog, some are not documented at all.
thank you for quick response
https://vmtechie.blog/2019/04/22/vcloud-director-vm-maximum-vcpuram-size-limits/
It is not clearly described. It didn’t work for me.
Why are you complaining here?