id : cc2nqp34we
category : computer
blog : unixlinux
created : 08/26/10 - 17:07:45


  • Always connect as padmin :
# ssh padmin@viobox

  • Become root :
padmin# oem_setup_env
# whoami


  • Typing help will give you all vios commands (errpt like) :
# help

Error logging

  • Get system error log :
padmin# errlog

  • Get detailed system error log :
padmin# errlog -ls | more

  • Remove log event older than 30 days :
padmin# errlog -rm 30

cfgmgr equivalent

# cfgdev


padmin# ioslevel


  • On first connection on your vio box don't forget to accept license :
padmin# license -accept

Sea : Shared Ethernet adapter

  • Get virtual adapter id :
padmin# lscfg -vps -l <virtual_adapter> | grep Physical
  Physical Location : XXXXX.XXX.XXXXXXX.XX.X<ID>.XX

Sea Control Channel (Failover) creation
  • To create a sea you need to have :
    • A physical adapter.
    • A virtual adapter.
    • A control channel adapter.
    • A vlan id.
padmin# mkvdev -sea <physical_adapter> -vadapter <virtual_adapter> -default <virtual_adapter> -defaultid <vlan_id> -attr ha_mode=auto ctl_chan=<control_channel_adapter>

  • This will produce a new ent.
Sea Without Control Channel creation
padmin# mkvdev -sea <physical_adapter> -vadapter <virtual_adapter> -default <virtual_adapter> -defaultid <vlan_id> -attr ha_mode=auto

  • This will produce a new ent.
Sea management
  • Get sea virtual adapter :
padmin# lsdev -dev <sea_adapter> -attr virt_adapters

  • Get sea control channel adapter :
padmin# lsdev -dev <sea_adapter> -attr ctl_chan

  • Get sea real adapter :
padmin# lsdev -dev <sea_adapter> -attr real_adapter

  • Get all control channel adapters :
padmin# netstat -cdlistats | grep  "Control Channel Adapter"

  • List all virtual NICs in the VIOS along with SEA and backing devices :
padmin# lsmap -all -net

  • Get control channel pvid :
padmin# entstat -all <sea_adapter> | grep "Control Channel PVID"

mktcpip on an sea
  • You need to put an adresse on your sea after creating it :
# rmtcpip -all
# mktcpip -hostname <vio_hostname> -inetaddr XXX.XXX.XXX.XXX -interface <sea_ent> -netmask XXX.XXX.XXX.XXX -gateway XXX.XXX.XXX.

Disks and virtual SCSI

  • Discover new PV :
padmin# cfgdev

  • List free PV :
padmin# lspv --free

  • List PV attached to a particular vhost :
padmin# lsmap -vadapter <vhost>

  • Attach a disk to a vhost :
padmin# chdev -dev <pv_name> -attr pv=yes
padmin# mkvdev -vdev <pv_name> -vadapter <vhost> -dev <name>

  • To add it on one more VIO server set no_reserve policy
padmin# chdev -dev <pv_name> -attr reserve_policy=no_reserve -perm

  • If you have 2 vio server run at first theses commands on each vio :
padmin# chdev -dev <pv_name> -attr pv=yes
padmin# chdev -dev <pv_name> -attr algorithm=<fail_over|round_robin> -perm
padmin# chdev -dev <pv_name> -attr reserve_policy=no_reseve -perm

  • Then AFTER these commands run on each vio :
padmin# mkvdev -vdev <pv_name> -vadapter <vhost> -dev <name>


  • To create an mksysb on a vio box :
padmin# backupios -file <mount_point>/vios.mksysb -mksysb

padmin# backupios -file <mount_point>

Tips & Tricks

  • Get all virtual adapter on vio client :
# lsdev -Cc adapter | grep Virtual

  • Get ethernet virtual adapter ID :
# lscfg -vpl ent<X>
lscfg -vpl ent0 | grep Location
        Hardware Location Code......U9117.570.658A5F0-V9-C2-T1
    Physical Location: U9117.570.658A5F0-V9-C2-T1

  • C2 means virtual adapter ID 2.


padmin# cfgnamesrv -add -ipaddr <dns_1_addr>
padmin# cfgnamesrv -add -ipaddr <dns_2_addr>
padmin# cfgnamesrv -add -dname <domain_name>
padmin# cfgnamesrv -add -slist <search_list_seperated_by_spaces> 
padmin# cfgnamesrv -ls