powervm_dlpar – Dynamically managing resources of partition

Synopsis

Managing processor resources dynamically

Managing memory resources dynamically

Managing Storage resources dynamically

Parameters

hmc_host (True, str, None)

The 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 login.

password (optional, str, None)

Password of the HMC.

system_name (True, str, None)

The name of the managed system.

vm_name (True, str, None)

The name of the powervm partition.

proc_settings (optional, dict, None)

Processor related settings.

proc (optional, int, None)

The number of dedicated processors to create a partition.

If proc_unit parameter is set, then this value will work as virtual processors for shared processor setting.

proc_unit (optional, float, None)

The number of shared processing units to create a partition.

sharing_mode (optional, str, None)

The sharing mode of the partition.

Valid values for partitions using dedicated processors are keep_idle_procs, share_idle_procs, share_idle_procs_active, share_idle_procs_always.

Valid values for partitions using shared processors are capped, uncapped.

uncapped_weight (optional, int, None)

The uncapped weight of the partition.

pool_id (optional, int, None)

Shared Processor Pool ID to be set.

mem_settings (optional, dict, None)

Memory related settings.

mem (optional, int, None)

The value of dedicated memory value in megabytes to create a partition.

timeout (optional, int, None)

The maximum time, in minutes, to wait for partition operating system to complete dlpar.

This option is valid for following actions update_proc_mem, update_pv, update_npiv and update_vod

pv_settings (optional, list, None)

List of Physical Volumes settings to be configured.

This option is valid only for update_pv action.

disk_name (True, str, None)

Name of the Disk.

vios_name (True, str, None)

Virtual IO Server name of the Disk belongs to.

target_name (optional, str, None)

Target Device name.

Optional, if not provided auto assigns <vtscsi*>.

server_adapter_id (optional, int, None)

The Server adapter slot number to be configured with SCSI adapter.

Optional, if not provided next available value will be assigned.

client_adapter_id (optional, int, None)

The client adapter slot number to be configured with SCSI adapter.

Optional, if not provided next available value will be assigned.

npiv_settings (optional, list, None)

List of Virtual Fibre Channel port settings to be configured.

This option is valid only for update_npiv action.

fc_port_name (True, str, None)

Fibre Channel Port name.

vios_name (True, str, None)

Virtual IO Server name of the Fibre Channel Port belongs to.

wwpn_pair (optional, str, None)

The WWPN pair value to be configured with client FC adapter.

Both the WWPN value should be separated by semicolon delimiter example ‘c0507607577aefc0;c0507607577aefc1’.

Optional, if not provided the value will be auto assigned.

server_adapter_id (optional, int, None)

The Server adapter slot number to be configured with FC adapter.

Optional, if not provided next available value will be assigned.

client_adapter_id (optional, int, None)

The client adapter slot number to be configured with FC adapter.

Optional, if not provided next available value will be assigned.

vod_settings (optional, list, None)

List of Virtual optical device settings to be configured.

This option is valid only for update_vod action.

device_name (True, str, None)

Name of the device.

vios_name (True, str, None)

Virtual IO Server name.

server_adapter_id (optional, int, None)

The Server adapter slot number to be configured.

Optional, if not provided next available value will be assigned.

client_adapter_id (optional, int, None)

The client adapter slot number to be configured.

Optional, if not provided next available value will be assigned.

media_name (optional, str, None)

Name of the media to be loaded.

Optional, if not provided no media will be loaded.

action (True, str, None)

update_proc_mem updates the processor and memory resources of the partition.

update_pv Attach Physical Volumes via Virtual SCSI.

update_npiv Attach FC Port.

update_vod Attach Virtual Optical Device.

Notes

Note

  • If the updating of settings for at least one VIOS is successful during the execution of the “update_pv” action, the changed status will be displayed as 1, and any failed updates will be shown as warnings. This behavior remains consistent for both the “update_npiv” and “update_vod” actions.

  • Passwordless authentication is not supported

Examples

- name: Dynamically set the processor and memory values.
  powervm_dlpar:
    hmc_host: "{{ inventory_hostname }}"
    hmc_auth:
         username: '{{ ansible_user }}'
         password: '{{ hmc_password }}'
    system_name: <server name>
    vm_name: <vm name>
    proc_settings:
      proc: 3
      proc_unit: 2.5
      sharing_mode: 'uncapped'
      uncapped_weight: 131
      pool_id: 2
    mem_settings:
      mem: 3072
    action: update_proc_mem

- name: Dynamically configure Physical Volume settings on Lpar.
  powervm_dlpar:
    hmc_host: '{{ inventory_hostname }}'
    hmc_auth:
         username: '{{ ansible_user }}'
         password: '{{ hmc_password }}'
    system_name: <server name>
    vm_name: <vm name>
    pv_settings:
      - vios_name: <vios1>
        disk_name: <hdiskA>
      - vios_name:  <vios2>
        disk_name:  <hdiskB>
        target_name: <TargetName>
      - vios_name: <vios1>
        disk_name: <hdiskC>
        target_name: <TargetName>
        server_adapter_id: <Adapter_ID>
        client_adapter_id: <Adapter_ID>
    action: update_pv

- name: Dynamically configure NPIV settings on Lpar.
  powervm_dlpar:
    hmc_host: '{{ inventory_hostname }}'
    hmc_auth:
         username: '{{ ansible_user }}'
         password: '{{ hmc_password }}'
    system_name: <server name>
    vm_name: <vm name>
    npiv_settings:
      - vios_name: '<VIOS_NAME1>'
        fc_port_name: 'fcs0'
        wwpn_pair: <wwpn1>;<wwpn2>
        client_adapter_id: 6
        server_adapter_id: 9
      - vios_name: '<VIOS_NAME2>'
        fc_port_name: 'fcs0'
        client_adapter_id: 9
        server_adapter_id: 15
    action: update_npiv

- name: Dynamically configure Virtual Optical Disk settings on Lpar.
  powervm_dlpar:
    hmc_host: '{{ inventory_hostname }}'
    hmc_auth:
         username: '{{ ansible_user }}'
         password: '{{ hmc_password }}'
    system_name: <server name>
    vm_name: <vm name>
    vod_settings:
      - vios_name: '<VIOS_Name1>'
        device_name: '<device_name1>'
        media_name: '<media_name1>'
      - vios_name: '<VIOS_Name2>'
        device_name: '<device_name2>'
        client_adapter_id: 9
        server_adapter_id: 15
    action: update_vod

Return Values

partition_info (always, dict, )

Return the attributes of the partition.

Status

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

  • This module is maintained by community.

Authors

  • Anil Vijayan(@AnilVijayan)

  • Navinakumar Kandakur(@nkandak1)