Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

POWERVC Quick Deployment Guide

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

POWERVC QUICK DEPLOYMENT GUIDE

1. Linux O.S Installation


1.1 Install Linux O.S - selecting English language and kdump.
1.2 While being asked for basic environment during installation, select
Basic Web Server.
1.3 For partition scheme, select LVM.

2. Basic Linux Tuning and Configuration


2.1 Increase swap space and add it in fstab file
# free -g
# cd /
# dd if=/dev/zero of=/swapfile bs=1024 count=7340032
# chmod 0600 /swapfile
# mkswap /swapfile
# swapon /swapfile
# cp /etc/fstab /etc/fstab.orig1
# echo "/swapfile swap swap defaults 0 0" >>/etc/fstab
# swapoff -a ; swapon -a ; free -g

2.2 Mount CD/DVD block device (if needed, since it could be a physical
DVD or a virtual DVD loaded from VIO VML)
# mkdir -p /media/rhel77dvd
# mount /dev/sr0 /media/rhel77dvd

2.3 Mount linux ISO image file


# mkdir -p /media/rhel77iso
# mount -o loop,ro <Location of the ISO> /media/rhel77iso
# cp /etc/fstab /etc/fstab.orig2
# echo "/home/rhel77 /media/rhel77iso iso9660 loop,ro 0 0" >> /etc/fstab

2.4 Configure YUM repository


# vi /etc/yum.repo/rhel-source.repo
[RHEL73-DVD]
Name=RHEL 7.3 DVD
baseurl=file:///media/rhel77iso
metadata_expire=-1
gpgcheck=1
enabled=1
gpgcheck=0
##EOF###
# yum repolist

2.5 Set SELinux policy to permissive


# vi /etc/sysconfig/selinux
[..]
SELINUX=permissive <=====
[..]
SELINUXTYPE=targeted
[..]
# sestatus
# setenforce 0
# getenforce 0

2.6 Disable RedHat firewall


# systemctl status firewalld
# systemctl stop firewalld
# systemctl disable firewalld
2.7 Configure host names in the /etc/hosts file by appending PowerVC
IP address resolution
# vi /etc/hosts
111.111.111.111 POWERVC_HOSTNAME

3. PowerVC software preparation, installation and initial login


3.1 Upload the pre-requisites RPMs to /software/prereq directory,
create a local repo for them and install them locally by yum
# createrepo /software/prereq
# yum localinstall /software/prereq/*

3.2 Install the PowerVC software and update to latest fix if applicable
# cd /POWERVC_SOFTWARE_INSTALL_DIR
# ./install -t
# ./install
# cd /POWERVC_SOFTWARE_UPDATE_DIR
# ./update

3.3 Login to PowerVC web interface


https://POWERVC_IP_ADDRESS
Username: root
Password: root's password
4. PowerVC environment management configuration
4.1 Add managed hosts to PowerVC
- Select "HMC" as Host management type.
- Select "New connection" from HMC connection type.
- Provide HMC IP address, username, password and a display name.
- Accept the HMC certificate if asked for, then click connect.
- Once accepted, you can choose some/all hosts to manage/add in PowerVC.

4.2 Add a SAN storage to PowerVC


- Select SAN type and provide IP address, username, password, display name and a port
number for managing this SAN type.
- Click connect to add.
** If using VIOS SSP, the PowerVC will detect it once HMC and hosts added.

4.3 Add a fabric to PowerVC


- Select fabric type and provide IP address, username, password and display name.
- Continue adding more fabrics until you have all fabrics needed in place.

4.4 Add a network


- Provide a name, VLAN as a type, SEA as a virtualization type and a VLAN ID as required.
- Provide subnet mask, GW, IP ranges pool if static IP address type is selected.
- Optionally (probably recommended in cloud environment) to set your primary and
secondary DNS.
- Once you added the network, PowerVC displays the VIO servers that have SEAs
configured with VLAN IDs along with the potential VIO servers supporting network
communication for LPARs deployed on this network.
5. PowerVC preparation to capture an image
5.1 Installing cloud-init on AIX LPAR to capture it
- You can always install it via YUM, by configuring YUM in the first place (if not already
configured):
# yum install cloud-init
- Or download a "Cloud Ready" AIX base media from ESS ( or SW download CNV08ML) with
cloud-init installed, install an LPAR with it then capture it.
- Or just proceed in manual installation with dependencies on a normal AIX LPAR so you can
capture it.

** If using VIOS SSP, you can do:


- In PowerVC storage tab (last tab), create a volume with a 20GB size.
- Once created the volume, you can see its unique Provider Volume Name, so you can
dump the downloaded ready image to the volume created:
# dd if=/var/vio/VMLibrary/AIX72_ready_image of=volume-AIXCloudVM-8c9ed2d1-
dc50.796e28cc2b8fab3a98c204eaf713c99d bs=1M
20480+0 records in.
20480+0 records out.
- In PowerVC image tab (second tab),create an image from volume by adding image name,
hypervisor type and O.S type.
- Select the volume you created (by pressing on Add volume button), choose Yes in boot
set then press create.
- In same PowerVC image tab (second tab), you will be able to deploy your new image.

5.2 Cloud-init configuration instructions


- Open the /opt/freeware/etc/cloud/cloud.cfg file.
- Recommended to remove the line containing: " - update_hostname" if not, every new
deployed LPAR will have the hostname of the image.

- If you want to capture a non-rootvg volume, you need to create and run the following
script inside the cloud-init home (/opt/freeware/etc/cloud)
Each time before you capture the machine.
- This script is included in the RPM source:
---SCRIPT__START---
#!/usr/bin/sh
#############
# Save disk mappings to be restored during deploy
# Each line of the mapping file contains "<vgname> <pvid>" as output by the lspv
command.
#############
CLOUD_DIR="/etc/cloud"
PVID_VG_MAPPING_FILE="$CLOUD_DIR/pvid_to_vg_mappings"
if [ ! -d "$CLOUD_DIR" ]
then
/usr/bin/mkdir -p $CLOUD_DIR
fi
LANG=C; /usr/sbin/lspv | /usr/bin/awk '{if ($2 != "none" && $3 != "rootvg") print $3 " "
$2}' > $PVID_VG_MAPPING_FILE
###SCRIPT__END###

- You then shutdown the machine and start the capturing procedure from PowerVC.
- During the deployment, cloud-init modifies the /etc/resolv.conf file and added a line
“search localdomain” which might cause issues for the machine.
- For that reason, a custom script can be used as a post deployment script
---SCRIPT__START---
#!/usr/bin/ksh
cat /etc/resolv.conf | grep -v "localdomain" > /etc/resolv.conf
result=`wc -l /etc/resolv.conf | awk '{print $1}'`
if [[ $result -eq 0 ]];then
rm /etc/resolv.conf
fi
---SCRIPT__END---

Ahmed (Mash) )Mashhour


Thanks for reading through this guide, if you found any issues
or inconsistencies, please email me at:
ahdmashr@eg.ibm.com
icemashhour@yahoo.com

You might also like