powervm_partition_profile – Create, Copy and Update PowerVM Partition Profiles

Synopsis

Create new partition profile

Copy an existing partition profile

Modify an existing partition profile

Requirements

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

  • Python >= 3

  • lxml

Parameters

hmc_host (True, str, None)

IPaddress or hostname of the HMC.

hmc_auth (True, dict, None)

Username and Password credential of the HMC.

username (True, str, None)

HMC username.

password (optional, str, None)

HMC password.

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

state (optional, str, None)

Desired state of the logical partition profile.

present creates a new partition profile.

updated modify existing partition profile.

action (optional, str, None)

copy copies an existing partition profile.

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
  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
  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 already existing partition profile
  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 existing partition profile
  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: 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 state=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)