IBM Support

Moving Optical Device/DVD Between LPARs using PowerVM VIOS

Question & Answer


Question

How can I virtualize a physical optical device (i.e. DVD-RAM or DVD-ROM) on a Power System managed by an HMC using PowerVM Virtual I/O Server (VIOS)?

Cause

In some case, it is not possible to reallocate the physical optical device from a VIOS to a client partition (AIX, IBM i, or Linux).  This may be due to different  reasons.  
For example, if the optical device is configured on the same I/O adapter hosting the disk containing the VIOS boot disk, the VIOS partition would need to be shutdown temporarily in order for the adapter to be (temporarily) used by another partition.
Another reason could be that Dynamic Logical Partitioning (DLPAR) is not working on the VIOS.
DLPAR function is one of the features available with an HMC-managed system.  It allows you to Add/Move/Remove I/O devices such as the CDROM or DVD controller between partitions without taking an outage.  A DLPAR operation requires an active network and RMC connection between the partition and the HMC over port 657.  For assistance physically reallocating the optical device to another partition using the HMC, contact your local HMC Support.

In either case, if the physical optical device is configured on the VIOS, and it is in "Available" state, the physical optical device can be virtualized to a VIOS client using virtual SCSI.

Answer

NOTE: It is best practice to managed the virtual environment using the management console GUI - Changing an optical device for a VIOS logical partition by using the Hardware Management Console.

PREREQUISITES

  1. The physical optical device (i.e. cd0) must be configured on the VIOS partition according to the vendor's specification, and it must be in Available state.  See Optical devices requirements
  2. The physical optical device cannot be in use by another VIOS partition or virtualized to another client.
  3. A virtual SCSI Server/Client connection must exist.  For assistance on how to create a new virtual SCSI adapter, refer to Configuring a virtual SCSI adapter using the HMC.

 

PROCEDURE

The following procedure describes how to virtualize the optical device (cd0) to an AIX client (partition ID 2) using VIOS command line.   The example assumes the user is logged in to the VIOS as padmin user.

To determine if the VIOS has an optical device configured, use the lsdev command.
$ lsdev -type optical
name status description
cd0 Available IDE DVD-ROM Drive

To determine if the optical device, cd0, is currently virtualized/mapped to another client, use lsmap command.

$ lsmap -all -type optical     or

$ lsmap -all | grep cd0              or

$ lsmap -all |more
SVSA            Physloc                                      Client Partition ID
--------------- -------------------------------------------- ------------------
vhost0          U9111.520.104797E-V1-C11                     0x00000002
VTD             vtscsi0
LUN             0x8100000000000000
Backing device  rootvg2a
Physloc


SVSA            Physloc                                      Client Partition ID
--------------- -------------------------------------------- ------------------
vhost1          U9111.520.104797E-V1-C13                     0x00000003
VTD             vtscsi1
LUN             0x8100000000000000
Backing device  rootvg3a
Physloc

VTD             vtscsi2
LUN             0x8200000000000000
Backing device  datavg3a
Physloc


Looking through the "Backing device" section of each vhosts, we do not see cd0 listed (in use).

PROCEDURE

1. Create the virtual optical device on the desired virtual SCSI Server adapter using mkvdev command.  In this example, cd0 will be virtualized thru virtual SCSI Server adapter, vhost0, which is in use by client partition ID 2 (0x00000002 hex value in previous lsmap output).

$ mkvdev -vdev cd0 -vadapter vhost0
vtopt0 Available


2. To list the newly created virtual optical device (vtopt0) use lsmap command.
$ lsmap -all -type optical            or
$ lsmap -vadapter vhost0
SVSA            Physloc                                      Client Partition ID
--------------- -------------------------------------------- ------------------
vhost0          U9111.520.104797E-V1-C11                     0x00000002
VTD             vtopt0
LUN             0x8200000000000000
Backing device  cd0
Physloc         U787A.001.DPM06E2-P4-D2

VTD             vtscsi0
LUN             0x8100000000000000
Backing device  rootvg2a
Physloc


3. Discover the virtual optical device on the AIX client.  Login as root, and run:
# cfgmgr

By exporting cd0 to client partition ID 2's vhost, there is no need to make changes to the LPAR's profile or perform further actions such as DLPAR functions from the HMC. The cd0 device is now ready for the client partition ID 2 to use.  
Note: If the virtual optical device is being configured to boot from Base Install media to load the client OS or to boot an AIX client to maintenance mode, ensure the bootable media is loaded on the physical optical device on the managed system and ensure the virtual optical device is configured as the first boot device before activating the client partition to perform the installation or maintenance functions.

Once the virtual optical device is no longer needed by the client, it can then be removed and mapped to a different client, if desired. For example, suppose client partition ID 3 (configured to vhost1, in this example) needs to be booted into maintenance.  First, we will need to remove the virtual target device (VTD) name from vhost0 (to release cd0), and then export cd0 thru vhost1.

To remove the virtual optical device, vtopt0, from vhost0, run:
$ rmdev -dev vtopt0 -recursive
vtopt0 deleted

Note, ensure the associated virtual optical device is removed from the client OS prior to removing it from the VIOS.  For AIX, use rmdev command as root:
# rmdev -dl cd#       where cd# is the AIX virtual optical device

To list the optical devices configured in AIX, run:
# lsdev -Cc optical

To export the physical optical device (cd0) to the new client (parition id 3), run

$ mkvdev -vdev cd0 -vadapter vhost1
vtopt0 Available


$ lsmap -vadapter vhost1

SVSA            Physloc                                      Client Partition ID
--------------- -------------------------------------------- ------------------
vhost1          U9111.520.104797E-V1-C13                     0x00000003
VTD             vtopt0
LUN             0x8500000000000000
Backing device  cd0
Physloc         U787A.001.DPM06E2-P4-D2

VTD             vtscsi1
LUN             0x8100000000000000
Backing device  rootvg3a
Physloc

VTD             vtscsi2
LUN             0x8200000000000000
Backing device  datavg3a
Physloc


The process of virtual mapping of the optical device, cd0, between client LPARs of a VIO server is much simpler than trying to perform DLPAR related functions to achieve the same result since all the interaction takes place on the VIO server command line.

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSPHKW","label":"PowerVM Virtual I\/O Server"},"ARM Category":[{"code":"a8m50000000L0OjAAK","label":"PowerVM VIOS-\u003EVirtual SCSI (VSCSI)-\u003EVirtual Optical CD-ROM"}],"ARM Case Number":"TS013202370","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
31 July 2025

UID

isg3T1010466