VIO Server Command Line
Posted by steve on 19 Sep 2012 in VIO Server Tips, Command Line Tips
Every wondered what AIX commands the VIO server executes for you? | export CLI_DEBUG=33 |
Configure new devices (AIX cfgmgr) | cfgdev |
Configure new devices from a parent device | cfgdev -dev fcs0 |
List the devices of type adapter | lsdev -type adapter |
List only virtual devices of type adapter | lsdev -virtual -type adapter |
List only virtual devices of type disk | lsdev -virtual -type disk |
List the attributes of a device | lsdev -dev fcs0 -attr |
List the Vital Product Data (VPD) of a device | lsdev -dev fcs0 -vpd |
List the range of values for a device attribute | lsdev -dev hdisk0 -range queue_depth |
List the physical and virtual adapter slots | lsdev -slots |
List the parent device | lsdev -dev hdisk10 -parent |
List the children devices | lsdev -dev fcs0 -child |
List NPIV capable Fibre Adapters (HBA) | lsnports |
List all the virtual devices connected to all virtual hosts | lsmap -all | more |
List the virtual devices connected to a virtual host | lsmap -vadapter vhost0 |
List all the NPIV virtual devices connected to a virtual host | lsmap -all –npiv |
List all Shared Ethernet Adapters (SEA) | lsmap -all -net -field sea |
Create a VSCSI mapping from hdisk10 to vhost10 | mkvdev -vdev hdisk10 -vadapter vhost10 -dev hdisk10_rootvg |
Create an NPIV mapping fcs0 to vfchost10 | vfcmap -vadapter vfchost10 -fcp fcs0 |
Remove and Delete a VSCSI mapping device | rmdev -dev hdisk10_rootvg |
Remove but leave Defined a VSCSI mapping device | rmdev -dev hdisk10_rootvg -ucfg |
Remove an NPIV mapping for vfchost10 | vfcmap -vadapter vfchost0 -fcp |
Create an EtherChannel / IEEE 802.3ad Link Aggregation | mkvdev -lnagg ent0 ent1 |
Create a SEA adapter, with real adapter ent3, virtual adapter ent4 and control channel ent5 | mkvdev -sea ent3 -vadapter ent4 -default ent4 -defaultid 4010 -attr ha_mode=auto ctl_chan=ent5 |
Create a VLAN pseudo network adapter for a VLAN id 10 on the SEA adapter | mkvdev -vlan ent3 -tagid 10 |
Setup the initial network adapter and nameserver information | mktcpip -hostname vios1 -inetaddr 10.10.10.10 -interface en6 -start -gateway 10.10.10.1 -netmask 255.255.255.0 -nsrvaddr 10.10.10.100 -nsrvdomain my.domain |
Setup additional network adapters | chdev -dev en7 -perm -attr netaddr=20.20.20.20 -attr netmask=255.255.255.0 -attr state=up |
Show network adapter configuration | netstat -state |
Show network adapter configuration with numerics only | netstat -state -num |
Show the network routing table | netstat -routtable |
Show the network routing table with numerics only | netstat -routtable -num |
Show virtual and physical network adapters | lstcpip -adapters |
Mirror the rootvg - Note: This will reboot the VIO server. | extendvg rootvg hdisk1 mirrorios hdisk1 |
Reboot the VIO Server | shutdown -restart -force |
Show the VIO Server operating system level (AIX oslevel) | ioslevel |
Show the brief error log | errlog |
Show the full error log | errlog -ls |
Remove error log entries older than 30 days | errlog -rm 30 |
Show timestamped VIO command history | lsgcl |
Show the attributes of a user | lsuser padmin |
Change your password | passwd |
Change the /etc/motd file | motd "Your login message and warning" |
Run a mksysb backup of the VIO server to a remote directory. Optional flag -nomedialib stops the mksysb backing up any media library images. | backupios -file {BACKUP_DIR}/{HOSTNAME}.mksysb -mksysb -nomedialib |
Backup the volume group structures of an online volume group. | savevgstruct {VG} |
Create a Virtual Library in rootvg. | mkrep -sp rootvg -size 10G |
Add an iso image to the Virtual Library. | mkvopt -name aix71dvd1 -file AIX71_TL0SP1_1.iso |
Change the rw/ro attribute. | chvopt -name AIX71_TL0SP1_1.iso -access ro |
Assign the FBO to a vhost. | mkvdev -fbo -vadapter vhost1 |
Load the iso image on to the device. | loadopt -disk aix71dvd1 -vtd vtopt0 |
Unload the iso image from a device. | unloadopt -vtd vtopt0 |
Default LPM Verification Command. | migrlpar -o v -m ${SRC_FRAME} -t ${DST_FRAME} -p ${LPM_LPAR} |
Default LPM Verification and Migrate Command. | migrlpar -o m -m ${SRC_FRAME} -t ${DST_FRAME} -p ${LPM_LPAR} |
Default LPM LPAR Recovery Command. | migrlpar -o r -m ${SRC_FRAME} -t ${DST_FRAME} -p ${LPM_LPAR} |
Oh, and one last one, get root access (if you really need it) This should only be used to install 3rd party (supported) device drivers and software. |
oem_setup_env |