Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Tuesday 10 December 2013

Creating DVD Repository (VIOS)

         
                                                                                            
Create an iso from DVD
# dd if=/dev/cd0  of=AIX_6100.iso bs=1m 
OR
# dd if=/dev/cd0  of=AIX_6100.iso bs=1024 

Let’s check, if there already a repository in our VIO server.
$ lsrep                                            

Let's check available storage pools. Will tells you how much rootvg have space.
$ lssp                                                       

Creating repository of 5GB
$ mkrep -sp rootvg -size 5G                                           

Changing Size by 2 GB
$ chrep –size 2G 

Verify
$ lsrep 

$ ls -ltr                                                             
                                                                                                                                                                                                                               
Creating the Virtual Optical Device

Creating optical disk load our AIX 6.1 ISO image into the repository. It is assume that AIX_6100.iso has already been created and transferred to VIO server.  In my case I have already created ISO image using ROXIO Image creator.             
$ mkvopt -name AIX61 -file AIX_6100.iso -ro   

Deleting Optical disk (If required..)                                                       
$ rmvopt -name AIX61                 
                                                                                               
To use the AIX DVD for installing an LPAR we need to connect a virtual optical device to the virtual SCSI host adapter (vhost8) here of the LPAR. Note: A vtoptX will be created. Use e.g. vtopt0 in the next step.      
$ mkvdev -fbo -vadapter vhost8 
vtopt0 Available
$

$ lsvopt ⤶                                               Verify
                       
$ loadopt -disk AIX61 -vtd vtopt0                                                                            

$ lsrep                         
$ lsmap  -vadapter vhost8 
                                               


Cleaning up        
unload the AIX DVD from the virtual drive                                                                                                                                                                                                         
$ unloadopt -vtd vtopt0                                          
$ unloadopt -release -vtd vtopt0                                           
$ lsrep 

Deleting VTD    
$ rmvdev -vtd vtopt0                                    
                       

     ===============    ================   =============
Example

$ pwd
/home/padmin
$

Check DVD repository already exist?
$ lsrep
The DVD repository has not been created yet.
$

$ df -g
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           0.25      0.17   32%     5722    13% /
/dev/hd2           3.25      0.70   79%    55344    25% /usr
/dev/hd9var        0.75      0.53   30%     6618     6% /var
/dev/hd3           3.50      3.49    1%       87     1% /tmp
/dev/hd1          16.00      2.01   88%       49     1% /home
/dev/hd11admin      0.12      0.12    1%       5     1% /admin
/proc                 -         -    -         -     -  /proc
/dev/hd10opt       1.12      0.32   72%     8447    10% /opt
/dev/livedump      0.25      0.25    1%        4     1% /var/adm/ras/livedump
$

Let’s create Media repository initially of 5G.
$ mkrep -sp rootvg -size 5G
Virtual Media Repository Created
Repository created within "VMLibrary" logical volume
$

Verify (A file system of /var/vio/VMLibrary will be created)
$ df -g
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           0.25      0.17   32%     5724    13% /
/dev/hd2           3.25      0.70   79%    55344    25% /usr
/dev/hd9var        0.75      0.53   30%     6620     6% /var
/dev/hd3           3.50      3.49    1%       87     1% /tmp
/dev/hd1          16.00      2.01   88%       49     1% /home
/dev/hd11admin      0.12      0.12    1%       5     1% /admin
/proc                 -         -    -         -     -  /proc
/dev/hd10opt       1.12      0.32   72%     8447    10% /opt
/dev/livedump      0.25      0.25    1%        4     1% /var/adm/ras/livedump
/dev/VMLibrary     5.00      4.98    1%        4     1% /var/vio/VMLibrary
$

Let’s change the size by adding 2G more
$ chrep -size 2G

Verify
$ df -g
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           0.25      0.17   32%     5724    13% /
/dev/hd2           3.25      0.70   79%    55344    25% /usr
/dev/hd9var        0.75      0.53   30%     6620     6% /var
/dev/hd3           3.50      3.49    1%       87     1% /tmp
/dev/hd1          16.00      2.01   88%       49     1% /home
/dev/hd11admin      0.12      0.12    1%       5     1% /admin
/proc                 -         -    -         -     -  /proc
/dev/hd10opt       1.12      0.32   72%     8447    10% /opt
/dev/livedump      0.25      0.25    1%        4     1% /var/adm/ras/livedump
/dev/VMLibrary      7.00      6.97    1%        4    1% /var/vio/VMLibrary
$

If for any reason, you want to remove the Virtual Media Repository
$ rmrep -f
Virtual Media Repository Removed
$

$ pwd
/home/padmin
$

The following images, I would like to load….
$ ls -ltr
total 29329392
drwxrwxr--    2 root     staff           256 Apr 09 2010  config
drwxr-xr-x    3 padmin   staff           256 Apr 21 2010  tivoli
-rw-r--r--    1 root     staff    3857645568 Sep 18 19:37 aix61image.iso
-rw-r--r--    1 root     staff    4180508672 Sep 18 19:59 aix53image.iso
-rw-r--r--    1 root     staff    3265789952 Sep 20 18:47 aix71image.iso
-rw-r--r--    1 padmin   staff          3726 Dec 16 12:05 smit.transaction
-rw-r--r--    1 padmin   staff          1376 Dec 16 12:05 smit.script
-rw-r--r--    1 padmin   staff         17067 Dec 16 12:05 smit.log
-rw-r-----    1 padmin   staff    3712652992 Feb 09 13:28 aix52image.iso
-rw-r--r--    1 root     staff         17009 Feb 10 18:21 ioscli.log
$

In my case, to load all 3 images, 15G size required.
$ chrep -size 8G

$ df -g
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           0.25      0.17   32%     5724    13% /
/dev/hd2           3.25      0.70   79%    55344    25% /usr
/dev/hd9var        0.75      0.53   30%     6620     6% /var
/dev/hd3           3.50      3.49    1%       87     1% /tmp
/dev/hd1          16.00      2.01   88%       49     1% /home
/dev/hd11admin      0.12      0.12    1%       5     1% /admin
/proc                 -         -    -         -     -  /proc
/dev/hd10opt       1.12      0.32   72%     8447    10% /opt
/dev/livedump      0.25      0.25    1%        4     1% /var/adm/ras/livedump
/dev/VMLibrary     15.00      4.00   74%       7     1% /var/vio/VMLibrary
$

$ mkvopt -name aix53 -file aix53image.iso -ro
OR
Rip the current phsyical CD/DVD in to the Library with name AIX61.iso
$ mkvopt –name AIX61.iso –file –dev cd0 -ro

$ mkvopt -name aix71 -file aix71image.iso -ro

$ df -g
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           0.25      0.17   32%     5724    13% /
/dev/hd2           3.25      0.70   79%    55344    25% /usr
/dev/hd9var        0.75      0.53   30%     6620     6% /var
/dev/hd3           3.50      3.49    1%       87     1% /tmp
/dev/hd1          16.00      2.01   88%       49     1% /home
/dev/hd11admin      0.12      0.12    1%       5     1% /admin
/proc                 -         -    -         -     -  /proc
/dev/hd10opt       1.12      0.32   72%     8447    10% /opt
/dev/livedump      0.25      0.25    1%        4     1% /var/adm/ras/livedump
/dev/VMLibrary     15.00      0.95   94%       8     1% /var/vio/VMLibrary
$

Create a virtual optical Device (vhost0 already in the LPAR)
$ mkvdev -fbo -vadapter vhost0
vtopt0 Available
$

$ mkvdev -fbo -vadapter vhost0
vtopt1 Available
$

$ mkvdev -fbo -vadapter vhost0
vtopt2 Available
$

Verify that virtual optical device created
$ lsmap -vadapter vhost0
SVSA            Physloc                                      Client Partition ID
--------------- -------------------------------------------- ------------------
vhost0          U9133.55A.06BF1CG-V1-C2                      0x00000002

VTD                   vtopt0
Status                Available
LUN                   0x8200000000000000
Backing device        
Physloc               

VTD                   vtopt1
Status                Available
LUN                   0x8300000000000000
Backing device        
Physloc               

VTD                   vtopt2
Status                Available
LUN                   0x8400000000000000
Backing device         
Physloc               

VTD                   vtscsi0
Status                Available
LUN                   0x8100000000000000
Backing device        hdisk1
Physloc               U787B.001.DNW8891-P1-T14-L4-L0

$

Loading the Library Media (e.g aix53, aix61 and aix71) into the LPAR device
$ loadopt -disk aix53 -vtd vtopt0 
$ loadopt -disk aix61 -vtd vtopt1
$ loadopt -disk aix71 -vtd vtopt2

If you want to undo or unload
$ unloadopt –vtd vtoptX

Verify
$ lsmap -vadapter vhost0
SVSA            Physloc                                      Client Partition ID
--------------- -------------------------------------------- ------------------
vhost0          U9133.55A.06BF1CG-V1-C2                      0x00000002

VTD                   vtopt0
Status                Available
LUN                   0x8200000000000000
Backing device        /var/vio/VMLibrary/aix53
Physloc                

VTD                   vtopt1
Status                Available
LUN                   0x8300000000000000
Backing device        /var/vio/VMLibrary/aix61
Physloc               

VTD                   vtopt2
Status                Available
LUN                   0x8400000000000000
Backing device        /var/vio/VMLibrary/aix71
Physloc               

VTD                   vtscsi0
Status                Available
LUN                   0x8100000000000000
Backing device        hdisk1
Physloc               U787B.001.DNW8891-P1-T14-L4-L0

$

List the virtual image loaded
$ lsdev –dev vopt0 –attr

$ lsrep
Size(mb) Free(mb) Parent Pool         Parent Size      Parent Free
   16318     1996 rootvg                   139776            23040

Name                                    File Size Optical         Access
aix53                                        3987 vtopt0          ro    
aix61                                        3679 vtopt1          ro    
aix71                                        3115 vtopt2          ro    
$


On Client LPAR
·         Boot LPAR from virtual CD to install the OS
·         Or to access the virtual CD/DVD
·         Use: cfgmgr to find the new device
·         Mount the CD/DVD just as you would a physical device

No comments:

Post a Comment