Tuesday, June 26, 2018

Virtual Media Library on Virtual I/O server


In this post i am going to share how to create ISO image from AIX mksysb and restore to AIX LPAR
using Virtual media library from VIO. its also called as media repository .media repository contain ISO image.

Let see how to create ISO image from AIX mksysb.
mkcd -L -S -I /mksysb/AIX_ISO -m /mksysb/AIX_mksysb_bkp

-L create ISO image
-I Path to store ISO image
-m Previously created mksysb image
-S stop mkcd command from writing ISO image on CD/DVD.
a
once ISO image created next task is to make sure that following condition satisfied.
1.Version of VIOS 1.5 or Later.
2.Virtual SCSI adapter mapping between VIO server and AIX LPAR.
3.Healthy ISO image .here we already created (AIX_ISO).

so Lets see step by step process how to create media Library and map it to AIX LPAR.

1.First check that whether any media repository exist or not by following command.
$lsrep
if repository exist command output will show its size ,if not exist then proceed for step 2.
2.Create media repository using command "mkrep"

$mkrep -sp rootvg -size 10G
confirm that media repository is created by executing following command. 
$lsrep
Size(mb) Free(mb) Parent Pool Parent Size Parent Free
10198    10198    rootvg     139776     22528

If AIX admin want to store multiple AIX ISO then he might need to increase the size of media repository.command for increasing media repository is 

$chrep -size 6G

3.Create Virtual media disk by executing following command .
#mkvopt -name AIX_71_TL04_base_image -file /tmp/AIX_ISO

here we copied already created "AIX_ISO" /tmp on VIO server.

confirm that virtual media disk is created or not by executing command 
#lsrep

padmin$ lsrep
 Size(mb) Free(mb) Parent Pool Parent Size Parent Free
10198    10198    rootvg     139776     22528
 Name                                    File Size  Optical         Access

 AIX_ISO                                  3679    None             rw

4.Connect this Virtual optical media device to AIX LPAR using following command.

$mkvdev -fbo  -vadapter vhost6
vtopt0 Available 

vhost6 is virtual SCSI adapter connected to AIX LPAR.

5.Load ISO to virtual drive by executing command loadopt.


$ loadopt -disk AIX_ISO -vtd vtopt0

check mapping on VIO server by command lsmap

$lsmap -vadapter vhost6

$ lsmap -vadapter vhost3


6.Once ISO is loaded on Virtual drive next step is to boot AIX LPAR in SMS mode .
in SMS mode virtual drive will be same as CD/DVD
 drive,choose correct adapter and boot from CD/DVD which holding AIX_ISO.

7.once installation done unload image from drive by command unloadopt.
$unloadopt -release -vtd vtopt0

please share  your comment.

thanks




No comments:

Post a Comment