Power

 View Only
Expand all | Collapse all

help with HMC commands used to set up virtual adapters and create SSP storage

  • 1.  help with HMC commands used to set up virtual adapters and create SSP storage

    Posted Mon April 17, 2023 05:06 PM

    I'm tryng to run this command from a small script  on a 7.3 NIM master, calling an HMC V9R2. My task is to automate creating LPARs passing prompted variables to an HMC command line. We use SSP volumes for storage and have a single vios. These are dev and QA machines and the setup is pretty simple. 

    I've found it very easy to ssh to the HMC and run commands within double quotes including the viosvrcmd to call the vio server.

    ssh hscroot@<host or IP>
    "
    mksyscfg - give details to create the LPAR
    chsyscfg - set up virtual networking 

    OK here's where I have problems adding a vio adapter

    chwres 
       -m <machine name>
       -r virtualio --rsubtype scsi
       -o a
       -p <vios name, this a single vios BTW>
       -s ?? -> how can I find this slot number? can it be automatically generated?
       -a adapter_type=server
       remote_slot_num=3 (for some reason it defaults to 3)
       remote_lpar_id=<LPAR ID>

    then finding the vhost# to create storage

     viosvrcmd
    -m <machine name>
    --id 1
    -c 'lu -create -size <xG> -lu <device name> -vadapter vhost? is there a way to calculate this without leaving my command?
    "

    I really appreciate any advice. Please feel free to correct me if I'm on the wrong track. I put most of this together with the help of HMC and vios support but there is a gray area here when I'm stuck.



    ------------------------------
    Christopher Conn
    cconn@opentext.com
    Austin, TX, USA
    ------------------------------


  • 2.  RE: help with HMC commands used to set up virtual adapters and create SSP storage

    Posted Tue April 18, 2023 11:56 AM

    Hi,

    That is rather an "old school" approach.

    For smaller numbers of POWER computers (like my lab of around  10 = POWER8, POWER9 and Power10) I much prefer to use the HMC GUI directly or you could get assistance using a temple for the basics.

    For larger scale, Data  Centre popular are PowerVC or Ansible

    Shell script writing is very 1070's.

    Aren't the vhost names in the lsmap -all output? 

    Very tricky to parse  unless you use  lsmap -all -fmt :



    ------------------------------
    Nigel Griffiths
    ------------------------------