PowerVM Editions:
http://www-912.ibm.com/pod/pod
Under the VET code:
C2DBF2AD8D3427F6CA1F00002C20004110
-Express 0000
-Standard 2C00
-Enterpise 2C20
-----------------
VIOS service package definitions
Fix Pack
A Fix Pack updates your VIOS release to the latest level. A Fix Pack update can contain product enhancements, new function and fixes.
Service Pack
A Service Pack applies to only one (the latest) VIOS level. A Service Pack contains critical fixes for issues found between Fix Pack releases. A Service Pack does not update the VIOS to a new level and it can only be applied to the Fix Pack release for which it is specified.
Interim Fix
An Interim Fix (iFix) applies to only one (the latest) VIOS level and provides a fix for a specific issue.
-----------------
Virtual I/O Server is a special partition that is not intended to run end-user applications, and should only provide login for system administrators. Virtual I/O Server allows the sharing of physical resources between supported AIX partitions to allow more efficient utilization and flexibility for using physical storage and network devices.
-----------------
User padmin:
Primary administrator on the VIO Server is the user padmin. It has a restriced shell (can't change home directory:/home/padmin) with vios commands.
The oem_setup_env command will place the padmin user in a non-restricted root shell with a home directory in the /home/padmin directory. The user can then run any command available to the root user. This is not a supported Virtual I/O Server administration method. The purpose of this command is to allow installation of vendor software, such as device drivers. (It is an environment to set up oem device drivers = oem_setup_env.)
By default the ioscli commands are not available for the root user. All ioscli commands are in fact calls of /usr/ios/cli/ioscli with the command as argument. (You see this if you list the aliases of the padmin user.)
You can use all ioscli commands as user root by appending /usr/ios/cli/ioscli. (/usr/ios/cli/ioscli lsmap -all)
You can set an alias:
alias i=/usr/ios/cli/ioscli
i lsmap -all
Typing exit, will return the user to the Virtual I/O Server prompt.
------------------------------------
/home/ios/logs/ioscli_global.trace shows history what was happening on the system (from commands point of view)
ioslevel shows vio server level
installios installs the Virtual I/O Server. This command is run from the HMC.
backupios creates an installable image of the root volume group (saves almost everything)
viosbr creates backups from user defined virtual device configs (saves only the mappings, virt. devices..)
viosbr -view -file <file name> displays the contents of a backup file (whic was made before with viosbr)
savevgstruct it will make a backup of a volume group structure
lsgcl show history, what comands have been run on the vio server (gcl: global comand log)
cfgdev devices are recognized after runnig cfgdev
cfgassist on vio server as padmin brings up smitty style menu for doing several tasks
chkdev -dev hdisk4 -verbose show if attached device can be migrated from physical adapter to virtual adapter (PHYS2VIRT_CAP.. -> yes)
chkdev -field NAME PHYS2VIRT_CAPABLE -fmt : show if disks can be used for vscsi (YES:yes, NO:no, NA:disk is already in use by VSCSI)
good overview of SEA sharing mode and adapters state:
entstat -all ent10 | grep -e " Priority" -e "Virtual Adapter" -e " State:" -e "High Availability Mode"
good overview of SEA and adapters VLAN id, MAC addres, Link status:
entstat -all ent10 | grep -e "(ent" -e "Type:" -e "Address:" -e "Link Status:" -e "Link State:" -e "Switch" -e " ent"
lsdev lists all devices
lsdev -slots lists I/O slot information for built-in adapters (those are not hot-pluggable but DLPAR capable)
lsdev -virtual lists virtual devices
lsdev -type disk -virtual lists virtual target devices (lists vscsi disks by the name what was given at mkvdev...-dev...)
lsdev -type adapter same as lsdev -Cc adapter
lsdev -dev vhost0 -vpd same as lscfg -vpl vhost0 in AIX (but on vio as padmin user lscfg does not work
lsdev -dev ent4 -attr shows attributes of the devices (same as lsattr -El ent4)
chdev -dev fscsi0 -attr fc_err_recov=fast_fail dyntrk=yes -perm changes the attributes (same as chdev -l fscsi0 -a fc_err_recov...)
lsmap -all lists all vscsi devices
lsmap -all -npiv lists npiv adapters (with slot numbers (aka adapter ID))
lsmap -all -net lists virtual ethernet adapters (with slot numbers (aka adapter ID))
lsmap -vadapter vhost0 shows infos about a specific vscsi adapter
lsmap -vadapter vfchost0 -npiv shows infos about a specific npiv adapter
lsmap -vadapter ent11 -net shows infos about a specific virtual ethernet device (with sea or physical devices will not work)
lsmap -all -field SVSA Physloc "Client Partition ID" VTD -fmt ":" lists vscsi details
lsmap -all -npiv -field Name Physloc ClntID ClntName Status "FC name" -fmt ":" lists npiv details
lsmap -all -vnic -field Name Physloc ClntID ClntName "Backing device" -fmt ":" lists vnic details
lsvg -lv rootvg same as lsvg -l rootvg
lspv shows all available hdisk devices
lspv -free shows hdisks which are free to be used as backing devices
lspv -size shows hdisks with sizes
mkvdev -vdev hdiskX -vadapter vhostX -dev <vtd_name> create mapping between vhost and disk (vscsi disk assignment to vio client)
mkvdev -vlan ent9 -tagid 200 creates a vlan tagged interface over the ent9 interface (ent9 can be a SEA adapter)
rmvdev -vtd <vtd> removing connection between virt. target dev. (a physical dev. or an lv) and the virtual SCSI adapter
(vtd can be found in lsmap output) (rmvdev -vdev <backing dev.> also works)
rmdev removes or unconfigures a device (rmvdev command can be replaced by rmdev, and rmdev is more universal)
rmdev -dev vhostX -recursive -ucfg put in defined state vhost adapter and its child devices (lsdev -dev vhostX -child)
(-recursive: do actions on childdren as well, -ucfg: put only in defined state, do not delete device)
rmdev -pdev vhost13 deletes only childern devices of the given parent device (pdev) (vhostX will be still in available state)
vfcmap -vadapter vfchostX -fcp fcsX mapping the virtual FC adapter to the VIO's physical FC
vfcmap -vadapter vfchostX -fcp remove mappings of given vfchost adapter
viosecure -firewall on -reload enable firewall with default config (enables: https, http, rmc,ssh, ftp...)
viosecure -firewall view display current firewall rules
license -swma once helped, when vio commands did not want to work
remote_management this command enables VIOS to be remotely managed by a NIM master
/usr/ios/cli/ioscli ioslevel run vios commands as root
viosvrcmd –m MSname –p VIOS1 –c "ioslevel" run vios commands from HMC CLI
------------------------------------
Info about virtual devices:
root@bb_lpar: /root # lscfg -l vscsi0
vscsi0 U8204.E8A.0680E95-V3-C2-T1 Virtual SCSI Client Adapter
8204.E8A <--managed system type/model that contains this partition
0680E95 <--serial number of the managed system
V3 <--partition id (on HMC LPAR id)
C3 <--slot number of this adapter (on HMC adapter id)
------------------------------------
mirroring vio server rootvg:
1. extendvg -f rootvg hdisk2 <--if pp limitation problem: chvg -factor 6 rootvg, then extendvg
2. mirrorios -defer hdisk2 <--mirror rootvg to hdisk2; -defer is used, as no need to reboot since VIOS 1.5 :)
(use the -f only if required, which will do a reboot without prompting you to continue)
3. bootlist -mode normal -ls <--checking bootlist
------------------------------------
Debugging VIO problems:
I. truss:
$ oem_setup_env
# truss /usr/ios/cli/ioscli <failing_padmin_command> (or truss -feal /usr/ios/cli/ioscli <failing_padmin_command>)
---------
II. CLI_DEBUG=33
By exporting CLI_DEBUG=33, we can see which AIX command is used in the background of VIO command. After running that AIX command we can get more info.
For example:
1. mkvdev -vdev hdiskpower1 -vadapter vhost0 -dev testdisk <--running this command gives not enough info about the problem
*******************************************************************************
The command's response was not recognized. This may or may not indicate a problem.
*******************************************************************************
2. export CLI_DEBUG=33 <--exporting CLI_DEBUg=33
3. mkvdev -vdev hdiskpower1 -vadapter vhost0 -dev testdisk <--running again, we can see which AIX command will be invoked
AIX: "lspv -l hdiskpower1 2>&1 | grep 0516-320"
AIX: "export LANG=C;/usr/sbin/pooladm -I pool querydisk /dev/hdiskpower1"
AIX: "/usr/sbin/lquerypv -V hdiskpower1"
AIX: "mkdev -V hdiskpower1 -p vhost0 -l testdisk " <--this command will be needed
*******************************************************************************
The command's response was not recognized. This may or may not indicate a problem.
*******************************************************************************
4.oem_setup_env <--enabling root environment
5. mkdev -V hdiskpower1 -p vhost0 -l testdisk <--running AIX command and it shows more detailed info
Method error (/usr/lib/methods/cfg_vt_scdisk):
0514-012 Cannot open a file or device.
The solution was in this case, that I forgot to set no_reserve for the given disk on the other VIOS. The other VIOS already used this disk (with reservation) that is why I could not configure here because it was locked.
------------------------------------
Creating a client LPAR via VIO server:
planned devices for client LPAR:
1 virtual Ethernet
2 SCSI:
-for virtual disk
-for virtual optical device (cd)
1. find out what will be the client partition id (on HMC), because it will be needed when creating adapters for the new client LPAR
2. on VIO server (HMC) create virtual server adapters:
- virtual Ethernet: for me it was enough for inter LPAR communicatio, so tagging is not needed (only remember PVID)
- virtual SCSI for hdisk and optical device (cd): here the planned client partition id should be set
3. on VIO server configure the devices and mappings, after that 'cfgdev':
-virtual Ethernet:
set ip: chdev -l en19 -a netaddr=10.10.10.26 -a netmask=255.255.255.0 -a state=up
-virtual SCSI for hdisk:
map disk for rootvg: mkvdev -vdev hdisk45 -vadapter vhost1 -dev bb_lpar_rootvg
-virtual optical device:
create a file backed optical device, for iso images: mkvdev -fbo -vadapter vhost1
copy the iso image to /var/vio/VMLibrary (lsrep)
load the image into the vtopt0 device: loadopt -vtd vtopt0 -disk dvd.1022A4_OBETA_710.iso (lsmap -all will show it)
4. create client LPAR on HMC:
partition id should be as planned (to match with the above created adapters)
set processor, memory... phyisical I/O is not needed
create virtual Ethernet and SCSI (it should be untagged as created on VIO Server with the same PVID)
create SCSI adapter: 1 is enough for disk and optical device
LHEA is not needed and other settings were not changed
5. activate profile
go into SMS -> choose cdrom -> install AIX
6. on the new client LPAR
set ip, hostname, routing...
set ip: chdev -l en0 -a netaddr=10.10.10.25 -a netmask=255.255.255.0 -a state=up
check ping from vio, then ssh is possible to new LPAR
------------------------------------
Network Time Protocol config:
1. vi /home/padmin/config/ntp.conf <--edit (or create) ntp.conf file as padmin (maybe root will need access to file as well)
content should look like this:
server ptbtime1.ptb.de
server ptbtime2.ptb.de
driftfile /home/padmin/config/ntp.drift
tracefile /home/padmin/config/ntp.trace
logfile /home/padmin/config/ntp.log
2. startnetsvc xntpd <--start xntpd daemon
3. cat /home/padmin/config/ntp.log <--check log for errors
if you see this:
time error 3637.530348 is way too large <--if difference between local and timeserver time is too large synchroniztaion cannot occur
4. chdate 1206093607 <--change clock manually
Thu Dec 6 09:36:16 CST 2007
5. cat /home/padmin/config/ntp.log: <--check log again
synchronized to 9.3.4.7, stratum=2
6. ps -ef | grep ntp <--it should show /home/padmin/config/ntp.conf (not /etc/ntp.conf)
root 4390928 2818268 0 14:46:11 - 0:00 /usr/sbin/xntpd -x -c /home/padmin/config/ntp.conf
------------------------------------
I/O hosting requires a hosting partition - boot not permitted
exit called ok
This happened with me when I created an AIX LPAR, but a VIO image was installed on the disk, where I wanted to boot from.
(When there is a mismatch between the LPAR type and the booting image this error will pop up....I guess.)