vios – Creation and management of Virtual I/O Server partition
Synopsis
Creates VIOS partition
Installs VIOS
Displays VIOS information
Accepts VIOS License
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 (optional, str, None)
The name or mtms (machine type model serial) of the managed system.
- name (optional, str, None)
The name of the VirtualIOServer for installation through nim server or image available on HMC local disk.
- settings (optional, dict, None)
To configure various supported attributes of VIOS partition.
Supports all the attributes available for creation of VIOS on the mksyscfg command except ‘lpar_env’.
valid only for
state
= present- nim_IP (optional, str, None)
This parameter determines whether to use Network Installation Manager (NIM) rather than relying on the HMC based image for VIOS installation.
IP Address of the NIM Server.
valid only for
action
= install- location_code (optional, str, None)
Network adapter location code to be used while installing VIOS through nim server.
If user doesn’t provide, it automatically picks the first pingable adapter attached to the partition.
valid only for
action
= install- nim_vlan_id (optional, str, None)
Specifies the VLANID(0 to 4094) to use for tagging Ethernet frames during network install for virtual network communication.
Default value is 0
valid only for
action
= install- nim_vlan_priority (optional, str, None)
Specifies the VLAN priority (0 to 7) to use for tagging Ethernet frames during network install for virtual network communication.
Default value is 0
valid only for
action
= install- nim_gateway (optional, str, None)
VIOS gateway IP Address.
valid only for
action
= installsupports installation through nim server.
This parameter is deprecated now and will be removed from future versions and as a replacement
vios_gateway
can be used now onwards.- nim_subnetmask (optional, str, None)
Subnetmask IP Address to be configured to VIOS.
valid only for
action
= installsupports installation through nim server.
This parameter is deprecated now and will be removed from future versions and as a replacement
vios_subnetmask
can be used now onwards.- vios_gateway (optional, str, None)
VIOS gateway IP Address.
valid only for
action
= installsupports installation through nim server and image available on the HMC local disk.
- vios_subnetmask (optional, str, None)
Subnetmask IP Address to be configured to VIOS.
valid only for
action
= installsupports installation through nim server and image available on the HMC local disk.
- vios_IP (optional, str, None)
IP Address to be configured to VIOS.
valid only for
action
= install- prof_name (optional, str, None)
Profile Name to be used for VIOS install.
Default profile name ‘default_profile’.
valid only for
action
= install- timeout (optional, int, None)
Max waiting time in mins for VIOS to bootup fully.
Min timeout should be more than 10 mins.
Default value is 60 min.
valid only for
action
= install- image_dir (optional, str, None)
This parameter determines whether to use the HMC based image for VIOS installation, rather than relying on the Network Installation Manager (NIM).
Name of the directory on which VIOS image is available on HMC.
This represent the same parameter
directory_name
that is used during the copy action.valid only for
action
= install- label (False, str, None)
Specifies a label name for installed vios to use instead of creating a default label name.
supports only installation through image available on the HMC local disk.
valid only for
action
= install- network_macaddr (optional, str, None)
Specifies the client MAC address through which the network installation of the Virtual I/O Server will take place.
If user doesn’t provide, it automatically picks the first pingable adapter attached to the partition.
valid only for
action
= install- vios_iso (optional, str, None)
The vios iso file to be installed.
supports only installation through image available on the HMC local disk.
valid only for
action
= install- virtual_optical_media (optional, bool, None)
Provides the virtual optical media details.
Default value is False.
Valid only for
state
= facts- free_pvs (optional, bool, None)
Provides the Unassigned Physical Volume details.
Default value is False.
Valid only for
state
= facts- directory_name (optional, str, None)
The name to give the VIOS installation image on the HMC.
- files (optional, list, None)
Specify one or two comma-separated VIOS ISO files.
Required for remote imports [‘sftp’, ‘nfs’]; not valid for USB.
- directory_list (optional, list, None)
The name of one or more VIOS installation images to remove
- media (optional, str, None)
Media type for the VIOS installation (e.g., nfs, sftp).
- remote_server (optional, str, None)
The host name or IP address of the remote server [‘sftp’, ‘nfs’].
- ssh_key_file (optional, str, None)
Specify the SSH private key file name.
If not fully qualified, it must be in the user’s home directory on the HMC.
This option is only valid for sftp and is mutually exclusive with password.
- mount_location (optional, str, None)
Required for VIOS image imports from NFS; specify the NFS server mount location.
- remote_directory (optional, str, None)
Specify the directory on the remote server for the VIOS installation image.
If not provided for SFTP, the user’s home directory is used; for NFS, the mount location is used.
- options (optional, str, None)
Specify options for the NFS mount command in double quotes.
Default is version 3; use vers=4 for version 4. Valid only for VIOS image imports from NFS.
- sftp_auth (optional, dict, None)
Username and Password credential of the SFTP Server.
- sftp_username (optional, str, None)
Username of the SFTP server to login.
- sftp_password (optional, str, None)
Password of the SFTP sever.
- state (optional, str, None)
facts
fetch details of specified VIOS.
present
creates VIOS with specified settings.- action (optional, str, None)
install
install VIOS through NIM Server or disk.
accept_license
Accept license after fresh installation of VIOS.
Notes
Note
Only state=present, action=install and action=accept_license operations support passwordless authentication.
install action parameters
nim_gateway
andnim_subnetmask
are deprecated now and will be removed from future versions and as a replacementvios_gateway
andvios_subnetmask
can be used from now onwards.
Examples
- name: Create VIOS with default configuration.
vios:
hmc_host: "{{ inventory_hostname }}"
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
system_name: <managed_system_name/mtms>
name: <vios_partition_name>
state: present
- name: Create VIOS with user defined settings.
vios:
hmc_host: '{{ inventory_hostname }}'
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
system_name: <managed_system_name/mtms>
name: <vios_partition_name>
settings:
profile_name: <profileName>
io_slots: <ioslot1>,<ioslot2>
state: present
- name: Install VIOS using NIM Server.
vios:
hmc_host: '{{ inventory_hostname }}'
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
system_name: <managed_system_name/mtms>
name: <vios name>
nim_IP: <NIM Server IP>
nim_gateway: <vios gateway ip>
vios_IP: <vios ip>
nim_subnetmask: <subnetmask>
action: install
- name: Install VIOS using the image available on the HMC local disk
vios:
hmc_host: '{{ inventory_hostname }}'
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
system_name: <managed_system_name/mtms>
image_dir: <image directory name>
vios_iso: <vios iso>
vios_IP: <vios ip>
vios_gateway: <vios gateway ip>
vios_subnetmask: <subnetmask>
network_macaddr: <mac address>
name: <vios name>
prof_name: <profile name>
timeout: <timeout>
label: <label>
action: install
- name: Accept License after VIOS Installation.
vios:
hmc_host: "{{ inventory_hostname }}"
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
system_name: <managed_system_name/mtms>
name: <vios_partition_name>
action: accept_license
- name: Show VIOS details with Free PVs and Virtual Optical Media.
vios:
hmc_host: "{{ inventory_hostname }}"
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
system_name: <managed_system_name/mtms>
name: <vios_partition_name>
free_pvs: true
virtual_optical_media: true
state: facts
- name: List all VIOS Images
vios:
hmc_host: '{{ inventory_hostname }}'
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
state: listimages
register: images_info
- name: Stdout the VIOS Images Info
debug:
msg: '{{ images_info }}'
- name: Copy Vios Image via SFTP Server
vios:
hmc_host: '{{ inventory_hostname }}'
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
media: sftp
directory_name: dir_name
remote_server: remote_server_IP
sftp_auth:
sftp_username: username
sftp_password: password
remote_directory: <directory_path>
files:
- file1
- file2
action: copy
register: testout
- name: Copy Vios Image via NFS
vios:
hmc_host: '{{ inventory_hostname }}'
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
media: nfs
directory_name: dir_name
remote_server: remote_server_IP
remote_directory: <directory_path>
mount_location: <mount_location>
files:
- file1
- file2
options: <NFS_version>
action: copy
register: testout
- name: Delete Vios Image
vios:
hmc_host: '{{ inventory_hostname }}'
hmc_auth:
username: '{{ ansible_user }}'
password: '{{ hmc_password }}'
directory_list:
- dir_name1
- dir_name2
action: delete
Return Values
- vios_info (on success for action install, dict, )
Respective VIOS information
Status
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by community.