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
sharedanddedicated.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_modeis shared.Required for state=present and state=updated if
processor_modeis shared.- minimum_processing_units (optional, float, None)
Minimum shared processing units.
Only valid if the
processor_modeis shared.Required for state=present and state=updated if
processor_modeis shared.- maximum_processing_units (optional, float, None)
Maximum shared processing units.
Only valid if the
processor_modeis shared.Required for state=present and state=updated if
processor_modeis shared.- sharing_mode (optional, str, None)
Processor sharing mode for shared processor configuration.
Only valid if the
processor_modeis shared.Valid values are
cappedanduncapped.Default value is
capped.- uncapped_weight (optional, int, None)
Weight value used for uncapped shared processor mode.
Only valid if the
processor_modeis shared.Default value is 0.0
- allow_processor_sharing (optional, str, None)
Only valid if the
processor_modeis dedicated.Valid values are
active,inactive,always, andnever.This determines if idle processors are released to the shared pool.
Use
activeto share idle cycles while the LPAR is running.Use
inactiveto share cycles only when the LPAR is inactive.Use
alwaysfor continuous sharing of idle processor cycles.Use
neverto ensure processors are never shared (performance mode).Default value is ‘never’.
- shared_processor_pool (optional, int, None)
Only valid if the
processor_modeis 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.0to10.0.- hardware_page_tableratio (optional, int, None)
Hardware page table ratio.
Valid values are from
5to9.- desired_physical_page_tableratio (optional, int, None)
Desired physical page table ratio.
Valid values are from
0to6.- 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.
presentcreates a new partition profile.
updatedmodify existing partition profile.- action (optional, str, None)
copycopies 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.