Edit: It is much easier now, but this was the beginning of my journey into loading virtual media with VIOS.
Originally posted December 3, 2007 on AIXchange
I had a problem, and it was driving me crazy. I had a test box located hundreds of miles away. I had no time to drive on-site to physically load media to get an operating system installed on this test machine, but I did have a desire to get the openbeta of AIX 6 loaded on it.
I had the AIX 6 openbeta .iso image downloaded to the machine, (I had downloaded the beta before AIX 6 went GA on Nov. 9) and I wanted to load it on this test box. First I thought, this will be easy, I’ll use my NIM server. I’ll load the mksysb file from the openbeta .iso image into my NIM server, and load the OS onto the new machine using NIM. However, since my NIM server is currently running AIX 5.3, it won’t work to use it to serve out this newer version of AIX. You can only use NIM to serve out AIX at the same level as the NIM server or older versions. It can’t serve out newer versions of AIX. How would I get this machine loaded without using physical media and driving to the datacenter?
The update to VIOS, version 1.5.1, contains my answer. (Download or order the CDs here.)
I used IVM for my example below. (I haven’t seen the same functionality on machines using a hardware-management console (HMC) at this time, and I haven’t had a chance to try this using the command line.) After I got VIOS 1.5.1 running, I clicked on View/Modify Virtual Storage as you can see about halfway down this screen shot.
From here I went to optical devices:
And clicked on create library.
I chose 5 GB for this media library’s size. This just adds a logical volume to rootvg of your VIO server under the covers, in my case I ended up with:
/dev/VMLibrary_LV 10485760 10442544 1% 4 1% /var/vio/VMLibrary
Looking at the View / Modify Virtual Storage page once again, it shows that you have a media library now and you can perform different operations on that library.
Once you’ve created your media library, you can use the Add Media button, which gives you many options from which to choose.
In my case, I just copied my .iso image from my /home/padmin directory to my /var/vio/VMLibrary directory from the command line after logging in as padmin and running oem_setup_env.
After copying the file, I added my media to a virtual optical device, which I then assigned to a partition. The screen shot below shows how the partition’s properties looked once I had selected and created the virtual optical device I was going to use.
Now all that was left was to boot my partition and in SMS use this virtual CD device as my boot device.
It booted from this .iso image as if the DVD were mounted locally in the machine.
From the Virtual I/O Server Version 1.5 Release Notes Virtual I/O Server Version 1.5 Release Notes:
“The Virtual optical support is extended to support the loading and unloading of optical media files to a virtual optical device in the partition. Read-only support is provided to enable multiple partitions to access the same ISO image simultaneously. Read-write support is provided to allow partitions to treat the device as a DVD-RAM drive. In addition to the optical support, files can now be used for virtual disk in addition to physical and logical volumes.”
Using this technique I loaded a machine as if it were using the local cdrom device. After testing that this would work with a DVD .iso image, I added the three CD .iso images to my media library.
Then I assigned CD 1 to my partition. I booted from it, and when it asked me to change the CD and hit “Enter,” I went in and changed the CD by going into the Partition Properties>Optical Devices and clicking the Modify button. Once you do this, you can select the next CD. When you go back to the console and hit “Enter,” it will read the next CD and continue with the install.
As I test this feature, I’m sure I’ll find more interesting things I can do with it, but for now this was exactly the solution I needed.