Skip to content

Add CPU configuration to VM provisioning from Template UI form #129

@vfebvre

Description

@vfebvre

The "Provisioning from Template" form could be improved to add CPU configuration (shared/dedicated, number of CPUs and CPU Pool/Entitlement in the case of shared CPUs).

Any of these attributes can be passed to the template_provision call, similarly to what is currently done for VLANs or LPAR name here:

      :dedicated    => "logicalPartitionConfig/processorConfiguration/hasDedicatedProcessors",
      :sharing_mode => "logicalPartitionConfig/processorConfiguration/sharingMode",
      :vprocs       => "logicalPartitionConfig/processorConfiguration/sharedProcessorConfiguration/desiredVirtualProcessors",
      :proc_units   => "logicalPartitionConfig/processorConfiguration/sharedProcessorConfiguration/desiredProcessingUnits",
      :pool_id      => "logicalPartitionConfig/processorConfiguration/sharedProcessorConfiguration/sharedProcessorPoolId",
      :procs        => "logicalPartitionConfig/processorConfiguration/dedicatedProcessorConfiguration/desiredProcessors"

(https://github.com/IBM/ibm_power_hmc_sdk_ruby/blob/0fac4b7a9e1bff8940740e129715412e3b9a8fdb/lib/ibm_power_hmc/schema/templates.rb#L20)

  • dedicated is set to true or false
    • if true (dedicated CPU):
      • procs can be set to the number of desired processors
    • if false (shared CPU):
      • vprocs is the number of virtual processors (cannot be less than proc_units and there is also a minimum of proc_units required per vproc)
      • proc_units is the cpu entitlement to claim from the selected shared CPU pool
      • pool_id is an integer between 0 and 63 supposed to identify the shared CPU pool (0 = DefaultPool)

The pool_id attribute is not currently saved in the ManageIQ database, so from the provisionning form side, the template name or UUID we get would have to be converted to a pool_id and this will require an extra call to the SDK (templates) to get the full list of templates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions