With HMC 7.3.4 SP2 or later these steps can be done from the HMC.
From HMC
From HMC
1. Select the server, then under Tasks -> Configuration->Virtual Resources->Virtual Storage Management :
2. Select the Optical Devices tab:
3. Assign the virtual media to the desired partition by selecting the media, going to the drop down for Select Action and selecting Modify Partition Assignment:
4. Select the partition you want to assign the media to:
5. The slot number is the SCSI adapter. Sometime you can have more than one slot number for each partition. If you are trying to keep disk and optical on separate adapters, you should pay close attention to the slot number.
Using VIOS command line for HMCs prior to 7.3.4 SP2
Using VIOS command line for HMCs prior to 7.3.4 SP2
1. VIOS (Virtual I/O Server) has a concept of a Virtual Media library where you store all your Virtual media. The first step is to check if the Virtual media Library already exists using the lsrep command:
2. If the Virtual media Library does not exist, you need to create it using the mkrep command. In our example, we are creating it as a 20 Gigabyte Virtual Media library in the rootvg storage pool:
3. FTP the .iso image to VIOS. When you log into VIOS, the default directory is /home/padmin.
4. Use the following command to import the .iso image into the Virtual Media Library:
5. The command lsmap -all will show all mapped virtual adapters. For example:
6. Adapter 13 is the one I created for the virtual optical by using DLPAR, Virtual Adapter. You should select the option to create a SCSI adapter.
7. Next, create the virtual optical using the mkvdev -fbo -vadapter vhost2 command. This will create a File Backed Optical device:
8. Now we need to assign the image to the optical device using the loadopt command:
lsmap -all now shows the virtual optical mapped to the client adapter vhost2:
9. To access this virtual optical from a client partition, I need to create a client SCSI adapter in the client partition using either DLPAR or by updating the partition profile and activating from that profile.
10. To switch or unload the CD, use the command unloadopt -vtd vtopt0 .