Under Construction
hmc cpviosimg
Available: since 1.9.2.0
With the command “hmc cpviosimg” Virtual I/O Server installation images can be copied to an HMC:
hmc cpviosimg [-v] <hmc> <location>|<filename> <image_name>
The images are stored on the HMC in the directory /extra/viosimages. Using such an installation image, a virtual I/O server can be installed via the HMC, see “hmc installios” or “vios installios” for more information.
In order to be copied to an HMC, an installation image must be available either on a mounted USB device or as one (or more) ISO file(s) on a server via NFS or SFTP. If the installation image consists of more than one ISO file, all ISO files must be specified, starting with the first ISO file. The following locations can be specified:
usb:<device_path>
nfs://<host-or-IP>/<directory>/<file1.iso>[,<file2.iso>]
nfs3://<host-or-IP>/<directory>/<file1.iso>[,<file2.iso>]
nfs4://<host-or-IP>/<directory>/<file1.iso>[,<file2.iso>]
<host-or-IP>:/<directory>/<file1.iso>[,<file2.iso>]
sftp://<user>[:<password>]@<host-or-IP>/<directory>/<file1.iso>[,<file2.iso>]
<user>[:<password>]@<host-or-IP>:<directory>/<file1.iso>[,<file2.iso>]
Unlike with many older commands, FTP is not supported.
Example USB:
The ISO installation file for version 4.1.0.0 was copied to a USB stick and inserted into one of the USB ports of a physical HMC. To determine the name of the USB device, the command “hmc lsmediadev” can be used:
$ hmc lsmediadev hmc01
DEVICE TYPE MOUNT_POINT DESCRIPTION LABEL
/dev/sda 6 - disk drive -
/dev/sdb1 3 - USB device -
$
The output shows that /dev/sdb1 is the USB device.
The installation image on the USB device can then be copied to the HMC by specifying the location “usb:/dev/sdb1” and any image name:
$ hmc cpviosimg hmc01 usb:/dev/sdb1 VIOS_4.1.0.0
$
The file system on the USB device is mounted automatically.
The command “hmc lsviosimg” can then be used to check whether the image is actually available on the HMC:
$ hmc lsviosimg hmc01
NAME SIZE IMAGE_FILES
VIOS_4.1.0.0 3487.68 dvdimage.v1.iso
VIOS_3.1.4.20 5985.77 dvdimage.v2.iso,dvdimage.v1.iso
$
Example NFS:
If the installation image is located on an NFS server, e.g. in the /export/iso directory, then it can be copied to the HMC using the following command:
$ hmc cpviosimg hmc02 nfs://10.255.255.57//export/iso/Virtual_IO_Server_Base_Install_4.1.0.0_DVD_112023_LCD8293900.iso VIOS_4.1.0.0
$
There is only one ISO file for version 4.1.0.0, so only this one was specified (Virtual_IO_Server_Base_Install_4.1.0.0_DVD_112023_LCD8293900.iso). The installation image is given the name VIOS_4.1.0.0 on the HMC. A quick check with “hmc lsviosimg” shows the availability of the image just copied:
$ hmc lsviosimg hmc02
NAME SIZE IMAGE_FILES
VIOS_4.1.0.0 3487.68 dvdimage.v1.iso
$
By specifying “nfs://…” the NFS version selected by IBM as the default is used. In the case of cpviosimg this is currently version 3. If you want to specify a specific version, you can do this by specifying “nfs3://…” for NFS version 3 or “nfs4://…” for NFS version 4. Alternatively, the option “-o” can be used together with the value “vers=3” or “vers=4“.
Another possibility is to use the syntax “host:/path” known from the mount command, e.g.:
$ hmc cpviosimg hmc02 10.255.255.57:/export/iso/Virtual_IO_Server_Base_Install_4.1.0.0_DVD_112023_LCD8293900.iso VIOS_4.1.0.0
$
If there are 2 ISO files for a VIOS version, then both ISO files must be specified separated by a comma, e.g.:
$ hmc cpviosimg hmc02 10.255.255.57:/export/test/images/Virtual_IO_Server_Base_Install_3.1.4.30_DVD_1_of_2_112023_LCD8250111.iso, Virtual_IO_Server_Base_Install_3.1.4.30_DVD_2_of_2_112023_LCD8250211.iso VIOS_3.1.4.30
$
It is important to specify the ISO files in the correct order!
Example SFTP:
If SFTP is used, at least one user name must always be specified. Optionally, a password or passphrase can be specified directly on the command line as part of the source (location). If no password or passphrase is explicitly specified in the command, an interactive query is made if a password or passphrase is required.
Hint: We advise against using a password directly in the command line!