Virtual media repository is very useful PowerVM feature. Some older IBM i administrators probably remember similar function available in iSeries ages ago. In short way, it allows to share CD/DVD images on a frame/server layer.
I use it very often, because it allows load a SLIC without physical access to a server. Practically you can install an IBM i OS, on completely new POWER server, which doesn’t even have a physical CD/DVD drive.
In this post I’d like to show different methods how to manage the Virtual Media Repository.
This feature is fully managed by a Phyp. Therefore, I believe it is completely transparent for a client.
As far as I know, there are three ways how to manage it.
- From the VIOS command line
- VIOS by cfgassist
- From a HMC. (since ver 7.7.4 SP2)
At the very begging, remember that client-server SCSI relation must be created first. On a VIOS create a Virtual SCSI adapter type ‘Server’, while on a client – create a Virtual SCSI adapter type ‘Client’.
From VIOS by command
First thing is to create a repository. Let’s assume you want to have it in the rootvg file system 10Gb big.
mkrep -sp rootvg -size 10G
You created a ‘virtual space’ where you can load CDs,DVDs images. Images can be created from a physical media or from an iso image.
To create an image from a physical media put a disk to the drive and type:
mkvopt -name SLIC -dev cd0 -ro
To create an image from an iso image. Copy the image locally (for instance to /iso/slic.iso) and run
mkvopt -name SLIC -file /iso/slic.iso -ro
You have image created, now lets create a file backed optical device and link it to the virtual scsi device (you can find it by lsdev, it should be vhost#).
mkvdev -fbo -vadapter vhost#
I believe this created a fbo device. You can check by lsdev, it should be vtopt#. Now you can load the image to the fbo device.
loadopt -disk SLIC -vtd vtopt#
Now on a client system you are going to find the SLIC image loaded to an OPT0X device.
If you use it for installation of Operating System you need to change an image to the next media. To do so, remove the current image (SLIC in our scenario) by command unloadopt -vtd vtopt# and proceed from step create an image or load an image (if you already have images in the repository).
From VIOS using cfgassist
In a VIOS type cfgassist
Go to Storage Management -> Virtual Media Repository -> Create the Repository
In the Parent STORAGE POOL name define a file system where you want to create the repository. Lets assume in rootvg
In the SIZE of the Repository define size (ex 10G) and hit Enter.
You should get a confirmation that ‘Virtual Media Repository Created’
If the pool has been created you can list it. Storage Management -> Virtual Media Repository -> List Contents of the Repository
To create an image from a physical media put a disk to the physical drive and from cfgassist choose:
Storage Management -> Virtual Media Repository -> Virtual Optical Media Disks -> Add a Virtual Optical Disk -> Create Virtual Optical Disk from an existing Physical Optical Disk
Define name in a Virtual OPTICAL DISK name (ex SLIC) and define source device (ex cd0) and hit Enter
To create an image from an iso image. Copy the image locally (for instance to iso/slic.iso) and in cfgassist perform
torage Management -> Virtual Media Repository -> Virtual Optical Media Disks -> Add a Virtual Optical Disk -> Create Virtual Optical Disk from a File
Define name in a Virtual OPTICAL DISK name (ex SLIC) and location of a file in Source File Path (ex iso/slic.iso) and hit Enter.
I didn’t find options in cfgassist for load/unload virtual Optical disks. Therefore, use commands or HMC to perform these tasks.
From HMC GUI
HMC 7.7.4 SP2 is required to perform this option.
Select a physical server -> Configuration -> Virtual Resources -> Virtual Storage Management
Select VIOS which will be hosting a repository and click Optical Devices, and Click Library
Specify size of the virtual library.
Select Add media
Specify a iso file location and give a name to a file
Once the image is created, click modify partition assignment to load the image to virtual repository.
You will BE prompt for which partition you want to assign ( I suggest Any)
This will create Virtual Target Device – File-backed Optical device (vtopt0) on VIOS and load the image.
Now, you can start to use the image in the same way as the physical one.