Wednesday, 22 June 2016

HMC Tips

HMC Tips from http://www.unixmantra.com ..I have reposted here as to benefit larger audience as I found it useful.
Thanks Ramesh for this good one.
=========================================================================================================
HMC Tips I - HMC and Managed System

1. To enable ssh in a hmc :
# chhmc -c ssh -s enable
You can disable it by replacing the word 'enable' with 'disable'

2. To enable xntp in a hmc :
# chhmc -c xntp -s enable
You can disable it by replacing the word 'enable' with 'disable'

3. To add an entry in the syslog config file :
# chhmc -c syslog -s add -a IP_Addr ( or '-h host_name' )
You can remove an entry by replacing the word 'add' with 'remove'

4. To add an entry in the ntp config file :
# chhmc -c xntp -s add -a IP_Addr ( or 'h host_name' )
You can remove an entry by replacing the word 'add' with 'remove'

5. To configure the network as a startup device :
# chhmc -c netboot -s enable
You can disable it by replacing the word 'enable' with 'disable'

6. To permit IP addresses from utilizing HMC services :
# chhmc -s ssh ( or any_service) -s add -a IP_Addr
You can remove an entry by replacing the word 'add' with 'remove'

7. To add a DNC_server or domain_suffix :
chhmc -c network -s add [-ns DNS_Server] [-ds domain_suffix ]
You can remove an entry by replacing the word 'add' with 'remove'

8. To change network settings for a specific network interface :
# chhmc -c network -s modify -i interface_name
[-a IP_Addr] [-nm network_mask] [ --lparcomm on|off]
Note: Network settings for the s10 interface cannot be changed.

9. To change other network settings :
# chhmc -c network -s modify [-h hostname] [-d network-domain-name][-g gateway]

10. To change the locale for the HMC :
# chhmc -c locale -s modify -l locale

11. To change the HMC date and time, time zone :
# chhmc -c date -s modify[ --datetime ][ --clock {local | utc} ] [ --timezone {time-zone | none} ]
=========================================================================================================

HMC Tips II - Partitions and Profiles

1. To list all machines configured in a hmc
# lssyscfg -r sys

2. To list all lpars(partitions) in a power machine
# lssyscfg -r lpar -m Managed_System

3. To activate/start an LPAR :
# chsysstate -r lpar -m Managed_System -o on -n LPAR_Name -f Profile_ name

4. To deactivate/shutdown an LPAR :
# chsysstate -r lpar -m Managed_System -o shutdown --immed -n LPAR_Name

5. To open the console of a partition :
# mkvterm -m Managed_System -p LPAR_Name

6. To close the console of a partition:
# rmvterm -m Managed_System -p LPAR_Name

7. To list the profile of a partition:
# lssyscfg -r prof -m Managed_System --filter "lpar_names=LPAR_Name,profile_names=Profile_Name"

8. To change the min/desired/maximum memory settings of a partition profile :
# chsyscfg -r prof -m Managed_System -i "name=Profile_Name,lpar_name=LPAR_Name,min_mem=512,desired_mem=19456,max_mem=20480"

9. To change the min/desired/maximum processor units of a partition profile :
# chsyscfg -r prof -m Managed_System -i

"name=Profile_Name,lpar_name=LPAR_Name,min_proc_units=0.2,desired_proc_units=0.5,max_proc_units=2.0"

10. To change the min/desired/maximum virtual processor of a partition profile :
# chsyscfg -r prof -m Managed_System -i "name=Profile_Name,lpar_name=LPAR_Name,min_procs=1,desired_procs=2,max_procs=6"

11. To change capped/uncapped setting in a partition profile :
# chsyscfg -r prof -m Managed_System -i "name=Profile_Name,lpar_name=LPAR_Name,sharing_mode=uncap,uncap_weight=128"

Possible values for sharing_mode are cap and uncap.
Possible values for uncap_weight are from 0 to 128.

12. To change the name of a partition profile :
# chsyscfg -r prof -m Managed_System -i "name=Profile_Name,lpar_name=LPAR_Name,new_name=New_Profile_Name"

13. To change the name of a partition :
# chsyscfg -r lpar -m Managed_System -i "name=LPAR_Name,new_name=New_LPAR_Name"

14. To change the default profile of a partition :
# chsyscfg -r lpar -m Managed_System -i "name=LPAR_Name,default_profile=Partition_Profile_Name"

15. To set "power off the machine after all partitions are shutdown" for a power machine :
# chsysscfg -r sys -m Managed_System -i "power_off_policy=0"

Possible values are

0 -> Power off after all partitions are shutdown
1 -> Do not power off after all partitions are shutdown

16. To rename a system profile :
# chsyscfg -r sysprof -m Managed_System -i "name=Sys_Prof_Name,new_name=New_Sys_Prof_Name"

17. To add 2 more partition profiles to a system profile :
# chsyscfg -r sysprof -m Managed_System -i "name=,"lpar_names+=partition3,partition4",
"profile_names+=profile3,profile4""
==============================================================================================================

HMC Tips III - User Management

1. To list all users in a HMC
# lshmcusr

2. To list only user names and managed resource roles for all HMC users :
# lshmcusr -F name:resourcerole

3. To create a user :
# mkhmcusr -u User_Id -a ROLE -d DESCRIPTION --passwd PASSWORD -M PASSWD_EXPIRATION_DAYS

3. To remove a user :
# rmhmcusr -u USER_NAME

4. To change an hmc user's password :
# chhmcusr -u User_Name -t passwd -v New_Password

5. To change the task role for the user "user1" to hmcoperator :
# chhmcusr -r user1 -t taskrole -v hmcoperator

Available task roles are
hmcsuperadmin, hmcoperator, hmcviewer, hmcpe, hmcservicerep or a user defined task role

6. To list all managed resource objects :
# lsaccfg -t resource

7. To list all managed resource roles :
# lsaccfg -t resourcerole

8. To create a task role using a config file :
# mkaccfg -t resourcerole -f /tmp/fil1

9. To create a task role :
# mkaccfg -t taskrole -i "name=tr1,parent=hmcsuperadmin,"resources=cec:chcod+lscod+lshwres,lpar:chssyscfg+lssyscfg+mksyscfg""

10. To change a task role :
# chaccfg -t taskrole -i "name=tr1,"resources=cec:chhwres+chsysstate,lpar:chssyscfg+chled+chhwres""

11. To remove a task role :
# rmaccfg -t taskrole -n tr1
=========================================================================================================

HMC Tips IV - Backup

1. To backup HMC data on DVD :
# bkconsdata -r dvd

2. To backup HMC data to a ftp server :
# bkconsdata -r ftp -h ftp_server_name -u ftp_username --passwd ftp_password

3. To backup HMC data to a NFS mounted file system :
# bkconsdata -r nfs -n nfs_server_name -l Nfs_mount_point

4. To list storage media devices :
# lsmediadev

5. To backup profile data for a managed system :
# bkprofdata -m Managed-System -f File_name

Profile data files are kept under /var/hsc/profiles/Managed-Machine-Serial-Number

6. To restore a managed profile data :
# rstprofdata -m Managed-System -l restore_type -f File-Name
Valid restore types are
1 - Full restore from the backup file.

2 - Merge the current profile data and backup profile data, with priority to backup.

3 - Merge the current profile data and backup profile data, with priority to current data.

4 - Initialize the profile data. All partition, partition/system profiles will be deleted.
============================================================================================

HMC Tips VII - General Terms

1. What is the maximum number of servers managed by HMC ?
> Maximum of 48 non-590-595 servers
> Maximum of 32 590/595 servers

2. What is the maximum number of LPARs supported by a HMC ?
> Maximum of 254 LPARs

3. How many HMCs can manage a server at one time ?
> You can have a maximum of 2 HMCs manage a server at one time

4. What are the different types of dynamic operations you can do with CPU, Memory and I/O Adapter on a LPAR ?
> Add
> Remove
> Move

5. How do we connect the HMC to power machines ?
For Power-4 machines, we connect the hmc using serial cables.
But for Power-5 machines, HMC connects to service processors via SSL-encrypted Ethernet, replacing the serial cables.

6. Do we have firewall configured in HMC ?
Yes. Each network card has an integrated firewall.

7. Do we need to configure DHCP in HMC ?
HMC may be a DHCP server for entry and mid-range servers.
But for high-end servers like P595, HMC must be a DHCP server

8. can we have the same HMC to manage P4 and P5 machines ?
POWER5 HMCs cannot manage POWER4 servers, and vice versa.

9. Can we have the existing P4 HMCs upgraded to support P5 machines ?
Yes. We can. This involves a complete overwirte of the disk and the loss of all previous configuration including user profiles.

10. What to do incase of disk failure in HMC ?
We can restore the HMC using recovery CD.
Then restore the latest Critical consule data backup which will restore the profiles, user ids, passwords, etc..

11. What is the default user id and password for the HMC ?
When the HMC is powered on the first time, login as hscroot and password can be taken from vendor.

12. Can we manage a power machine without a HMC ?
Yes. We can run a server in manufacturing default mode, will all resources but no logical partitionings, CoD or Service Focal

point,etc..For entry level server, we can use the Integrated Virtualization Manager.

13. What is the network critetia for dual HMC connection ?
Dual HMCs require two different private networks.

14. What is the default service processor IP address in Power-5 Machines ?
Eth0 - HMC1 - 192.168.2.147 / 255.255.255.0
Eth1 - HMC2 - 192.168.3.147 / 255.255.255.0

15. What is the default user id and password for accessing service processor ?
User id - admin
Password - Take this from vendor

16. Do we need a HMC for p5 model servers ?
One HMC is mandatory for 590, 595 or 575.
Dual HMC are recommended.

17. Do we need private network for HMc connectivity for p5-595 ?
One private network is mandatory for p5 590,595 or 575.

18. Can we have IVM support multiple servers ?
One IVM allowed per server and it only manages partitions on one server.

19. What does FSP (Flexible Service Processor) has ?
FSP has
a. Operating System
b. UserIds / Passwords
c. Filesystem
d. Networking
e. Firewall
f. Webserver
g. ASMI
h. Firmware

20. What to do if you forgot the admin password for FSP ?
If you do not know the admin password, place a hardware call to get 'celogin'

21. What to do if you forgot the HMC hostname/ipaddress for a long running LPAR ?
You can always get the HMC IPaddress from a LPAR if we have performed "handshake" with the HMC.

Issue the below command to get the HMC IPAddress
# lsrsrc IBM.ManagementServer
Resource Persistent Attributes for IBM.ManagementServer
resource 1:
Name = "169.121.54.48"
Hostname = "169.121.54.48"
ManagerType = "HMC"
LocalHostname = "169.121.54.59"
ClusterTM = "9078-160"
ClusterSNum = ""
ActivePeerDomain = ""
NodeNameList = {"SAP-PRodServer"}

22. One HMC should be within 8metres of Managed Server (Recommended configuration)

23. Each FSP Ethernet port should be connected to only one HMC

============================================================================================


No comments:

Post a Comment