One of the most useful features of VIOS is the Virtual Media Repository (VMR). This allows us to create and import ISO images and then map these to virtual DVD drives on our client LPARs. Most customers will use the VMR to store their IBM i and/or AIX install media and PTFs.
Many AIX sites use NIM servers to distribute OS code and service packs, so this article will focus more towards IBM i users.
How do we get the media into the VMR? There are two options available to us:
1. Insert the physical media into the Power System’s DVD drive and import into the VMR.
2. Upload the ISO images you downloaded from Fix Central or ESS to VIOS and import these into the VMR.
I can’t remember that last time I handled a full set of operating system or fix pack physical media so we’ll concentrate on option two.
Let’s assume you downloaded the latest Cumulative PTF pack for IBM i from Fix Central. More than likely it will download around six to eight ISO images to your PC. The total storage space required for the CUMPAK is, let’s say, 17GB.
The process is simple but there are some caveats. Here are the main steps:
● FTP or SCP (secure copy) the ISO images to the /home/padmin folder on the VIOS managing the VMR.
● Import the images into the VMR.
● Delete the original ISO images you FTP/SCP’d up to the VIOS.
This seems simple enough but read on.
The VMR files are actually stored in folder /var/vio/VMLibrary on VIOS but when you are logged in as user padmin, or a user with the padmin role, you cannot write directly to this folder. The same is true if you FTP or SCP to the VIOS.
To access /var/vio/VMLibrary directly you need to be running as root. Using the CLI, you can do this by entering oem_setup_env, or aix if you use my customisations. Ideally, you would use FTP or SCP to transfer your ISO files and log in as root, but logging in as root is disabled on VIOS for CLI, FTP and SCP access.
By default, the /home file system on VIOS is only 10GB in size. If you try and FTP 17GB of ISO images you will run out of space. As long as you have sufficient disk space on the VIOS you can increase the /home file system allocation by running:
This will increase the file system space by 15GB.
If you don’t want to increase your file system size, you could:
● Transfer file A to VIOS.
● Import file A into the VMR.
● Whilst file A is being imported to the VMR start transferring fileB to the VIOS.
● When file A has finished importing into the VMR you can then delete file A using:
This process is a little cumbersome and time consuming but it works for me.
The really important thing here is to use the “rm” command after each ISO has been imported. This prevents you running out of file system space and also makes sure that your VIOS backups stay as compact as possible. If you don’t delete the uploaded files, they will be saved when you run your backupios command and it could become very large and very slow.
When your file or files are uploaded you can use either the HMC GUI to import into the VMR or the CLI using the my opt command.
This command will read your uploaded ISO file and write it to the VMR and call it IBMi_V7R1_C4283710_01. It will also make the virtual media read-only. By making the media read-only, multiple LPARs can access the same media concurrently. Yes, you could apply a CUMPAK to several LPARs at exactly the same time.
In most customer environments there’s a production and a DR system in different locations. You need the ISO images on both systems to ensure that all LPARs have access to a VMR. When I have copied the relevant ISOs to VIOS on one system, I use SCP on that VIOS to send the images to the second system.
If I had the following VMR images in VIOS on the production system:
I could use the following command from root mode in VIOS to send the images to /home/padmin in VIOS on the DR system:
-C compresses the data as it is transferred.
~ means the user’s home folder, i.e. /home/padmin.
You’ll still need to make sure that the /home file system has sufficient space available to hold these files. You also need to run the mkvopt command on the DR VIOS to import the images into the VMR on the DR VIOS instance.
In my next article, I will describe how you can use the VMR as a repository for SAVSYS and/or mksysb backups.
Glenn Robinson has been PowerWire‘s resident tech tipster for over a decade. He has worked in the IBM computing arena since 1986 on System/34/36/38 and AS/400 through to Power Systems today.
As systems architect for IBM systems and storage at RSI Consulting, based in Northampton, UK, he works predominantly with IBM i clients as well as those using AIX and Linux. In the last five years, he has also had a great deal if experience working with Power customers using SVC and V7000 storage virtualisation.