Comments (12)
  • Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry

1 CPR9_Dave_Young commented Permalink

A useful addition to the above tip, is that you can run oem_setup_env commands on the VIO from the HMC if you add a line break in the middle of the comand string, eg : <div>&nbsp;</div> viosvrcmd -m p520 -p vio1 -c "oem_setup_env <br /> pcmpath query device" <div>&nbsp;</div> This is useful for many things - for example, resetting the padmin password from the HMC (a fact which has saved me a lot of pain on several occasions!)

2 brian_s commented Permalink

Thanks Dave, great comment. I updated the posting with this info. <div>&nbsp;</div> I also did some experimenting and found that this works too: <div>&nbsp;</div> hscroot@hmc1:~&gt; command=`printf "oem_setup_env\nwhoami"` <br /> hscroot@hmc1:~&gt; viosvrcmd -m p520 -p vio1 -c "$command" <br /> root <div>&nbsp;</div> Thanks again!

3 SCRT_Denilson_Nascim commented Permalink

Please guys, how can I reset the padmin password using viosvrcmd command from HMC?

4 brian_s commented Permalink

5 oczkov commented Permalink


I was trying to change passwords with chpasswd, but the lack of "|" and "<" in remote command prohibited this method. Also the "&" sing seems not be allowed in vios remote command.

6 brian_s commented Permalink

See this blog posting I did for how to reset the padmin password through viosvrcmd: <div>&nbsp;</div>

7 Santhosh Thangachan commented Permalink

Very useful post Brian. Thanks !

8 CBev commented Permalink

Can someone verify the asterisk is also not permitted in a viosvrcmd?

I'm getting the below error when even doing 'ls *'
CMD=`printf 'oem_setup_env\nls *'`
viosvrcmd -m <"mmmm-ttt sssssss"> --id <"VIO ID"> -c "$CMD"
HSCL2970 The IOServer command has failed because of the following reason: ioscli oem_setup_env
ls * contains illegal data: *.
I'm trying to map LUNs to WWPNs and 'lscfg -vpl *' would be nice. Workaround is to just run 'lscfg -v' but that presents more data and parsing challenges.

9 seventh_sense commented Permalink

Hi Brian, <div>&nbsp;</div> Thanks for this post. <div>&nbsp;</div> I'm getting this error: <div>&nbsp;</div> HSCL2970 The IOServer command has failed because of the following reason: ioscli lsdev -vpd -dev hdisk* contains illegal data: *. <div>&nbsp;</div> for this command in a script: <div>&nbsp;</div> ssh hscroot@$HMC "viosvrcmd -m $BOX_NAME -p $VIOS -c 'lsdev -vpd -dev hdisk*'" \ <br /> |awk '/hdisk/ || /Serial/ {print }' \ <br /> |awk 'END { print r } r &amp;&amp; ( /hdisk/ || /vpath/) { print r; r = "" } { r = r ? r $0 : $0 }' &gt;${TARGET_FOLDER}/${FILE_PREFIXES}_lun_serials.out <div>&nbsp;</div> <div>&nbsp;</div> Please help. <div>&nbsp;</div> Thanks,

10 Krrish146 commented Permalink

Do we have similar command like viosvrcmd, to run on HMC to get details from LPAR (non vio)..

11 brian_s commented Permalink

viosvrcmd is only for VIO servers, and there isn't anything similar for AIX LPAR's that I am aware of.

12 Tucker commented Permalink

This is a great article...The pain of the viosvrcmd is that you need the frame it is on and the name of the vio server....and if you have to make changes to all the vio servers in your environment then it can take a long I create this snippet of script to pull the frame name and vio server name and ran them through the viosvrcmd command...check it out: <br /> #gather frame names <br /> FRAMES=$(lssyscfg -r sys -F name) <br /> #gather ONLY vio server names <br /> for i in $FRAMES <br /> do <br /> printf . <br /> for x in $(lssyscfg -m "${i}" -r lpar -F name) <br /> do <br /> if [[ $(lssyscfg -m "${i}" -r lpar --filter lpar_names="${x}" -F lpar_env) = "vioserver" ]] <br /> then <br /> VIOS="${VIOS} "${i}" "${x}"" <br /> fi <br /> done <br /> done <br /> #Run command against all vio servers on the HMC <br /> printf "%s\t%s\n" ${VIOS}|while read i x; <br /> do <br /> echo "${x}" <br /> viosvrcmd -m "${i}" -p "${x}" -c "$(printf "%s\n%s" "oem_setup_env" "lsps -a")" <br /> done