Configuring APA on a HPVM host

Hy,

I just recently configured APA on my HPVM host, it was quite easy process.

I have 4 cabled gigabit nics, and 4 virtual machines, so I am going to create 2 port agregattes with 2 nics each, then I will create one virtual switch with each port aggregate.

The first things you have to check are:

Are your nic cards supported:
http://docs.hp.com/en/J4240-90046/ch02s01.html#v700443

Is your switch supported:
http://docs.hp.com/en/J4240-90046/ch02s01.html#v700443

What are your switches trunk modes ?, you have to ask your lan admin.

Once I had my info a started the install:
swinstalled my product from DvD J4240AA

wopper:/root# swinstall -x autoreboot=true -s /mnt J4240AA

======= 07/31/08 15:16:48 METDST BEGIN swinstall SESSION
(non-interactive) (jobid=wopper-0202)

* Session started for user "root@wopper".

* Beginning Selection
* Target connection succeeded for "wopper:/".
* "wopper:/mnt": Cannot open the logfile on this target or
source. Possibly the media is read-only or there is a
permission problem. Check the daemon logfile and
"/var/tmp/swagent.log" on this host for more information.
NOTE: The software specified contains a kernel fileset or a
dynamic_module fileset. The kernel will be modified, and if
necessary the system will be rebooted.
* Source: /mnt
* Targets: wopper:/
* Software selections:
J4240AA,r=B.11.23.20,a=HP-UX_B.11.23_IA/PA,v=HP
+ FEATURE11i,r=B.11.23.0706.063,a=HP-UX_B.11.23_IA/PA,v=HP
HP-APA-FMT.APA-FORMAT,r=B.11.23.20,a=HP-UX_B.11.23_IA/PA,v=HP,fr=B.11.23.20,fa=HP-UX_B.11.23_IA
HP-APA-KRN.APA-KRN,r=B.11.23.20,a=HP-UX_B.11.23_IA/PA,v=HP,fr=B.11.23.20,fa=HP-UX_B.11.23_IA
HP-APA-LM.APA-LM,r=B.11.23.20,a=HP-UX_B.11.23_IA/PA,v=HP,fr=B.11.23.20,fa=HP-UX_B.11.23_IA
HP-APA-RUN.APA-INIT,r=B.11.23.20,a=HP-UX_B.11.23_IA/PA,v=HP,fr=B.11.23.20,fa=HP-UX_B.11.23_IA
HP-APA-RUN.APA-RUN,r=B.11.23.20,a=HP-UX_B.11.23_IA/PA,v=HP,fr=B.11.23.20,fa=HP-UX_B.11.23_IA
HP-APA-SAM.SAM-APA,r=B.11.23.20,a=HP-UX_B.11.23_IA/PA,v=HP,fr=B.11.23.20,fa=HP-UX_B.11.23_IA
+ PHKL_31500.CORE2-KRN,r=1.0,a=HP-UX_B.11.23_IA/PA,v=HP,fr=1.0,fa=HP-UX_B.11.23_IA
+ PHKL_31500.LAN2-KRN,r=1.0,a=HP-UX_B.11.23_IA/PA,v=HP,fr=1.0,fa=HP-UX_B.11.23_IA
* A "+" indicates an automatic selection due to dependency or
the automatic selection of a patch or reference bundle.
* Selection succeeded.

Once the server is up, you can see our inital state, lan1 for the host
and from 2 to 5 for the guests:

wopper:/etc/rc.config.d# lanscan
Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI
Path Address In# State NamePPA ID Type Support Mjr#
9/0/1/1/0/6/0 0x001E0B8362E4 0 UP lan0 snap0 1 ETHER Yes 119
9/0/1/1/0/6/1 0x001E0B8362E5 1 UP lan1 snap1 2 ETHER Yes 119
9/0/2/1/0/6/0 0x001A4B0AC189 2 UP lan2 snap2 3 ETHER Yes 119
9/0/4/1/0/6/0 0x001A4B0AC188 3 UP lan3 snap3 4 ETHER Yes 119
9/0/12/1/0/6/0 0x001A4B0AC1AF 4 UP lan4 snap4 5 ETHER Yes 119
9/0/13/1/0/6/0 0x001A4B0AC179 5 UP lan5 snap5 6 ETHER Yes 119
LinkAgg0 0x000000000000 900 DOWN lan900 snap900 9 ETHER Yes 119
LinkAgg1 0x000000000000 901 DOWN lan901 snap901 10 ETHER Yes 119
LinkAgg2 0x000000000000 902 DOWN lan902 snap902 11 ETHER Yes 119
LinkAgg3 0x000000000000 903 DOWN lan903 snap903 12 ETHER Yes 119
LinkAgg4 0x000000000000 904 DOWN lan904 snap904 13 ETHER Yes 119

First I configure the hp_apaconf file, creating lan900 with nics 2 and 3 and lan 901 with 4 and 5, the load balancing I choose is mac, that its recommomended for server to switch, if you need another config:
http://docs.hp.com/en/J4240-90046/ch03s01.html

wopper:/etc/rc.config.d#cat hp_apaconf
# End of hp_apaconf configuration file
HP_APA_INTERFACE_NAME[0]=lan900
HP_APA_LOAD_BALANCE_MODE[0]=LB_MAC
HP_APA_HOT_STANDBY[0]=off
HP_APA_GROUP_CAPABILITY[0]=900
HP_APA_KEY[0]=
HP_APA_MANUAL_LA[0]=2,3

HP_APA_INTERFACE_NAME[1]=lan901
HP_APA_LOAD_BALANCE_MODE[1]=LB_MAC
HP_APA_HOT_STANDBY[1]=off
HP_APA_GROUP_CAPABILITY[1]=901
HP_APA_KEY[1]=
HP_APA_MANUAL_LA[1]=4,5

HP_APA_USE_SYSLOG 1
wopper:/etc/rc.config.d#

The we go to the next file, ports config, here we configure the trunking mode of the port, in my case it had to be manual(default), because thats how the switches where configured, group capability the same as the nic aggreg name, and priority all the same

wopper:/etc/rc.config.d# cat hp_apaportconf
HP_APAPORT_INTERFACE_NAME[0]=lan2
HP_APAPORT_GROUP_CAPABILITY[0]=900
HP_APAPORT_PRIORITY[0]=0
HP_APAPORT_KEY[0]=
HP_APAPORT_SYSTEM_PRIORITY[0]=0
HP_APAPORT_COLLECT_MAX_DELAY[0]=
HP_APAPORT_CONFIG_MODE[0]=MANUAL

HP_APAPORT_INTERFACE_NAME[1]=lan3
HP_APAPORT_GROUP_CAPABILITY[1]=900
HP_APAPORT_PRIORITY[1]=0
HP_APAPORT_KEY[1]=
HP_APAPORT_SYSTEM_PRIORITY[1]=0
HP_APAPORT_COLLECT_MAX_DELAY[1]=
HP_APAPORT_CONFIG_MODE[1]=MANUAL

HP_APAPORT_INTERFACE_NAME[2]=lan5
HP_APAPORT_GROUP_CAPABILITY[2]=901
HP_APAPORT_PRIORITY[2]=0
HP_APAPORT_KEY[2]=
HP_APAPORT_SYSTEM_PRIORITY[2]=0
HP_APAPORT_COLLECT_MAX_DELAY[2]=
HP_APAPORT_CONFIG_MODE[2]=MANUAL

HP_APAPORT_INTERFACE_NAME[2]=lan4
HP_APAPORT_GROUP_CAPABILITY[2]=901
HP_APAPORT_PRIORITY[2]=0
HP_APAPORT_KEY[2]=
HP_APAPORT_SYSTEM_PRIORITY[2]=0
HP_APAPORT_COLLECT_MAX_DELAY[2]=
HP_APAPORT_CONFIG_MODE[2]=MANUAL

now we are ready to start APA, first remember to stop all your virtual switches before you start it, otherwise you will get and error.

wopper:/sbin/init.d# ./hpapa start

wopper:/sbin/init.d# lanscan
Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI
Path Address In# State NamePPA ID Type Support Mjr#
9/0/1/1/0/6/0 0x001E0B8362E4 0 UP lan0 snap0 1 ETHER Yes 119
9/0/1/1/0/6/1 0x001E0B8362E5 1 UP lan1 snap1 2 ETHER Yes 119
LinkAgg0 0x001A4B0AC189 900 UP lan900 snap900 9 ETHER Yes 119
LinkAgg1 0x001A4B0AC1AF 901 UP lan901 snap901 10 ETHER Yes 119

you can see both APA interfaces up.

Port distribution:

wopper:/sbin/init.d# lanscan -q
0
1
900 2 3
901 4 5

wopper:/sbin/init.d# lanadmin -x -i 901
Link Aggregate PPA # : 901
Link Aggregation Mode : MANUAL
Load Balance Mode : MAC Address based (LB_MAC)
Active Ports PPA # : 4 5
Port(s) not ready : NONE

wopper:/sbin/init.d# lanadmin -x -i 900
Link Aggregate PPA # : 900
Link Aggregation Mode : MANUAL
Load Balance Mode : MAC Address based (LB_MAC)
Active Ports PPA # : 2 3
Port(s) not ready : NONE

For more info on lanadmin commands:

http://docs.hp.com/en/J4240-90046/ch04.html

Once we have this working we can configure our virtual switches with apa working, coming soon.