Working with Virtual media library on VIO servers

Sometimes we need to map an ISO images to LPARs. Today we’re going to create a VM library, load ISO images and map them to LPARs. Just follow these steps

Prerequisites:

  • Download AIX’s iso files from IBM entitled software support.
  • Copy ISO files to /home/padmin directory on one VIO server.
  • Create a virtual VSCI adapter on the LPAR and map it to VIO server (vhostX)
1
2
3
4
padmin@vios $ ls -ltr /home/padmin
total 16290920
-rw-r--r--    1 padmin   staff    4238082048 Jan 12 01:35 AIX71.iso
-rw-r--r--    1 padmin   staff    4088528896 Jan 13 00:37 AIX61.iso
  •  Check there’s nos repository already created.
1
2
padmin@vios $ lsrep
The DVD repository has not been created yet.
  •  Create a new 10GB size VM repository.
1
2
3
padmin@vios $ mkrep -sp rootvg -size 10G
Virtual Media Repository Created
Repository created within "VMLibrary" logical volume
  •  Verify status of repository.
1
2
3
padmin@vios $ lsrep
Size(mb) Free(mb) Parent Pool      Parent Size      Parent Free
   10198    10198     rootvg            285696           249344
1
2
3
padmin@vios $ df -g /var/vio/VMLibrary
Filesystem       GB blocks    Free    %Used  Iused %Iused  Mounted on
/dev/VMLibrary   10.00        9.96    1%     4     1%      /var/vio/VMLibrary
  • Create virtual optical disks inside the Virtual Media Repository.
1
2
padmin@vios $ mkvopt -name AIX61 -file /home/padmin/AIX61.iso -ro
padmin@vios $ mkvopt -name AIX71 -file /home/padmin/AIX71.iso -ro
1
2
3
4
5
padmin@vios $ ls -l /var/vio/VMLibrary
total 16262912
-r--------    1 root     staff    4088528896 Feb 07 09:38 AIX61
-r--------    1 root     staff    4238082048 Feb 07 09:41 AIX71
drwxr-xr-x    2 root     system          256 Feb 07 09:35 lost+found
  •  Displays information about the Virtual Media Repository.
padmin@vios $ lsrep
1
2
3
4
5
6
Size(mb)  Free(mb) Parent Pool         Parent Size      Parent Free
10199     2257     rootvg                571392           488960
 
Name              File Size   Optical      Access
AIX61.iso               3900     None          ro
AIX71.iso               4042     None          ro
  • If you need to increase repository size use chrep command.

 

1
padmin@vios $ chrep -size 4G
  • Verify status of the increased VM repository.

 

1
2
3
4
5
6
7
padmin@vios $ lsrep
Size(mb) Free(mb) Parent Pool Parent Size Parent Free
14278 6336 rootvg 285696 245248
 
Name   File Size  Optical  Access
AIX61       3900     None      ro
AIX71       4042     None      ro
  •  Let’s crate a File Backed Optical Device for a particular LPAR mapped on vhost0
1
padmin@vios $ mkvdev -fbo -vadapter vhost0
  • Now let’s load the image from the VML into vtopt0.
1
padmin@vios $ loadopt -vtd vtopt0 -disk AIX61
1
2
3
padmin@vios $ lsvopt
VTD             Media                                                 Size(mb)
vtopt0          AIX61                                                     3900
  • Just verify vhost has being mapped correctly.

 

1
2
3
4
5
6
7
8
9
10
11
padmin@vios $ lsmap -vadapter vhost0
SVSA            Physloc                            Client Partition ID
--------------- -------------------------------------------- ------------------
vhost0          U8406.70Y.06E04FA-V1-C7                   0x00000010
 
VTD                   vtopt0
Status                Available
LUN                   0x8100000000000000
Backing device        /var/vio/VMLibrary/AIX61
Physloc
Mirrored              N/A
  • To unload the image. Try this:

 

1
padmin@vios $ unloadopt -vtd vtopt0
NOTE: If the CD device is locked by the client, use the -release flag to remove the reserve, and ran again the command
5 (4)
Article Rating (4 Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
Find out which port the daemon is using on AIX OS. (similar like command netstat -anp for Linux)
Viewed 11264 times since Thu, Feb 21, 2019
Processes and Devices—It’s All About the Children
Viewed 2101 times since Wed, May 30, 2018
Part 3, Monitoring your network packets and tuning the network
Viewed 5918 times since Mon, Jun 4, 2018
Topics: PowerHA / HACMP, Storage Adding a new volume group to an active PowerHA resource group
Viewed 2525 times since Mon, Jun 3, 2019
AIX, Monitoring, Networking, Red Hat, Security, System Admin↑ Determining type of system remotely
Viewed 2177 times since Fri, Apr 19, 2019
AIX www web Links
Viewed 3240 times since Fri, Apr 19, 2019
AIX NFS Version 4 configuration over Kerberos inter-realm setup
Viewed 3884 times since Wed, Jun 27, 2018
How to Use the Linux lsof Command
Viewed 11466 times since Sun, Jun 30, 2019
The new VIOS performance advisor tool part util
Viewed 3153 times since Tue, Jun 4, 2019
Do you Know These 5 Use of V$session View ?
Viewed 103661 times since Thu, Jun 21, 2018