IBM®
Skip to main content
    Country/region [select]      Terms of use
 
 
    
     Home      Products      Services & solutions      Support & downloads      My account     
 
developerworks > My developerWorks >  Dashboard > AIX > ... > AIXV53Howtos > VIOLoadISO
developerWorks
Log In   View a printable version of the current page.
Overview Connect Spaces Forums Wikis
VIOLoadISO
Added by OneSkyWalker, last edited by OneSkyWalker on Oct 13, 2009  (view change)
Labels: 
(None)

How to access an ISO image on an LPAR via a virtual CDROM device on a VIO Server at the 1.5 level

The following instructions were cribbed from the VIO Server file-backed devices web page. My thanks to Joe Pu for publishing it. Any errors in this article are, of course, not Mr. Pu's responsibility.

A .ISO image file can be obtained in several different ways:

  1. Download it
  2. Build your own
  3. Copy from CD or DVD media: dd if=/dev/cd0 of=/tmp/cdcopy.iso bs=1m

Several articles on the web suggest that the third alternative will work, but no testing has been done. And please consider potential copyright violations before using the third alternative.

Note

For information about the VIOS 1.5 commands used below, see the Power Systems Virtual I/O Server and Integrated Virtualization Manager Command Reference (SA76-0101-04 as of 8/28/2008, downloadable from the Virtual I/O Server command descriptions web page. Please note that on 8/28/2008, the command descriptions on the web page itself are for an earlier level of VIOS. That may change in the future, but for now the sa76-0101.pdf file must be downloaded to get descriptions of commands at the VIOS 1.5 level.

First, when logged in as padmin on a Virtual I/O Server:

  1. Because support for virtual CDROM devices was introduced in VIOS 1.5, confirm that VIO Server software is at the 1.5 level or above:
    $ ioslevel
    1.5.2.1-FP-11.1
    $
    
    Notes
    1. If the VIOS level is below 1.5, the instructions below will not work as described.
    2. An AIX VIO client may sometimes read incorrect data from virtual CDROM devices unless the fix for APAR IZ20663 is installed on the client.
  2. Determine if a Virtual Media Repository has already been defined on the VIO Server:
    $ lsrep
    The DVD repository has not been created yet.
    
    $
    

    There is no Virtual Media Repository yet.

    Note

    A VIO Server can have only one Virtual Media Repository, so if one has already been defined, it must be used.

  3. Display the storage pools which are available on the VIO Server:
    $ lssp
    Pool              Size(mb)   Free(mb)  Alloc Size(mb)    BDs Type
    rootvg              279552     122112             128     10 LVPOOL
    $
    
  4. Define a Virtual Media Repository:
    $ mkrep -sp rootvg -size 128M
    Virtual Media Repository Created
    Repository created within "VMLibrary_LV" logical volume
    $
    

    where:
    o rootvg is the name of the storage pool chosen from list displayed by lssp and
    o 128M is the size of the Virtual Media Repository.

    Note

    Because a VIO Server can have only one repository, the repository defined here must be large enough to hold all the CD images staged on the VIO Server. The 128 MB example used here is very small. The chrep command can be used later to increase the size of the repository.

  5. List the Virtual Media Repository to confirm that it was defined properly:
    $ lsrep
    Size(mb) Free(mb) Parent Pool         Parent Size      Parent Free
         125      125 rootvg                   279552           121984
    $
    
  6. Add one or more ISO images to the Virtual Media Repository, which could be referred to as creating a virtual optical media disk:
    $ pwd
    /home/padmin
    $ ls -altr *.iso
    -rw-r--r--    1 padmin   staff        102400 Aug 28 12:52 bestprac.iso
    $ mkvopt -name bestprac -file bestprac.iso
    $
    

    where:
    o bestprac is the name chosen for the ISO image in the Virtual Media Repository and
    o bestprac.iso is the ISO image file to be loaded into the Repository.

  7. Confirm that the ISO images were added to the Repository and remove the ISO image file, assuming it is no longer needed:
    $ lsrep
    Size(mb) Free(mb) Parent Pool         Parent Size      Parent Free
         126      125 rootvg                   279552           121984
    
    Name                                    File Size Optical         Access
    bestprac                                        1 None            rw
    $ rm bestprac.iso
    $
    

Second, when logged in as hscroot on the Hardware Management Console:

  1. Get a list of managed servers:
    hscroot@hmc-p520:~> lssyscfg -r sys -F name
    Server-9111-520-SN10-5F2CD
    hscroot@hmc-p520:~>
    

    There is only one managed server (named Server-9111-520-SN10-5F2CD) in this example.

  2. List the LPARs on one of the managed servers listed above:
    hscroot@hmc-p520:~> lssyscfg -r lpar -m Server-9111-520-SN10-5F2CD -F name,lpar_id,lpar_env,state
    Telstar,9,aixlinux,Not Activated
    p520-sr5,8,aixlinux,Not Activated
    RedHat,7,aixlinux,Not Activated
    p520-sr4,6,aixlinux,Running
    p520-sr3,5,aixlinux,Running
    9.72.8.225,4,aixlinux,Running
    p520-sr2,3,aixlinux,Running
    p520-sr1  vio,2,vioserver,Running
    10-5F2CD,1,aixlinux,Error
    hscroot@hmc-p520:~>
    

    where:
    o Server-9111-520-SN10-5F2CD is the managed server name chosen in the previous step.

    From the list, choose an LPAR on which media in the Virtual Media Repository will be used and which is (or can be) a Virtual I/O client. Note the lpar_id of the LPAR. In the example above, LPAR p520-sr4 will be chosen, the lpar_id of which is 6:

    p520-sr4,6,aixlinux,Running
    

Third, back in the padmin session on the VIO Server:

  1. List the virtual server adapters:
    $ lsmap -all -field svsa clientid
    SVSA             Client Partition ID
    ---------------  -------------------
    vhost0           0x00000003
    
    SVSA             Client Partition ID
    ---------------  -------------------
    vhost1           0x00000005
    
    SVSA             Client Partition ID
    ---------------  -------------------
    vhost2           0x00000006
    
    SVSA             Client Partition ID
    ---------------  -------------------
    vhost3           0x00000008
    
    $
    

    From the list, choose the virtual server adapter which connects to the Client Partition ID which is the same as the lpar_id (6) identified in the previous step, except that the Client Partition ID is displayed as 0x00000006 instead of 6. Virtual server adapter vhost2 is associated with Client Partition ID 0x00000006 in the list above.

    Notes
    1. If there is no match in the lsmap -all -field svsa clientid output for the lpar_id identified in the previous step, then the chosen LPAR is not yet a Virtual I/O SCSI client and a virtual server adapter must be defined for it. Defining a new virtual server adapter (if necessary) is done on the HMC GUI and is not discussed further here. For more information, see Section 3.6.1, "Virtual SCSI resources" in the PowerVM Virtualization on IBM System p: Managing and Monitoring Redbook. Other earlier sections of the Redbook provide useful background on virtual SCSI adapters.

    2. If there is more than one VIO server, then to determine the VIO server(s) to which the identified lpar_id has SCSI connections, when logged in as hscroot on the Hardware Management Console:
      hscroot@hmc-p520:~> lshwres -m Server-9111-520-SN10-5F2CD -r virtualio --rsubtype scsi \
      --filter lpar_ids=6 -F lpar_name,remote_lpar_name
      p520-sr4,p520-sr1  vio
      hscroot@hmc-p520:~>
      

      where:
      o Server-9111-520-SN10-5F2CD is the managed server name and
      o 6 is the identified lpar_id.

      The VIO LPAR name is p520-sr1 vio in the example above. (Please note that the command line in the example above is continued onto a second line with the \ character.)

  2. Define a file-backed optical device on the virtual server adapter identified in the previous step:
    $ mkvdev -fbo -vadapter vhost2
    vtopt0 Available
    $
    

    where:
    o vhost2 is the virtual server adapter name identified in the previous step.

  3. Load virtual optical media in the file-backed optical device defined in the previous step:
    $ loadopt -disk bestprac -vtd vtopt0
    $
    

    where:
    o bestprac is the name chosen when the ISO image was added to the Virtual Media Repository and
    o vtopt0 is the file-backed optical device created in the previous step.

Fourth, when logged in as root on the selected LPAR which is a Virtual I/O client:

  1. List CD devices which are already configured:
    p520-sr4:/ # lsdev -Cc cdrom
    p520-sr4:/ #
    

    In this example, there are no CD devices already configured.

  2. List the virtual adapters which are configured:
    p520-sr4:/ # lsdev -Cc adapter
    ent0   Available  Virtual I/O Ethernet Adapter (l-lan)
    ent1   Defined    Virtual I/O Ethernet Adapter (l-lan)
    vsa0   Available  LPAR Virtual Serial Adapter
    vscsi0 Available  Virtual SCSI Client Adapter
    p520-sr4:/ #
    

    In this example, there is only one virtual SCSI client adapter, so it must be the one which connects to the VIO server on which the file-backed optical device was just defined.

  3. Discover the new file-backed optical device:
    p520-sr4:/ # cfgmgr -l vscsi0
    p520-sr4:/ # lsdev -Cc cdrom
    cd0 Available  Virtual SCSI Optical Served by VIO Server
    p520-sr4:/ #
    

    where:
    o vscsi0 is the virtual SCSI client adapter identified in the previous step. If there is more than one virtual SCSI client adapter, then it might be necessary to run cfgmgr against each of them.

  4. Define a CDROM filesystem on the file-backed optical device just discovered:
    p520-sr4:/ # crfs -v cdrfs -p ro -d cd0 -m /cdrom -An
    p520-sr4:/ #
    

    where:
    o cd0 is the file-backed optical device discovered in the previous step and
    o /cdrom is mount point chosen for the CDROM filesystem.

  5. Mount the CDROM filesystem defined in the previous step:
    p520-sr4:/ # mount /cdrom
    p520-sr4:/ #
    

    where:
    o /cdrom is mount point chosen for the CDROM filesystem in the previous step.

  6. Confirm that the CDROM filesystem contains the files which reside on the ISO image in the Virtual Media Repository:
    p520-sr4:/ # cd /cdrom
    p520-sr4:/cdrom # ls
    .kshrc                  mkuser.sys.v53.new      pagemon
    .kshrc.root             mkuser.sys.v53.orig     ptree
    .profile.ksh            mkuser.sys.v53tl7.new   stopcmd
    .profile.root           mkuser.sys.v53tl7.orig  sysreadme
    README                  motd.new
    installbp               pagemax
    p520-sr4:/cdrom #
    
Note

Before attempting to install from the virtual optical media, unmount the filesystem (cd / ; umount /cdrom). If the filesystem is left mounted, it may interfere with the installation process.

Fifth (once the Virtual I/O client is done with the virtual optical media), back in the padmin session on the VIO Server:

  1. List information about the file-backed optical devices:
    $ lsvopt
    VTD             Media                                   Size(mb)
    vtopt0          bestprac                                       1
    $
    

    Only one file-backed optical device is displayed in this example. Note that the virtual optical media (named bestprac) is still in the file-backed optical device.

  2. Remove the media from the file-backed optical device:
    $ unloadopt -vtd vtopt0
    $
    

    where:
    o vtopt2 is the name of the file-backed optical device.

  3. Confirm that there is no longer any media in the file-backed optical device:
    $ lsvopt
    VTD             Media                                   Size(mb)
    vtopt0          No Media                                     n/a
    $
    

The contents of this web page solely reflect the personal views of the authors and do not necessarily represent the views, positions, strategies or opinions of IBM or IBM management. Please use the Add Comment link at the bottom of the page to provide feedback. Note: Until you log in (using the link in the upper right corner of this web page), you will not see the Add Comment link and you can not add a comment. If you do not already have an IBM ID, use the Register Now link on the sign in page to obtain one. Registration is quick and easy.


 
    About IBM Privacy Contact