Creating Virtual Optical Devices

In order to use virtual optical media from the Virtual Media Repository, LPARs require a virtual optical device. A virtual optical device is a virtual SCSI device, so an LPAR requires a virtual SCSI client adapter. The associated virtual SCSI server adapter must be created on the virtual I/O server whose Virtual Media Repository is to be used. The creation of virtual SCSI adapters is described in Virtual SCSI. In the following, we assume that the required virtual SCSI adapters exist.

The command to create a virtual optical device is “vios mkvopt“. In addition to the virtual I/O server, the vhost adapter of the LPAR for which a device is to be created must be specified as an argument:

$ vios lsvscsi ms12-vio1
vhost0  C25   aix01(3)  0
vhost1  C28   aix03(4)  0
vhost2  C30   aix04(5)  0
vhost3  C31   aix05(6)  0

Das Kommando zum Erzeugen eines virtuellen optischen Laufwerks ist „vios mkvopt“. Als Argument muss neben dem Virtual-I/O-Server der vhost-Adapter der LPAR angegeben werden, für die ein Laufwerk angelegt werden soll:

$ vios mkvopt ms12-vio1 vhost0

Note: The LPAR tool uses “mkvopt” to create a virtual optical device, while the padmin command “mkvopt” creates a virtual optical medium!

The adapter vhost0 belongs to the LPAR aix01. An overview of the existing virtual optical drives can be obtained with “vios lsvopt“:

$ vios lsvopt ms12-vio1
vtopt0  No Media  n/a

By default, the prefix “vtopt” followed by a unique instance number is used as the device name.

In order that an LPAR can use the new optical device, it must be configured into the running operating system. In the case of AIX, this is done using cfgmgr:

aix01 # cfgmgr -l vio0
aix01 # lsdev -l cd0
cd0 Available  Virtual SCSI Optical Served by VIO Server
aix01 #

Note: You can also start cfgmgr without an option. Specifying “-l vio0” restricts the scan for new devices to virtual devices.

The virtual optical device appears in AIX as device cd0 (Virtual SCSI Optical Served by VIO Server).

We create another virtual optical device, this time for the LPAR aix03 (vhost1):

$ vios mkvopt ms12-vio1 vhost1

The second virtual optical device is named vtopt1:

$ vios lsvopt ms12-vio1
vtopt0  No Media  n/a
vtopt1  No Media  n/a

Unfortunately, these generic device names do not indicate which LPAR the virtual optical devices belong to. If you use the “vios lsvscsi” command and specify the vhost adapter, you can see which virtual optical device belongs to the specified vhost adapter (and thus to a specific LPAR):

$ vios lsvscsi ms12-vio1 vhost1
vtopt0  Available  -        -          N/A       0x8100000000000000

But that is a bit cumbersome.

When creating a virtual optical device, the desired name for the device can also be specified. This option should be used to assign names, which allow easy identification of the corresponding LPAR. As an example, we create a virtual optical device for the LPAR aix04 (vhost2) and use “aix04_cd” as the device name:

$ vios mkvopt ms12-vio1 vhost2 aix04_cd

The output of “vios lsvopt” now immediately shows that the new virtual optical device belongs to the LPAR aix04:

$ vios lsvopt ms12-vio1
VTD       MEDIA     SIZE
aix04_cd  No Media  n/a
vtopt0    No Media  n/a
vtopt1    No Media  n/a