AIX LPAR and VIOS Complete Guide: Partitioning, Virtualisation, and Management
IBM POWER virtualisation is the gold standard for enterprise reliability. This guide covers everything from LPAR concepts to VIOS setup, live partition mobility, and daily administration -- with real commands for every task.
LPAR Architecture and Key Concepts
An LPAR (Logical Partition) is an isolated virtual machine running directly on IBM POWER hardware, managed by the hardware hypervisor (PHYP -- PowerVM). Unlike software hypervisors, POWER virtualisation is implemented in firmware, giving it near-bare-metal performance.
| Component | Role |
|---|---|
| POWER hardware | Physical server with POWER9/10 CPU |
| PHYP (hypervisor) | Firmware-level virtualisation layer |
| HMC | Hardware Management Console -- control plane for all LPARs |
| VIOS | Virtual I/O Server -- provides virtualised storage and network to client LPARs |
| Client LPAR | An AIX/Linux/IBM i partition consuming virtual resources |
Key Terminology
- Processing Unit (PU) -- one CPU core on the POWER chip
- Virtual Processor (VP) -- logical CPU presented to an LPAR
- Entitled Capacity (EC) -- guaranteed CPU share in shared processor pools (e.g., 0.5 = half a core)
- Processing Pool -- group of PUs shared among multiple LPARs
- Memory Page -- 4 KB standard, 16 MB huge pages for performance
LPAR Types: Dedicated, Shared, Micro
| Type | CPU Assignment | Best For |
|---|---|---|
| Dedicated | Whole cores pinned exclusively | Latency-sensitive, licensed-per-core software (Oracle DB) |
| Shared Uncapped | Entitled + can burst above entitlement | Variable workloads that can benefit from spare cycles |
| Shared Capped | Hard limit at entitled capacity | Controlled cost -- no unexpected CPU overuse |
| Micro-LPAR | As low as 0.05 of a core | Small workloads, test environments, cost optimisation |
Check LPAR Configuration from Within AIX
# Show all LPAR info (mode, entitled capacity, memory, etc.)
lparstat -i
# Real-time CPU and memory utilisation
lparstat 1 5 # 5 snapshots, 1 second apart
# Sample output:
# System configuration: type=Shared mode=Uncapped
# %user %sys %wait %idle physc %entc lbusy app vcsw phint
# 12.3 5.1 0.2 82.4 0.18 36.0 14.2 2.0 2847 0
# physc = physical cores consumed (0.18 here)
# %entc = % of entitlement used (36% here -- well within limits)
VIOS: What It Is and Why You Need It
VIOS (Virtual I/O Server) is a special AIX-based partition that acts as a broker between physical hardware (disk, network) and client LPARs. Without VIOS, each LPAR needs its own dedicated physical adapters -- extremely wasteful.
Physical Server
??? VIOS 1 (primary)
? ??? Physical FC HBA -> exposes vFC to clients via NPIV
? ??? Physical NIC -> shared as SEA (virtual switch)
? ??? Physical SAN LUNs -> mapped as vSCSI to clients
??? VIOS 2 (redundant -- always deploy in pairs)
? ??? Physical FC HBA (backup paths)
? ??? Physical NIC (SEA failover)
??? Client LPAR 1 (AIX production)
??? Client LPAR 2 (AIX DR)
??? Client LPAR 3 (Linux)
VIOS Initial Setup and Commands
# VIOS uses its own shell -- padmin user, ioscli commands
# Login as padmin, then use oem_setup_env for root access
# Show VIOS version
ioscli ioslevel
# List physical volumes on VIOS
ioscli lspv
# List all virtual SCSI mappings
ioscli lsmap -all
# Map a physical LUN to a client LPAR (vSCSI)
# First, create a virtual SCSI server adapter via HMC, then:
ioscli mkvdev -vdev hdisk2 -vadapter vhost0 -dev client_disk0
# Verify mapping
ioscli lsmap -vadapter vhost0
# List SEA (Shared Ethernet Adapters)
ioscli lsdev -type sea
# Show SEA statistics
ioscli entstat -all ent2 | head -40
VIOS Health Check Script
# Run on VIOS to get a quick health summary
echo "=== VIOS Level ===" && ioscli ioslevel
echo "=== Physical Disks ===" && ioscli lspv | head -20
echo "=== VSCSI Mappings ===" && ioscli lsmap -all | grep -E "(vhost|hdisk|Available)"
echo "=== SEA Status ===" && ioscli lsdev -type sea
echo "=== FC Adapters ===" && ioscli lsdev -type adapter | grep fcs
echo "=== VIOS Memory ===" && svmon -G | head -5
echo "=== Error Log (last 10) ===" && errpt | head -10
NPIV -- Virtual Fibre Channel
NPIV (N_Port ID Virtualisation) allows a single physical FC HBA on VIOS to present multiple virtual FC ports to client LPARs. Each client gets its own WWPN and connects directly to SAN storage -- no VIOS I/O proxy overhead.
# On VIOS -- list physical FC adapters
ioscli lsdev -type adapter | grep fcs
# Check FC adapter status and WWPN
ioscli lsdev -dev fcs0 -attr
# List virtual FC mappings (NPIV)
ioscli lsmap -all -npiv
# Create a virtual FC server adapter (usually done via HMC GUI)
# Then map it to a physical FC adapter on VIOS:
ioscli vfcmap -vadapter vfchost0 -fcp fcs0
# Verify
ioscli lsmap -vadapter vfchost0 -npiv
# On CLIENT LPAR -- after NPIV mapping:
# List virtual FC adapters
lsdev -Cc adapter | grep fcs
# Show WWPN of the virtual FC adapter
lscfg -vl fcs0 | grep "Network Address"
# -> This WWPN gets zoned on the SAN to allow LUN access
# Discover new SAN LUNs
cfgmgr -l fcs0
# List newly discovered disks
lspv | grep -v rootvg
SEA -- Shared Ethernet Adapter
SEA creates a virtual switch inside the POWER frame. VIOS bridges the physical NIC to a virtual switch (PVID/VLANs), and client LPARs get virtual NICs (veth) connected to that switch.
# On VIOS -- create SEA (usually done via HMC, but here's the CLI)
ioscli mkvdev -sea ent0 -vadapter ent3 -default ent3 -defaultid 1
# SEA with VLAN trunking
ioscli chdev -dev ent4 -attr trunk_adapters=ent3 vswitch=ETHERNET0
# Show SEA details
ioscli lsdev -dev ent4 -attr
# Monitor SEA throughput
ioscli entstat -all ent4 | grep -E "(Bytes|Packets|Error)"
SEA Failover -- Dual VIOS Redundancy
# SEA failover uses priority -- VIOS1 SEA priority 1 (primary),
# VIOS2 SEA priority 2 (standby). Automatic failover on VIOS1 loss.
# Check SEA HA state on each VIOS
ioscli lsdev -dev ent4 -attr ha_mode # should show "auto"
ioscli entstat ent4 | grep "Trunk Adapter"
Live Partition Mobility (LPM)
LPM migrates a running LPAR from one physical POWER server to another with zero downtime -- memory, CPU state, and network connections are all preserved. This is IBM's answer to VMware vMotion.
LPM Prerequisites
- Both source and destination managed by same HMC
- VIOS on both servers with matching virtual resources
- Shared storage (SAN) accessible from both servers -- OR active memory mirroring for inactive LPM
- Compatible POWER processor generation (POWER9->POWER9, or POWER9->POWER10 with compatibility mode)
- HMC version must support source and destination firmware levels
# Validate LPM readiness (run from HMC CLI)
migrlpar -o v -m source_server -t dest_server -p LPAR_NAME
# Perform live migration
migrlpar -o m -m source_server -t dest_server -p LPAR_NAME
# Monitor migration progress
migrlpar -o s -m source_server -p LPAR_NAME
Monitoring and Troubleshooting
CPU Entitlement Stealing
# If %entc regularly exceeds 100%, the LPAR is consuming more than its entitlement
# (only possible in Uncapped mode). Either increase entitlement or investigate runaway processes.
lparstat 1 10 | awk '{print $6}' # watch %entc column
# Find top CPU consumers
topas # interactive -- press 'A' for sorted by CPU
ps -eo pid,pcpu,pmem,comm --sort=-pcpu | head -15
Memory Pressure
# Check Active Memory Expansion (AME) ratio
lparstat -i | grep -i "memory"
# Virtual memory statistics
vmstat 1 5
# Check for memory balloon activity (DLPAR)
lparstat -i | grep -E "(Memory|Mem)"
# svmon -- detailed memory breakdown
svmon -G # global summary
svmon -P 12345 # per-process memory
VIOS Disk Mapping Issues
# Client LPAR sees vSCSI disk as "Defined" not "Available"
# On VIOS -- check if mapping is active
ioscli lsmap -all | grep -A3 "client_disk0"
# Rediscover from client LPAR
cfgmgr
# If still not found -- check VIOS vhost adapter
ioscli lsdev -dev vhost0
# Check SAN LUN visibility on VIOS
ioscli lspv | grep hdisk2 # should show "active"
ioscli lsattr -el hdisk2 | grep reserve_policy
Key Takeaways: POWER virtualisation (PHYP + VIOS) is hardware-level and outperforms software hypervisors for I/O-intensive enterprise workloads. Always use dual VIOS for redundancy. Use NPIV for storage, SEA for networking. Validate LPM readiness before your maintenance window -- not during it.
AIXLPARVIOSPowerVMIBM POWERVirtualisationEnterprise
0 Comments