vios_update_upgrade – Manages the update and upgrade of the VIOS from the HMC

Synopsis

When the Virtual I/O Server (VIOS) partition is running and has an active Resource Monitoring and Control (RMC) connection, this module enables the updating or upgrading of VIOS directly from the Hardware Management Console (HMC)

Updates the VIOS by installing the VIOS installation image located on an NFS/SFTP/HMC hard disk.

Upgrades the VIOS by obtaining the required files from NFS/SFTP/HMC hard disk.

Update the VIOS from IBM Fix Central website.

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.

attributes (True, dict, None)

Configuration parameters required for VIOS update and upgrade.

repository (optional, str, None)

The repository that contains the VIOS installation image.

Valid values are sftp for a secure FTP server, ibmwebsite for the IBM Fix Central website, nfs for an NFS file system, disk for the Hardware Management Console (HMC).

ibmwebsite is only valid for updating of VIOS.

system_name (optional, str, None)

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

vios_id (optional, str, None)

The ID of the VIOS to update/upgrade. vios_id and vios_name are mutually exclusive.

vios_name (optional, str, None)

The name of the VIOS to update/upgrade. vios_id and vios_name are mutually exclusive.

image_name (optional, str, None)

The name of the VIOS update image.

When the VIOS update image is on the HMC hard disk or the IBM Fix Central website, this option is required to specify the name of the image to use for the update.

This parameter is used along with the save option to specify the image that will be saved to the HMC’s hard disk

files (optional, list, None)

The list of the files that is required for update/upgrade.

This option is required and only valid when the VIOS update/upgrade image is on SFTP/NFS remote server.

host_name (optional, str, None)

The host name or IP address of the SFTP/NFS remote server.

user_id (optional, str, None)

The user ID to use to log in to the remote SFTP server.

Only valid if the remote image repository is SFTP.

password (optional, str, None)

The password to use to log in to the remote SFTP server.

password, ssh_key_file are mutually exclusive.

Only valid if the remote image repository is SFTP.

ssh_key_file (optional, str, None)

The name of the file that contains the SSH private key.

password, ssh_key_file are mutually exclusive.

Only valid if the remote image repository is SFTP.

mount_loc (optional, str, None)

The mount location defined on the NFS server that contains the VIOS update image.

Only valid if the remote image repository is NFS.

option (optional, str, None)

Options to be passed to the mount command used to mount the NFS file system that contains the VIOS update image.

The HMC supports NFS versions 3 and 4.

Default version is 3.

Only valid if the remote image repository is NFS.

directory (optional, str, None)

The name of the directory on the remote server that contains the VIOS update image.

If this option is not specified when the VIOS update/upgrade image is on a SFTP server user home directory. In that case command obtains the image from the remote server’s user home directory.

If this option is not specified when the VIOS update/upgrade image is on a NFS server mount directory. In that case command obtains the image from the mount directory.

disks (optional, list, None)

The name of one or more free VIOS disks to be used for the upgrade.

You may need to free or add new disks to perform the upgrade.

Depending on the existing VIOS rootvg size, the disk space needed may be greater than 30GB.

This option is only valid for upgraded

restart (optional, bool, None)

Restarts the VIOS after installing the update if the update requires a restart.

This parameter is valid only for updated.

Default value is False.

save (optional, bool, None)

Save the update image on the HMC hard disk.

state (optional, str, None)

The desired build state of the target VIOS.

facts does not change anything on the VIOS and returns current version of VIOS.

updated ensures the target VIOS is updated with given installation ISO image.

upgraded ensures the target VIOS is upgraded with given upgrade files.

Notes

Note

  • All Operations support passwordless authentication.

Examples

- name: Get the current version of VIOS.
  vios_update_upgrade:
    hmc_host: '{{ hmc_ip }}'
    hmc_auth:
      username: '{{ ansible_user }}'
      password: '{{ hmc_password }}'
    attributes:
      vios_name: <vios_name>
      system_name: <sys/MTMS>
    state: facts

- name: Update the VIOS from the HMC using the image available on remote SFTP server.
  vios_update_upgrade:
    hmc_host: '{{ hmc_ip }}'
    hmc_auth:
      username: '{{ ansible_user }}'
      password: '{{ hmc_password }}'
    attributes:
      repository: sftp
      vios_id: <vios_id>
      system_name: <sys/MTMS>
      password: <password>
      user_id: <username>
      host_name: <hostip>
      files:
        - <iso file1>
    state: updated

- name: Update the VIOS from the HMC using the image available on remote NFS server.
  vios_update_upgrade:
    hmc_host: '{{ hmc_ip }}'
    hmc_auth:
      username: '{{ ansible_user }}'
      password: '{{ hmc_password }}'
    attributes:
      repository: nfs
      vios_id: <vios_id>
      system_name: <sys/MTMS>
      password: <password>
      user_id: <username>
      host_name: <hostip>
      files:
        - <iso file>
        - <bff file>
    state: updated

- name: Upgrade the VIOS from the HMC using the image available on HMC hard disk.
  vios_update_upgrade:
    hmc_host: '{{ hmc_ip }}'
    hmc_auth:
      username: '{{ ansible_user }}'
      password: '{{ hmc_password }}'
    attributes:
      repository: disk
      vios_id: <vios_id>
      system_name: <sys/MTMS>
      password: <password>
      user_id: <username>
      host_name: <hostip>
      disks:
        - Disk1
        - Disk2
    state: upgraded

Return Values

Command_output (always, dict, )

Respective build information

Status

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

  • This module is maintained by community.

Authors

  • Sreenidhi S(@SreenidhiS1)