Pages

IBM VIOS 2.2 To 4.1 Migration

Upgrading IBM VIOS Using the Alt Disk Method (viosupgrade Command)

Upgrading a Virtual I/O Server (VIOS) can be tricky — especially when you want to minimize downtime and keep rollback options open. Fortunately, IBM provides a reliable method using the viosupgrade command, introduced in VIOS 2.2.6.30 and later, which lets you install the new version on an alternate disk while your current system keeps running.

This post walks through the alt_disk upgrade method step-by-step — the same process I’ve used in production environments for seamless VIOS upgrades.

What Is the Alt Disk Update Method?
The alt_disk update uses the viosupgrade command to install a new VIOS version on a separate disk, while keeping the existing rootvg intact.

How it works:
Preserves the existing system: Your current rootvg remains untouched.
Installs on a new disk: The new image is installed on a free disk (e.g. hdisk1).
Quick rollback: If anything goes wrong, just change the bootlist back to the old disk and reboot.

Pre-Upgrade Preparation:

1. Verify the Current Environment

# lspv
hdisk0          00c1d778e1720166    rootvg    active
hdisk1          00c1d77814bbcfb8     rootvg    active

Check for active iFixes and note them down.
# emgr -l

Backup Configurations

  • Always take a full backup before the migration.
2. Backup VIOS configuration
# su - padmin -c "ioscli viosbr -backup -file /usr/local/backup/`hostname`_viosbr_`date +%Y%m%d`"

Backup mappings and devices
# su - padmin -c "ioscli backupios -file /usr/local/backup/`hostname`.mksys_`date +%Y%m%d` -mksysb -nosvg"

Backup /etc directory
# mkdir /backup/etc_before_migrate
# tar cf - etc | (cd /backup/etc_before_migrate; tar xfvp -)

3. Remove iFixes
for i in $(/usr/sbin/emgr -l | grep ^[0-9] | awk '{print $3}')
do
echo "----- Removing ifix $i  -----"
/usr/sbin/emgr -r -L $i
done

4. Prepare Custom Files to Restore
Create /home/padmin/file_restore.txt with:
# /etc/hosts
# /etc/resolv.conf
# /home/padmin/config/ntp.conf
# /home/padmin/.ssh/authorized_keys

Disk Preparation and Mirroring Steps:

Check Boot Devices and Rootvg Mirroring

# lspv | grep root
# bootlist -m normal -o

Ensure hdisk0 is your boot device.

Unmirrored and Prepare hdisk1
We’ll use hdisk1 for migration.
# unmirrorvg rootvg hdisk1
# reducevg rootvg hdisk1
# bosboot -a -d /dev/hdisk0
# bootlist -m normal hdisk0
# chpv -c hdisk1

Now confirm that hdisk1 is free:
# lspv | grep hdisk1
hdisk1   00c2d76814bbcfb8   None

Getting the New VIOS Image

On the Jump Server, mount the VIOS ISO and extract the mksysb image.
# loopmount -i Virtual_IO_Server_Base_Install_4.1.1.0_Flash_122024_LCD8292402.iso -o "-V udfs -o ro" -m /tmp/dvd

# cp /tmp/dvd/mksysb_image /export/software/VIOS_Patches/4110_vios.mksysb

Then copy it to the VIOS server 
vioserver01:
# scp /export/software/VIOS_Patches/4110_vios.mksysb vioserver01:/home/padmin

Performing the Upgrade:

Switch to the padmin shell and run:

$ viosupgrade -l -u -X ROOTUSRFS -i 4110_vios.mksysb -a hdisk1 -g file_restore.txt

Command Breakdown:
-l --> Local upgrade (runs directly on VIOS)
-u
--> Manual reboot required after upgrade
-X --> ROOTUSRFS Exclude user file systems in rootvg
-i --> Specifies the mksysb image
-a --> Target alternate disk
-g --> File list to restore after upgrade

During the process, you’ll see:

WARNING!!! VIOS Upgrade operation is in progress. Kindly refrain from making any configuration changes...................................................................................................

Monitor progress:
$ viosupgrade -l -q

Post-Upgrade Steps:

Once the upgrade completes:

Change the boot device to the new disk:

# bootlist -m normal hdisk1
# bootlist -m normal -o

Reboot:
# reboot

After the system reboots, VIOS will restore saved configurations and reboot again automatically.

You can monitor the restore logs:
$ viosupgrade -l -q

Validation and Rollback:

After the final reboot, verify:

The new VIOS version (ioslevel)
ioslevel
  • Network, SEA, and virtual device mappings
  • HMC connectivity and profiles
If you face issues, simply boot from the old rootvg:
# bootlist -m normal hdisk0
# reboot

No comments:

Post a Comment