POWERVM - VIOS INSTALL


VIO Install, Config (VIO Build)


These main steps will be followed:
- VIO Server creation on HMC
- VIO Server installation
- VIO Server configuration
- Network configuration (SEA, VLANs)
- Performance Tuning
- Additional things

-----------------------------------------------------------------

VIO Server creation on HMC 

CPU settings:
Shared, Uncapped weight: 255 (Proc. compatibility mode: Default)
Proc. Unit: min: 0.1, desired: 2,  max: number of CPUs in server (for smaller servers desired can be 1)
Virt. Proc: min: 1, desired: 6, max: number of CPUs in server (for smaller servers desired can be 3)

Memory settings:
min: 1 GB, Desired: 6 GB (it depends on how it will be utilized) max: 3x of desired

Adapters:
SAS RAID Adapter + USB + add only 1Gb Network to have correct device sequence later (after VIO install add 10Gb + FC adapter)

After VIO is created, in General Settings of VIO:
- Enable Mover Service Partition
- Enable Connection Monitoring (this is the connection between LPAR and HMC)
- Allow Perf. Information Collection

VIO IP address
Usually a 1GB adapter is used to login and install VIO, an IP address will be needed for that (it may need to be registered in DNS)

-----------------------------------------------------------------

VIO Server installation

There are more options for VIOS installation:
VIOS install from USB stick
VIOS install from HMC
VIOS install from NIM


VIOS install from USB stick: 
- Download ISO from IBM whose name contains the word flash
- Using software from Rufus (https://rufus.ie/) a bootable USB stick can be created
- After plug in USB stick in the Power server, and booting up VIOS LPAR, installation can be completed in HMC console


VIOS install from HMC
- Download DVD ISO from IBM
- Upload ISO images to HMC, using menu point on HMC: HMC Management --> Templates and OS Images
- During VIO activation on HMC, choose VIO install (takes more than an hour, at the end progress bar was hanging for 20 minutes)
- After installation completed accept License and close window


VIOS install from NIM

Prepare mksysb from ISO images:
- download DVD1 and DVD2 ISO images and copy to NIM
- mount ISO images: # loopmount -i dvdimage.v1.iso -o "-V cdrfs -o ro" -m /mnt2
- copy mksysb images from /usr/sys/inst.images to another directory (on Volume1 there are 2 mksysbs, on Volume 2 there is only one, during copy change name to avoid overwrite)
- combine 3 mksysb images into 1 (with command cat): # cat mksysb_image mksysb_image2 mksysb_image3 > vios2.2.3.4.mksysb

Create NIM resources and initiate restore:
- create mksysb res.: # nim -o define -t mksysb -a server=master -a location=/nim/mksysb/vios/gi_vios_2234.mksysb mksysb_gi_vios_2234
- create spot: # nim -o define -t spot -a server=master -a location=/export/spot -a source=mksysb_gi_vios_2234 spot_gi_vios_2234
- add VIOS IP to /etc/hosts (I used here newvio1 as a name)
- VIO NIM client: nim -o define -t standalone -a platform=chrp -a if1="find_net newvio1 0" -a netboot_kernel=64 -a connect=nimsh newvio1
- initiate restore: # nim -o bos_inst -a source=mksysb -a mksysb=mksysb_gi_vios_2234 -a spot=spot_gi_vios_2234 -a accept_licenses=yes -a no_client_boot=yes newvio1

SMS boot, configure IPs, restore mksysb....

-----------------------------------------------------------------

VIO Server configuration
(after installation is completed)

During first login:
give password for padmin:
accept conditions: a
oem_setup_env --> license -accept

Set IP and Hostname
# chdev -l en0 -a netaddr=172.23.88.67 -a netmask=255.255.254.0 -a state=up
# chdev -l inet0 -a route=0,172.23.88.1
# smitty hostname

Update VIO if needed:
# mount nimserver:/mgmt /mnt
$ updateios -accept -install -dev /mnt/VIO/VIO_3.1.0.10_Update
$ shutdown -restart
$ updateios -commit

Network files:
update resolv.conf with domain, search list and nameservers (root.staff, 644)
update netsvc.conf with "hosts = local, bind4" (root.system, 664)
update /etc/hosts with needed host entries

paging space:
(6 GB (remove: paging00 and  increase hd6 6GB, (12 pp with pp size 512MB))
# swapoff /dev/paging00
# rmps paging00
# chps -s 11 hd6

dump device
(set dump device: lv_dump00 (8 pp with pp size 512MB))
# lsvg -l rootvg
# sysdumpdev -l
# sysdumpdev -Pp /dev/sysdumpnull
# extendlv lg_dumplv 6
# chlv -n lv_dump00 lg_dumplv
# sysdumpdev -Pp /dev/lv_dump00

NTP
create missing files with touch:
$ ls -l /home/padmin/config
total 32
-rwxrw----    1 root     staff           730 Jan 06 06:46 ntp.conf
-rwxrw----    1 root     staff             9 Jul 01 2007  ntp.drift
-rwxrw----    1 root     staff             1 Jan 06 06:47 ntp.log
-rwxrw----    1 root     staff             1 Jan 06 06:47 ntp.trace

add missing things to ntp.conf:
# cat /home/padmin/config/ntp.conf:
server ntp.mydomain.com
driftfile /home/padmin/config/ntp.drift
tracefile /home/padmin/config/ntp.trace
logfile /home/padmin/config/ntp.log

uncomment  ntp line in /etc/rc.tcpip with vi:
start /usr/sbin/xntpd -a '-c /home/padmin/config/ntp.conf' "$src_running"

TZ (Time Zone)
# cat /etc/environment | grep TZ
TZ=Europe/Vienna

mirror rootvg
$ extendvg rootvg hdisk1
$ mirrorios -defer hdisk1
# bosboot -ad hdisk0
# bosboot -ad hdisk1

dumplv
We need 2 dumpdevices with correct name and size (one on hdisk0 one on hdisk1):
lv_dump00           sysdump    8       8       1
lv_dump01           sysdump    8       8       1

# mklv -t sysdump -y lv_dump01 rootvg 8  hdisk1; sysdumpdev -Ps /dev/lv_dump01

syslog
# vi /etc/syslog.conf
*.debug /var/log/messages  rotate size 1m files 10
auth.debug /var/log/auth.log  rotate size 1m files 10

# touch /var/log/messages; touch /var/log/auth.log; refresh -s syslogd

ssh key
Remove authorized_keys2 and create authorized_keys file with needed ssh pub key

add missing adapters
(make sure device name numbers are correct)
add 10GB network cards
add FC adapter

set recommended rules
$ rules -o diff -s -d (to view the differences between system and the recommended settings)
$ rules -o deploy -d (deploy the VIOS recommended default setting)

shutdown+activate LPAR
(make sure setting in profile are correct)
$ shutdown

-----------------------------------------------------------------

Network configuration:

In HMC Enhanced GUI Link aggregation and SEA can be fully configured there (no VIOS commands needed)
(this is good if adapter IDs are not important as we cannot specify those there)

Create LACP Etherchannel: 
Virtual Networks --> Link Aggr. Devices --> Add device (ieee8023ad)

Add virtual networks (VLANs)
(on HMC the Network Bridge means actually the SEA)
 Add a new VLAN: give a name, Bridged, 802.1Qtagging yes, then it will create a new Network Bridge (SEA): Bridge PVID 1, Large Send
When first VLAN is created an additional Virt. Network is also created automatically (with VLAN ID 1), it can be renamed if needed
Add additional VLANs

----------------------------------------
If manual configuration is needed in command line (dual VIOS setup):

Creating Virt. Eth. adapter on HMC (create as many as needed, then save in profile):
$ chhwres -r virtualio -m myp950 -p myvio01 -o a -s 100 --rsubtype eth -a "ieee_virtual_eth=1,port_vlan_id=4000,\"addl_vlan_ids=3029,1874\",is_trunk=1,trunk_priority=1"
$ chhwres -r virtualio -m myp950 -p myvio02 -o a -s 100 --rsubtype eth -a "ieee_virtual_eth=1,port_vlan_id=4000,\"addl_vlan_ids=3029,1874\",is_trunk=1,trunk_priority=2"
$ mksyscfg -r prof -m myp950 -p myvio01 -o save -n default --force
$ mksyscfg -r prof -m myp950 -p myvio02 -o save -n default --force

Creating Etherchannel (Link Aggregation, LACP) on VIOS: 
$ mkvdev -lnagg ent4 ent5 -attr mode=8023ad hash_mode=src_dst_port

Creating SEA on VIOS:
$ mkvdev -sea ent18 -vadapter ent12 ent14 ent16 ent17 -default ent12 -defaultid 4000 -attr ha_mode=auto
$ chdev -dev ent20 -attr ha_mode=sharing (first VIOS1 after VIOS2)
----------------------------------------

-----------------------------------------------------------------

Performance tuning:

increase buffers for Virt. Eth. adapters in SEA
chdev -l ent9 -a max_buf_huge=128 -P
chdev -l ent9 -a min_buf_huge=64 -P
chdev -l ent9 -a max_buf_large=128 -P
chdev -l ent9 -a min_buf_large=64 -P
chdev -l ent9 -a max_buf_medium=512 -P
chdev -l ent9 -a min_buf_medium=256 -P
chdev -l ent9 -a max_buf_small=4096 -P
chdev -l ent9 -a min_buf_small=2048 -P
chdev -l ent9 -a max_buf_tiny=4096 -P
chdev -l ent9 -a min_buf_tiny=2048 -P

same in 1 liner:
# chdev -l ent9 -a max_buf_huge=128 -P; chdev -l ent9 -a min_buf_huge=64 -P; chdev -l ent9 -a max_buf_large=128 -P; chdev -l ent9 -a min_buf_large=64 -P; chdev -l ent9 -a max_buf_medium=512 -P; chdev -l ent9 -a min_buf_medium=256 -P; chdev -l ent9 -a max_buf_small=4096 -P; chdev -l ent9 -a min_buf_small=2048 -P; chdev -l ent9 -a max_buf_tiny=4096 -P; chdev -l ent9 -a min_buf_tiny=2048 -P

largesend and large_receive
On VIO largesend was already turned on, and large_recieve was on "no", so this have to be changed to "yes" (online)
# chdev -l ent10 -a large_receive=yes

queue_depth for hdisks (if needed)
(num_cmd_elems for FC adapters should be already set by VIOS rules)
chdev -l hdiskX -a queue_depth=32 -P

-----------------------------------------------------------------

!!! Reboot!!!

-----------------------------------------------------------------

Additional things may needed:
- check LPAR profile (just to be sure config is OK)
- install additional device drivers
- install additional tools like rsync, screen, lsof...
- add VIO server to monitoring tool (like LPAR2RRD)
- set up crontab (for backup scripts ...)
- create a backup

-----------------------------------------------------------------

3 comments:

  1. chdev -l ent9 -a max_buf_huge=128 -a min_buf_huge=64 -a max_buf_large=128 -a min_buf_large=64 -a max_buf_medium=512 -a min_buf_medium=256 -a max_buf_small=4096 -a min_buf_small=2048 -a max_buf_tiny=4096 -a min_buf_tiny=2048 -P

    ReplyDelete