Friday, 5 July 2013

PowerVM QuickStart II-VIOS Setup & Management

PowerVM QuickStart II-  VIOS Setup & Management


1.VIOS Management Examples
2.VIOS Networking Examples
3.VIOS Unix Subsystem
4.User Management

1.VIOS Management Examples
Accept all VIOS license agreements
license -accept
(Re)Start the (initial) configuration assistant
cfgassist
Shutdown the server
shutdown
›››    Optionally include -restart
List the version of the VIOS system software
ioslevel
List the boot devices for this lpar
bootlist -mode normal -ls
List LPAR name and ID
lslparinfo
Display firmware level of all devices on this VIOS LPAR
lsfware -all
Display the MOTD
motd
Change the MOTD to an appropriate message
motd "*****    Unauthorized access is prohibited!    *****"
List all (AIX) packages installed on the system
lssw
›››    Equivalent to lslpp -L in AIX

Display a timestamped list of all commands run on the system
lsgcl
To display the current date and time of the VIOS
chdate

Change the current time and date to 1:02 AM March 4, 2009
chdate -hour 1 \
       -minute 2 \
       -month 3 \
       -day 4 \
       -year 2009

Change just the timezone to AST
chdate -timezone AST (Visible on next login)

›››   The date command is available and works the same as in Unix.

Brief dump of the system error log
errlog

Detailed dump of the system error log
errlog -ls | more
Remove error log events older than 30 days
errlog -rm 30
›››   The errlog command allows you to view errors by sequence, but does not give the sequence in the default format.
• errbr works on VIOS provided that the errpt command is in padmin's PATH.

2.VIOS Networking Examples
Enable jumbo frames on the ent0 device 
chdev -dev ent0 -attr jumbo_frames=yes
View settings on ent0 device
lsdev -dev ent0 -attr
List TCP and UDP sockets listening and in use
lstcpip -sockets -family inet
List all (virtual and physical) ethernet adapters in the VIOS
lstcpip -adapters
Equivalent of no -L command
optimizenet -list
Set up initial TCP/IP config (en10 is the interface for the SEA ent10)
mktcpip -hostname vios1 \
        -inetaddr 10.143.181.207 \
        -interface en10 \
        -start -netmask 255.255.252.0 \
        -gateway 10.143.180.1

Find the default gateway and routing info on the VIOS
netstat -routinfo
List open (TCP) ports on the VIOS IP stack 
lstcpip -sockets | grep LISTEN

Show interface traffic statistics on 2 second intervals
netstat -state 2

Show verbose statistics for all interfaces
netstat -cdlistats

Show the default gateway and route table
netstat -routtable

Change the default route on en0 (fix a typo from mktcpip)
chtcpip -interface en0 \
        -gateway \
        -add 192.168.1.1 \
        -remove 168.192.1.1

Change the IP address on en0 to 192.168.1.2
chtcpip -interface en0 \
        -inetaddr 192.168.1.2 \
        -netmask 255.255.255.0

3.VIOS Unix Subsystem
• The current VIOS runs on an AIX subsystem. (VIOS functionality is available for Linux. This document only deals with the AIX based versions.)
• The padmin account logs in with a restricted shell. A root shell can be obtained by the oem_setup_env command.
• The root shell is designed for installation of OEM applications and drivers only. It may be required for a small subset of commands. (The purpose of this document is to provide a listing of most frequent tasks and the proper VIOS commands so that access to a root shell is not required.)

• The restricted shell has access to common Unix utilities such as awk, grep, sed, and vi. The syntax and usage of these commands has not been changed in VIOS. (Use "ls /usr/ios/utils" to get a listing of available Unix commands.)
• Redirection to a file is not allowed using the standard ">" character, but can be accomplished with the "tee" command.
Redirect the output of ls to a file
ls | tee ls.out
Determine the underlying (AIX) OS version (for driver install)
oem_platform_level
Exit the restricted shell to a root shell
oem_setup_env
Mirror the rootvg in VIOS to hdisk1
extendvg rootvg hdisk1
mirrorios hdisk1
›››    The VIOS will reboot when finished

4.User Management
• padmin is the only user for most configurations. It is possible to configure additional users, such as operational users for monitoring purposes.
List attributes of the padmin user
lsuser padmin

0 blogger-disqus:

Post a Comment