My previous article discussed how you can upload and load ISO images into the Virtual Media Repository (VMR) to provide virtual optical images to the client LPARs.
You may recall that the mkvopt command has an option, -ro, which forces the access mode of the image to read only. When a VMR image is set to read only then it can be assigned and read by multiple LPARs concurrently.
If you omit the -ro parameter the virtual image access mode will be set to read and write. What this means is that only 1 LPAR can have the image assigned at any one time and that LPAR can write to the optical media as if it were a tape or rewritable DVD drive.
I guess the question is, why would you want to do this?
There’s no reason why you couldn’t use the VMR to backup your file systems and libraries on AIX and IBM i but there are some considerations.
Often the VMR is stored on internal hard drives assigned to the VIOS LPAR. Performance and capacity isn’t going to be great. Also, management of the media is cumbersome.
I’ll provide two examples where I’ve used the VMR for system media in the last couple of years.
A customer had installed a V7R1 LPAR with all the necessary LPPs, PTFs and applications. They wanted to create a number of additional LPARs using the same SLIC, Base OS and PTFs.
The traditional method used would be to run a SAVSYS to tape and then use that tape as the install media for the new LPARs. There is nothing wrong with this tried and trusted method but we decided to run the SAVSYS to virtual optical media so that we could:
1. Use the SAVSYS ISO image to map to multiple LPARs concurrently
2. Copy the ISO image to a VIOS LPAR at a remote site to build LPARs on a separate Power system
To enable the above we carried out the following commands on the VIOS:
This creates a new virtual optical disk call V7R1SAVSYS in the VMR in read/write mode with a size of 15GB. The size can be anything but we felt that 15G should be sufficient for our SAVSYS.
This maps the empty virtual optical disk to the virtual optical device associated with MYLPAR1.
On MYLPAR1 we run the SAVSYS command specifying OPT01 as the device instead of a tape drive.
Once the SAVSYS is complete we unload the virtual optical disk from MYLPAR1, change it to read only access and then assign it to the new LPARs ready for a D type IPL.
Read and write performance will be dependent on the physical media you are using to store your VMR. If your VMR is stored on external storage then you should see better performance than using 1 or 2 internal disks for VMR.
I haven’t tested it, but I can’t see any reason why a mksysb to virtual optical disk wouldn’t work just as well as the IBM i SAVSYS.
I had a requirement a few years ago to migrate an AIX 5.2 mksysb to a WPAR running under AIX 7.1.
The 5.2 mksysb was stored on tape and the IBM documentation suggested that we could use the tape to install the mksysb in to our WPAR. We were unable to make this work so used the VMR as a workaround.
The process was a little complicated but worked like this on VIOS.
1. Create a new directory to hold the mksysb data
2. Use the dd command to copy the mksysb from tape into the new directory
3. Use the mkcd command to create an ISO from the mksysb directory. The ISO is copied straight in to folder /var/vio/VMLibrary which is the location of the VMR
4. Remove the new folder and data containing the mksysb data
5. Map the new virtual optical disk to the AIX 7.1 LPAR and use it to populate the WPAR
A little fiddly but it worked. Again, we only had to do this on one VIOS and then transfer the ISO image to a remote VIOS for loading up a DR WPAR at the remote site.
I’ve provided links below to the commands we used to convert from tape to file to ISO.
IBM Knowledge Centre – mkvopt http://tinyurl.com/hxd896g
Extract a mksysb from tape http://www-01.ibm.com/support/docview.wss?uid=isg3T1011679
Convert mksysb files to ISO http://gibsonnet.net/aix/bootable_iso_vios.htm
To read Glenn’s previous article on this subject go to https://powerwire.eu/tech-tip-populating-the-vios-virtual-media-repository