Copying a Physical Optical Disk

In order to be able to copy a physical CD or DVD, the Virtual I/O Server needs a physical CD or DVD drive. (Most newer systems no longer have optical drives.)

The “vios lsdev” command can be used to easily check whether a virtual I/O server has a CD or DVD drive:

$ vios lsdev -t optical ms12-vio1
NAME  STATUS     PHYSLOC                  PARENT  DESCRIPTION
cd0   Available  U78AA.001.VYRGU3O-P2-D9  sata0   SATA DVD-RAM Drive
$

The virtual I/O server used in the examples therefore has a SATA DVD-RAM drive.

First, the physical CD or DVD must be inserted into the physical drive. We inserted an AIX 7.2 installation DVD for the TL5 (the first of two DVDs).

Then the command “vios mkmedia” can be started to create a copy in the Virtual Media Repository. A name for the virtual medium to be created and the device name of the physical DVD drive (here cd0) with the inserted optical medium must be specified as arguments:

$ vios mkmedia ms12-vio1 AIX_720500_DVD_1.iso cd0
$

If no valid optical medium is inserted in the CD or DVD drive, you will receive the following error message:

$ vios mkmedia ms12-vio1 AIX_720500_DVD_1.iso cd0
hmc01: viosvrcmd -m ms12 -p ms12-vio1 -c \"mkvopt -name AIX_720500_DVD_1.iso -dev cd0\"
ERROR: remote HMC command returned an error (1)
StdErr: HSCL2970 The IOServer command has failed because of the following reason:
StdErr: Unable to create virtual optical disk.
StdErr:
StdErr: rc=4
$

A quick check with the “vios lsmedia” command shows that a virtual medium with the name AIX_720500_DVD_1.iso has been created:

$ vios lsmedia ms12-vio1
NAME                  FILE SIZE  OPTICAL  ACCESS
AIX_720500_DVD_1.iso    3.56 GB  None     rw
$

However, the virtual medium was created with read and write permissions. This means that the virtual medium can possibly be overwritten when it is used. The desired permission, “ro” or “rw” can be specified as an additional argument when creating a virtual medium.

We insert the second installation DVD into the physical drive and create a copy in the Virtual Media Repository. This time, when creating the virtual medium, we also specify the argument “ro” for read-only:

$ vios mkmedia ms12-vio1 AIX_720500_DVD_2.iso cd0 ro
$

The list of all virtual media shows that the virtual medium just created has only read permissions (“ro“):

$ vios lsmedia ms12-vio1
NAME                  FILE SIZE  OPTICAL  ACCESS
AIX_720500_DVD_1.iso    3.56 GB  None     rw
AIX_720500_DVD_2.iso    4.00 GB  None     ro
$

Permissions can be easily changed using “vios chmedia“.:

$ vios chmedia ms12-vio1 AIX_720500_DVD_1.iso ro
$

Now both generated virtual media only have read permissions:

$ vios lsmedia ms12-vio1
NAME                  FILE SIZE  OPTICAL  ACCESS
AIX_720500_DVD_1.iso    3.56 GB  None     ro
AIX_720500_DVD_2.iso    4.00 GB  None     ro
$