How does the credit consumption work when assigning vCPUs in the VM flexible licensing method?
4789
Created On 10/08/24 12:57 PM - Last Modified 10/31/25 22:43 PM
Question
- When using VM flexible licensing method, it is required to create a deployment profile and set the amount of vCPUs that the VM or VMs attached to the deployment profile should use.
- However, are the flexible deployment profiles enforcing the amount of vCPUs the VM will have regardless other factors like credits available, for instance?
Environment
- PA-VM-FLEX
Answer
- The flexible deployment profiles cannot enforce the amount of vCPUs, it depends mainly on the amount of credits consumed/allocated among other reasons.
- If there are enough credits, it is possible to see in the image below the amount of credits consumed for a test deployment profile for a 4 cores VM where the deployment profile is set to 2 vCPU.
---> It will be reflected in the system details when executing ‘show system info´ cli command:
user@flexlicensetest> show system info: … vm-license: VM-SERIES-4 vm-cap-tier: 16.0 GB ——> vm-cpu-count: 4 …
- Virtual machines licensed using the VM Flexible licensing method will attempt to license the amount of cores the host VM has as long as there are enough credits in our Credit Pool. If there are not enough credits for the amount of cores the VM has, it will trigger below error:
- In order to make sure the VM using a flexible deployment profile will license the amount of vCPUs which are decided and, therefore, only consume credits for them it is necessary to set the amount of cores directly on the CLI of the VM or in the bootstrap.
user@flexlicensetest> request plugins vm_series set-cores cores 2 Total cores configured to 2. Setting custom cores requires system reboot. Custom DP cores might get reset to accomodate the new custom core setting.
- After the change, it will only consume credits for those and the output will show it has reduced:
- It will be reflected in the system details when ‘show system info´ cli command is executed:
user@flexlicensetest> show system info: … vm-license: VM-SERIES-2 vm-cap-tier: 16.0 GB ——> vm-cpu-count: 2
- It is also possible to check the sdb details for the VM to verify the amount of customized cores are set in the VM using this command:
show system state filter cfg.platform.cust-cores
user@flexlicensetest> show system state filter cfg.platform.cust-cores ——> cfg.platform.cust-cores: 2
- This change of cores via cli can be done at any point in time even after the VM has already been licensed. Once the change is applied and the VM is rebooted, it should boot honoring the change and it should be reflected in the credit pool consumption.