A Smart Admin’s NIM

Edit: This is still a useful technique to know about.

Originally posted December 9, 2008 on AIXchange

In last week’s AIXchange entry, I wrote about Janel Barfield’s presentation on file-backed virtual disks. The end of the slides from her presentation included a statement about using mkcd and creating a bootable ISO image from mksysb images. This allows you to use a virtual optical device as a “smart man’s” NIM. I’ve been using base OS install media with virtual optical devices, so using mksysb files with virtual optical devices looked like another great idea. This would allow me to bypass setting up a NIM server and worrying about network speeds and settings. I’d just install my operating systems directly over the hypervisor.

I took a spare mksysb image and ran the mkcd command. By doing so, I immediately discovered that  the operating system of the machine upon which you’re running the mkcd command had better not be down-level compared to the OS of the machine from which you take it. Once I reran the command on a machine with the same OS level, it was fine.

From the man page: “The mkcd command creates a system backup image (mksysb) to CD-Recordable (CD-R) or DVD-Recordable (DVD-R, DVD-RAM) from the system rootvg or from a previously created mksysb.”

Here’s the command I used. (If you have a better suggestion on how to run it, please post it in comments.)

mkcd -L -S -I /testfs -m /home/guest/mksysbfile

Learn more about the flags from the man page for mkcd:

  • -L creates final CD images that are DVD sized (up to 4.38 GB).
  • -S stops mkcd before writing to the CD-R, DVD-R or DVD-RAM without removing the final CD images.
  • -I cd_image_dir specifies the directory or file system where the final CD images are stored before writing to the CD-R, DVD-R or DVD-RAM device.
  • -m mksysb_image specifies a previously created mksysb image.


In this case I wanted to use an existing mksysb image, but you could also use mkcd from cron to create your mksysb image from scratch.

When the command finished processing, my ISO image resided in /testfs and I moved the resultant image to my VIO server’s /var/vio/VMLibrary directory.

I was then able to use this image to boot my LPAR. The installation was fast, and I quickly had a clone of my source machine without having to set up any resources on my NIM server or set any network settings on my client machine.

Although restoring mksysb images from NIM is a great way to ensure you have bootable backups in a DR situation, using ISO images and virtual optical disks is yet another method that you can use to bare metal restore your AIX machines.