IBM Support

viosupgrade : Virtual Media Library lost after viosupgrade



Virtual Media Library(Created on rootvg):-
Post Upgrade of your Virtual IO Server from 2.2.6.x to 3.1.x.x using the "viosupgrade" tool, you will not find your Virtual Media Library.
Virtual Media Library(Created on non-rootvg):-
Post Upgrade of your Virtual IO Server from 2.2.6.x to 3.1.x.x using the "viosupgrade" tool, your "Virtual Media Library" will be operational.


viosupgrade from 2.2.6.x to 3.1.x.x is actually not traditional update like "updateios"  but more a migration ,where we are upgrading vios 2.2.6.x(Built on AIX 6.1)  to vios 3.1.x.x(Built on AIX 7.2).

So its actually a fresh install of vios 3.1.x.x where "viosupgrade" automates following steps. .
1. VIOS Metadata Backup - viosbr -backup
2. New VIOS Image Installation - Install
3. VIOS Metadata Restore - viosbr -restore

So if your "Virtual Media Library" was created on "rootvg" would be lost


VIOS 3.1 with Virtual Media Library

Resolving The Problem

Note :- This is just unofficial workaround  which works  and not officially supported method by IBM. In case it does not not work you will need to create a new Virtual Media Library on vios 3.1.x.x
Workaround1  :- To move the VMLibrary from rootvg to Non-rootvg (with extra free disk)
Requirement : One spare free disk to create a new VG
1 . Lets consider a we create a "Virtual Media Library" on rootvg as below .
      $ mkrep -sp rootvg -size 10G
2. Then we  "Create a virtual optical media disk in the Virtual Media Repository" as below .
     $ mkvopt -name base_72_DVD1 -file /tmp/AIX_v7.2_Install_7200-04-02-2015_DVD_1_of_2_052020_LCD8223012.iso -ro
     $ mkvopt -name base_72_DVD2 -file /tmp/AIX_v7.2_Install_7200-04-02-2015_DVD_2_of_2_052020_LCD8223112.iso -ro
3. Post creation the VM Library will be shown as below created on "rootvg" and showing the imaged in it.
image 5235
4. Checking we find the VM Library exists on rootvg as LV named "VMLibrary".
image 5236
5. Checking we find the VM Library to be Mounted on Path "/var/vio/VMLibrary".
image 5237
6. Checking the ISO's are just stored as files under "/var/vio/VMLibrary".
image 5239
7. Now to move the VM Library from "rootvg" to "non-rootvg" , I will have to create a new Volume group as listed below.
Creating a new Vol Grp named "VMLibrary_vg" on spare disk "hdisk3" (In case disk has some data you may need to use"-f") 
$ mkvg -vg VMLibrary_vg hdisk3  
Listing the new volume group .
image 5238
8. Next is to move or backup the ISO file in the VM Library to a diff location  .
Note :- Make sure the place you are going to copy has sufficient free space to accommodate these files .  (In my case I am just moving it to /tmp/VMLibrary) . You can use your NFS Mount or any other place to backup also .
image 5240
9.  Post Moving the Images this how the VMLirary will look , showing no ISO's under it.
image 5241
Note :- Make sure the VM Library is empty before you execute the next step
10 . Deletion of Old VM Library . Use "rmrep -f" if below command does not work .
image 5242
Post Deletion the Verify if VM Library exist .
image 5243
11. Create a new VM Library on newly created VG "VMLibrary_vg ".
$ mkrep -sp VMLibrary_vg -size 10G
image 5244
12. Verify the location of newly created VM Library.
image 5245
13. Move back the ISO's backed up to newly created VM Library to the path "/var/vio/VMLibrary".
image 5246
14.  Listing the new VM Library on VG "VMLibrary_vg".
image 5247
So now that the VM Library is moved to a non-rootvg(VMLibrary_vg) this will be restored post upgrade .
Workaround2  :-  To Backup the VMLibrary from rootvg and restore back post upgrade (With No FreeDisk)
1. Repeat steps 1 to 9 from "Workaround1"  but backup the  ISO files to remote system using(SCP /NFS / or any other methods).
2. Upgrade your vios using viosupgrade to 3.1.x.x.
3. Post upgrade create a new Virtual Media Library .(Make sure sufficient space is provided to  needed to accommodate all ISO's backed up) .
$ mkrep -sp rootvg -size <size>
4.  Restore the files backed up remotely back to  "/var/vio/VMLibrary"  .
5. Now running "lsrep" should show all your images like before.

Document Location


[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSSMHJ","label":"PowerVM Virtual I\/O Server"},"Component":"","Platform":[{"code":"PF002","label":"AIX"}],"Version":"VIOS 2.2 and 3.1","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
29 July 2020