HMC commands for common tasks

 

To find out which partitions are active

lssyscfg -r lpar -m "managed system name - eg node1_p520"

 

To add a managed system or frame to the HMC

mksysconn --ip "ip-address"

 

To shut down a partition

chsysstate -r lpar -m "managed system name - eg node1_p520" -n "name - eg client1"

 

To activate a server to partition standby

chsysstate -r sys -o onstandby -m "managed system name - eg node1_p520"

 

To view the MAC addresses of virtual ethernet adapters

1. Run lssyscfg -r sys -F name command to get all system names attached to the HMC.
2. Run lshwres -r virtualio --rsubtype eth --level lpar -m <System-Name> -F lpar_name,mac_addr which lists all logical partitions and the MAC addresses of the virtual Ethernet adapters per LPAR.

Note that the output of the command shows one line per LPAR per virtual LAN adapter (e.g. two lines for a LPAR which has two defined virtual Etherent adapter).

hscroot@hmc1:~> lssyscfg -r sys -F name
p550-2
p550-1
hscroot@pr-hmc1:~> lshwres -r virtualio --rsubtype eth --level lpar -m 550-2 -F lpar_name,mac_addr
vio1,51BA00002002
tsm1,51BA00003006
proderp1,51BA00004002
testerp2,51BA00005003
hscroot@hmc1:~>

 

To reboot a HMC

hmcshutdown -t now -r

 

To shutdown a HMC

hmcshutdown -t now