AIX - HMC
Commands
Interaction
Start console on a partition:
Kill console terminal:
Boot partition to SMS menu:
Stop partition:
Save profile:
Information
Display HMC managed frame:
Display partition list:
Display info of a partition:
List virtual adapters of a partition:
List detail of VSCSI adapters of a partition:
List detail of FC adapters of a partition:
Display state of a partition:
Display profile name of one or all partitions:
lssyscfg -m {frame} -r prof --filter lpar_names={vioc|s} | cut -d, -f1
lssyscfg -m {frame} -r prof | cut -d, -f1,2
List NPIV WWN of a partition:
lshwres -m {frame} -r virtualio --rsubtype fc --filter lpar_names={vioc} --level lpar -F lpar_name,slot_num,wwpns --header
Creation
Create virtual SCSI adapter:
chhwres -m {frame} -r virtualio --rsubtype scsi -a "adapter_type=server,remote_lpar_name={vioc},remote_slot_num=3" -o a -p {vios} -s 149
Add virtual SCSI adapter in profile:
chsyscfg -m {frame} -r prof -i lpar_name={vioc},name=default_profile,"virtual_scsi_adapters+={adapter id}/client//{vios}/{remote adapter id}/0"
Create profile:
mksyscfg -m {frame} -r lpar -i name=vioc_name,profile_name=default_profile,lpar_env=aixlinux,min_mem=1024,desired_mem=8192 ,max_mem=24576,proc_mode=shared,desired_procs=1,min_procs=1,max_procs=64,min_proc_units=0.1,desired_proc_units=0.3,max_proc_units=64,sharing_mode=uncap,uncap_weight=128,boot_mode=norm
Deletion
Delete partition:
Delete Virtual SCSI adapter:
Delete Virtual FC adapter:
API
Login to HMC
Create file with HMC credentials:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<LogonRequest xmlns="http://www.ibm.com/xmlns/systems/power/firmware/web/mc/2012_10/" schemaVersion="V1_0">
<UserID>hscroot</UserID>
<Password>@password</Password>
</LogonRequest>
Run this command to login:
curl -i -X PUT -k \
-c cookies.txt \
-H "Content-Type: application/vnd.ibm.powervm.web+xml; type=LogonRequest" \
-H "Accept: application/vnd.ibm.powervm.web+xml; type=LogonResponse" \
-H "X-Audit-Memento: hmc_test" \
-d @login.xml https://hmc.local.net:12443/rest/api/web/Logon
Requests
Get managed system:
curl -X GET -k \
-c cookies.txt \
-b cookies.txt \
-H "Accept: application/atom+xml; charset=UTF-8" \
https://hmc.local.net:12443/rest/api/uom/ManagedSystem
Procedures
NPIV Card
Test NPIV card:
Activate NPIV card: