Keep software and OS backups handy with VIOS virtual media library
The virtual I/O (VIO) server virtual-media library (VM library) is an easy way of loading DVD images for access by the VIO client LPARs. It’s far simpler to learn and manage than NIM and makes installing software onto LPARs a breeze. It’s also a very quick and handy way of storing and using mksysb images for your AIX LPARs.
As most Power Systems have at least one VIO Server (VIOS), the decision to use the VM library is a no brainer. When you need to build an LPAR or install AIX software quickly, making an ISO image available to the VIO client takes seconds. If you set the image to read-only, you can present it to several LPARs simultaneously. You can use the Hardware Management Console (HMC) or Integrated Virtualization Manager (IVM) GUI to assign the images to the client LPAR. If you prefer the VIOS shell prompt, there are very few commands to learn, and they’re easy to remember.
Library on Tap
The VM Library was introduced with VIOS 1.5, back in 2007. You can check your VIOS level by logging in as padmin and running ioslevel. You can load ISO images on the VIOS command line, or via the GUI. If you’re using IVM, select Virtual Storage Management. On the Hardware Management Console, the GUI Virtual Media functionality was introduced with VIOS 188.8.131.52 Fix Pack 21, HMC version 7.3.4 SP 2 (on the HMC Welcome page, click on HMC Version). From the HMC GUI, select Server > Configuration > Virtual Resources > Virtual Storage Management.
With each of the GUIs, you can query the VIOS that holds the VM library to see what ISO images are available. This may take a minute or two. I find the VIOS command line much faster and easier.
If you have a VM Library you can view its contents by logging into the VIOS as padmin and using the lsrep command. To create a VM Library, select “Create Library” from the GUI, or from the VIOS command line run mkrep. You’ll be asked for the storage pool (think of AIX volume groups) and the size you want for storing your ISO files (e.g. mkrep -sp client_data -size 50 G). If you need to increase the size later, you can do it through the GUI or on the command line using chrep.
Ready to Roll
I like to have my AIX installation images permanently loaded into the VM library, ready for whenever I might need them. I can keep a complete library of all the software I need for the LPARs. If I need to load a fileset onto an LPAR or boot off the AIX product media, I know where to find what I need quickly, and do it all from the comfort of my desk. If I want to boot a partition into maintenance mode or migrate to a new version of AIX, I only have to load the ISO image onto the virtual optical device and boot off the virtual SCSI adapter it’s connected to. If I’m working on a site that has a mixture of AIX 7.1, 6.1 and 5.3 systems, I’ll have all of those releases permanently in the VM Library, ready to be called up at a moment’s notice. Having the images on disk makes them easy to access and faster to load than using physical media. With physical access to data centers getting more and more difficult, doing upgrades and installs remotely is sometimes the only practical option.
Free and Easy
Getting a hold of the AIX images is very straight forward. You don’t have to use physical media at all. If you have an IBM Software Maintenance Agreement (SWMA) and a decent Internet link, you can download your AIX installation images directly from IBM’s Entitled Software Support. You’ll need an IBM ID. You can also download the AIX Expansion Pack, the Linux toolbox, and the VIOS installation images.
If you’re running an environment where you want to test a new release of AIX, there’s no need to upgrade your NIM server to the latest level before continuing with the install of the test LPAR. Just copy the AIX images you want onto the VIO server and use mkvopt to load them into the VM library. This gives you the chance to set the permissions to read only and shorten or change the name of the file if you want. File names and permissions can also be changed later using the chvopt command.
From the GUI you can assign the ISO file to VIO clients by selecting the LPARs you would like to be able to see the file. If you prefer the command line, I find it helpful to create a virtual optical device for each LPAR, using mkvdev -vadapter vhostN -fbo (for file-backed virtual optic device). I like to give them names I can remember easily, such as hostname_cd0. You can do this with the -dev flag.
mkvdev -vadapter vhost0 -fbo -dev jupiter_cd0
From there, loading the ISO image onto the new virtual optical device is easy:
loadopt -vtd jupiter_cd0 -disk AIX_7100-00-01_1_of_2
If you’re building a new LPAR, boot into System Management Services (SMS) mode and use the virtual SCSI adapter, which will contain the virtual optical device for booting. On an existing AIX LPAR, create a CD-ROM file system if you don’t have one (smitty cdrfs); then mount it read only. You should then be able to see the files on the ISO image. To swap to another ISO image, unload the media on the VIOS using unloadopt or via the GUI.
In some instances, you may be working remotely and have to build a new LPAR or install some filesets that aren’t available on a NIM server. As you are not on site, you have no way of loading the physical AIX media to add the software to the NIM repository or for the LPAR to use as a dedicated device. You may have another constraint anyway: if the new LPAR will be using the latest level of AIX, the NIM server might need to be upgraded first. Having it all available on the VM Library means you’re ready to roll; no upgrades are necessary.