Script for VIOS


 
Thread Tools Search this Thread
Operating Systems AIX Script for VIOS
# 1  
Old 03-12-2009
Script for VIOS

Hello, I'm having troubles running scripts on the VIOS. I want to run a simple script like:

lsmap -all | grep vhost

I've created the file with just like this:

$ cat script1.sh
lsmap -all | grep vhost

When I run the script, it returns the following error message:

script1.sh: lsmap: not found

Any suggestions?

Thanks

Enzote
# 2  
Old 03-12-2009
Quote:
Originally Posted by enzote
Any suggestions?
Have a look at the environment inside your script. Something like:

Code:
#! /bin/ksh
print - "$PATH"
lsmap all | grep vhost

Compare that with the output of 'print - "$PATH"' on the commandline. Anything different?

I hope this helps.

bakunin
# 3  
Old 03-12-2009
/usr/ios/cli/ioscli lsmap

You can run padmin commands from the root shell (oem_setup_env) with the same ioscli. I find it easier to just be root and write my scripts using that path.
# 4  
Old 03-13-2009
bakunin:
I've added those lines at the top of my script but, unfortunately, it doesn't work. The same error remains.

Airborne:
Your suggestion works just fine! I'll do my scripts on oem_setup_env and that path.

Thanks!
# 5  
Old 03-13-2009
instead of scripting that, just make an alias

$ alias vh='ioscli lsmap -all|grep vhost'
# 6  
Old 03-13-2009
don't use oem_setup_env unless you need to, you are asking for a whole world of pain when it goes wrong.
and who wants a system with a broken vio server.
read the docs, if you cannot work it out as padmin call IBM.
if you don't have support - good luck.
if you do have support and they say use padmin and either help you find an answer or say there is no answer then at least you can get some help on a sunday evening when your vio goes down.
serously, there are too many unknowns using root on vios for things that are not documented as being supported.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

VIOS and virtual FC

Hello, In my environment, I have 2 VIOS. There is 1 lpar uses the first VIOS. Now we would like to move it to second VIOS. My question is, can we migrate the virtual FC on the lpar to second VIOS? If not, we have to create new virtual FC on second VIOS and map it to the lpar. This also... (3 Replies)
Discussion started by: Phat
3 Replies

2. AIX

VIOS 2.2.4.10 - Errors

Hi, $ ioslevel 2.2.4.10 I always get these errors when I perform any action using the web interface of IVM / VIOS Shutdown Partitions Help You have chosen to shutdown the following partitions. The recommended shutdown method is to use the client operating systems shutdown... (1 Reply)
Discussion started by: filosophizer
1 Replies

3. AIX

VIOS backup

I have 4 VIO server. I have to take backup of VIOS. I got the command "backupios" for taking the backup. My question is if i am taking "backupios -tape /dev/rmt0 " whether it will take rootvg and all the user defined VG / File system which are using for virtual disk for client lpar. I... (4 Replies)
Discussion started by: sunnybee
4 Replies

4. AIX

VIOS IP address - separate vlan for vios servers ?

Hello, Lets say for simplicity that I do not use any vlan config inside my server - one lpar group use hea physical port1, another group hea physical port2. Physical port1 configured as vlan1 on external switch, physical port2 as vlan2. What is the common practice - should I isolate my vios... (0 Replies)
Discussion started by: vilius
0 Replies

5. AIX

Few VIOS questions

Hi, I would like to ask you if you could help me to answer these questions. Please. How to check in vios, size all pv's and to what they are mapped to? How to chech on vios/hmc which PowerVM edition is used? Thank you. (7 Replies)
Discussion started by: phobus
7 Replies

6. AIX

VIOS NFS MOUNT

Hi team, I'm getting the below error on the VIO server while trying to mount a directory from my NIM server.. Any idea what does this mean.. Does this require a reserved port like linux for nfs service ? # mount 9.126.76.103:/install/VIO/V2.1_migration/fp23 /mnt ... (5 Replies)
Discussion started by: kkeng808
5 Replies

7. AIX

VIOS Backup

Dear friends.. Will it be OK if I backup VIO Server Using smit mksysb?? will it save all virtual host mapings etc...??? thanks in advance (3 Replies)
Discussion started by: Vit0_Corleone
3 Replies

8. AIX

VIOS

Can anybody provide me with usefull links to get knowledge how VIOS works and how to configure Lpars on it? I am tired and feel lazy to search through IBM redbooks :-) .. so pls help me :p (3 Replies)
Discussion started by: wwwzviadi
3 Replies

9. AIX

IVE and VIOS

I would like to hear your opinions, comments, pros and cons about the IVE (Integrated virtual ethernet) and VIOS (virtual i/o server) With the VIOS can create virtual ethernet and virtual disk With the IVE I dont need to create the vios and I can have virtual ethernet (physical and logical... (3 Replies)
Discussion started by: lo-lp-kl
3 Replies

10. AIX

vios mount

hi, i tried to mount using $ mount nimsrv01:/export/mksysb_dev/VDEVVIO1 /mksysb in vios mode. i got following error.. </code> Some error messages may contain invalid information for the Virtual I/O Server environment. mount: 1831-008 giving up on:... (1 Reply)
Discussion started by: honeym210
1 Replies
Login or Register to Ask a Question