powervm_partition_profile – Create, Copy and Update PowerVM Partition Profiles

Synopsis

Creates a new partition profile.

Copies an existing partition profile.

Modifies an existing partition profile.

Requirements

The below requirements are needed on the host that executes this module.

  • Python >= 3.9

  • lxml

Parameters

hmc_host (True, str, None)

IP address or hostname of the HMC.

hmc_auth (True, dict, None)

Username and password credential of the HMC.

username (True, str, None)

Username of the HMC to log in.

password (optional, str, None)

Password of the HMC.

system_name (optional, str, None)

The name or MTMS (machine type model serial) of the managed system.

Required for state=present, action=copy and state=updated.

vm_name (True, str, None)

The name of the PowerVM partition.

name (True, str, None)

Name of the existing logical partition profile.

Used as the source profile when action=copy.

processor_settings (optional, dict, None)

Processor configuration settings for the partition profile.

Valid only for state=present and state=updated.

processor_mode (optional, str, None)

To specify the processor mode setting.

Valid values are shared and dedicated.

Required for state=present and state=updated.

desired_processors (optional, int, None)

Desired number of processors.

Required for state=present and state=updated.

minimum_processors (optional, int, None)

Minimum number of processors.

Required for state=present and state=updated.

maximum_processors (optional, int, None)

Maximum number of processors.

Required for state=present and state=updated.

desired_processing_units (optional, float, None)

Desired shared processing units for shared processor mode.

Only valid if the processor_mode is shared.

Required for state=present and state=updated if processor_mode is shared.

minimum_processing_units (optional, float, None)

Minimum shared processing units.

Only valid if the processor_mode is shared.

Required for state=present and state=updated if processor_mode is shared.

maximum_processing_units (optional, float, None)

Maximum shared processing units.

Only valid if the processor_mode is shared.

Required for state=present and state=updated if processor_mode is shared.

sharing_mode (optional, str, None)

Processor sharing mode for shared processor configuration.

Only valid if the processor_mode is shared.

Valid values are capped and uncapped.

Default value is capped.

uncapped_weight (optional, int, None)

Weight value used for uncapped shared processor mode.

Only valid if the processor_mode is shared.

Default value is 0.0.

allow_processor_sharing (optional, str, None)

Only valid if the processor_mode is dedicated.

Valid values are active, inactive, always, and never.

This determines if idle processors are released to the shared pool.

Use active to share idle cycles while the LPAR is running.

Use inactive to share cycles only when the LPAR is inactive.

Use always for continuous sharing of idle processor cycles.

Use never to ensure processors are never shared (performance mode).

Default value is never.

shared_processor_pool (optional, int, None)

Only valid if the processor_mode is shared.

Shared processor pool id.

memory_settings (optional, dict, None)

Memory configuration settings for the partition profile.

Valid only for state=present and state=updated.

desired_memory (optional, int, None)

Desired memory value in MB.

Required for state=present and state=updated.

minimum_memory (optional, int, None)

Minimum memory value in MB.

Required for state=present and state=updated.

maximum_memory (optional, int, None)

Maximum memory value in MB.

Required for state=present and state=updated.

desired_huge_pagecount (optional, int, None)

Desired number of huge pages for the logical partition.

Required for state=present and state=updated.

minimum_huge_pagecount (optional, int, None)

Minimum number of huge pages for the logical partition.

Required for state=present and state=updated.

maximum_huge_pagecount (optional, int, None)

Maximum number of huge pages for the logical partition.

Required for state=present and state=updated.

active_memory_expansion (optional, bool, None)

Enable Active Memory Expansion.

Default value is False.

expansion_factor (optional, float, None)

Active Memory Expansion (AME) expansion factor.

Valid values are from 1.0 to 10.0.

hardware_page_tableratio (optional, int, None)

Hardware page table ratio.

Valid values are from 5 to 9.

desired_physical_page_tableratio (optional, int, None)

Desired physical page table ratio.

Valid values are from 0 to 6.

duplicate_prof_name (optional, str, None)

Name of the new profile to be created by copying an existing profile.

Required when action=copy.

force (optional, bool, False)

Forces update of the partition profile when set to True.

Valid only for state=updated.

When the Sync Partition with Profile option is enabled, using this option forcefully updates the profile. These changes will take effect the next time the partition profile is activated.

state (optional, str, None)

Desired state of the logical partition profile.

present creates a new partition profile.

updated modifies an existing partition profile.

Mutually exclusive with action. One of state or action must be provided.

action (optional, str, None)

copy copies an existing partition profile.

Mutually exclusive with state. One of state or action must be provided.

Notes

Note

  • This module currently support only Processor and Memory configuration.

  • Copy operation is supported for HMC version >= HMC V11R1.

Examples

- name: Create a new partition profile with dedicated processor
  ibm.power_hmc.powervm_partition_profile:
    hmc_host: '<hmc_host>'
    hmc_auth:
      username: '<hmc_username>'
      password: '<hmc_password>'
    system_name: <system_name/mtms>
    vm_name: <vm_name>
    name: dedicated_profile
    memory_settings:
      desired_huge_pagecount: 2
      maximum_huge_pagecount: 2
      minimum_huge_pagecount: 2
      desired_memory: 1024
      maximum_memory: 1024
      minimum_memory: 1024
    processor_settings:
      processor_mode: dedicated
      desired_processors: 1
      maximum_processors: 3
      minimum_processors: 1
      allow_processor_sharing: never
    state: present

- name: Create a new partition profile with shared processor and uncapped sharing mode
  ibm.power_hmc.powervm_partition_profile:
    hmc_host: '<hmc_host>'
    hmc_auth:
      username: '<hmc_username>'
      password: '<hmc_password>'
    system_name: <system_name/mtms>
    vm_name: <vm_name>
    name: shared_testing
    processor_settings:
      processor_mode: shared
      desired_processors: 1
      maximum_processors: 1
      minimum_processors: 1
      minimum_processing_units: 1.0
      maximum_processing_units: 1.0
      desired_processing_units: 1.0
      sharing_mode: uncapped
      uncapped_weight: 100
    memory_settings:
      desired_huge_pagecount: 2
      maximum_huge_pagecount: 2
      minimum_huge_pagecount: 2
      desired_memory: 1024
      maximum_memory: 1024
      minimum_memory: 1024
      expansion_factor: 10
    state: present

- name: Create a copy of an existing partition profile
  ibm.power_hmc.powervm_partition_profile:
    hmc_host: '<hmc_host>'
    hmc_auth:
      username: '<hmc_username>'
      password: '<hmc_password>'
    system_name: <system_name/mtms>
    vm_name: <vm_name>
    name: shared_testing
    duplicate_prof_name: test
    action: copy

- name: Modify the processor and memory settings of an existing partition profile
  ibm.power_hmc.powervm_partition_profile:
    hmc_host: '<hmc_host>'
    hmc_auth:
      username: '<hmc_username>'
      password: '<hmc_password>'
    system_name: <system_name/mtms>
    vm_name: <vm_name>
    name: shared_testing
    processor_settings:
      processor_mode: shared
      desired_processors: 1
      maximum_processors: 1
      minimum_processors: 1
      minimum_processing_units: 1.0
      maximum_processing_units: 1.0
      desired_processing_units: 1.0
      sharing_mode: uncapped
      uncapped_weight: 100
    memory_settings:
      desired_huge_pagecount: 2
      maximum_huge_pagecount: 2
      minimum_huge_pagecount: 2
      desired_memory: 1024
      maximum_memory: 1024
      minimum_memory: 1024
      expansion_factor: 10
      force: true
    state: updated

Return Values

changed (always, bool, )

Indicates whether any change was made.

profile_info (on success, dict, {‘msg’: ‘copy of default_profile partition profile is created successfully’})

Information about the logical partition profile operation.

For state=present, contains a success message for the created profile.

For action=copy, contains a success message for the copied profile.

Status

  • This module is not guaranteed to have a backwards compatible interface. [preview]

  • This module is maintained by community.

Authors

  • Sreenidhi (@SreenidhiS1)