Sponsored Content
Operating Systems AIX Automation of AIX LPARs reboot Post 302851079 by ibmtech on Friday 6th of September 2013 03:44:56 PM
Old 09-06-2013
Basic thumb rule, be there for these kind of activities.
in order to achieve that, you need to determine which server you will use as a launching pad for those commands? (I had used NIM a couple of years ago, but for an entirely different purpose).

Once you sort out which server you will use (say NIM server using your own userID), now you have to do exchange the ssh keys between NIM server and HMC (anyone HMC is fine).
Say for example on NIM you want to use your userID to connect to hscroot at HMC, you need to generate a ssh-key pair for your user ID on NIM. (It's a little tricky to set up SSH keys on HMC, search it you will find a procedure from IBM).
Test the connection from you NIM server.

I am not writing the entire script, but giving you the exact commands to stop and start the LPAR.
to stop a LPAR run,
Code:
ssh <username>@hmcX "chsysstate -r lpar -m <Manage System Name> -n <LPAR Name> -o shutdown"

Where, username is user on HMC (could be hscroot, you etc..,). Remember to enclose the actual command in quotation ("), same with start command.
If you don't do a ssh-key exchange it will ask for user password on HMC (it is not always required that you have hscroot access, some shops go by individual names and don't disclose hscroot password). This will nullify your automation.

Say you have 2 or 3 systems, I recommend you add 'sleep' of atleast for 3-4 minutes between each shutdown.

To start the LPAR run this
Code:
ssh <username>@hmcX "chsysstate -r lpar -m <Manage System Name> -n <LPAR Name> -f <LPAR_profile> -o on"

Here we add the LPAR_profile, because you need to know which profile it has to boot from (generally it will be LPARname_default) but make sure you use the correct profile.

You can write a simple script or a complex script to achieve the above and tune it to death, upto you.

Note: I don't recommend you using the automation process, imagine while adding a cronjob you miss'up with month to week or day or worst minute and it goes down every three minutes.

Also, the worst case scenario, because of some weird reason, the system isn't going down smoothly.

Many factors to ponder upon, and if you use it, use at your sole discretion.
 

10 More Discussions You Might Find Interesting

1. AIX

Is fsck executed during reboot for AIX?

Dear Gurus, I would like to know if fsck is executed automatically during reboot for AIX? Is there any logs which I can refer to? or any documentation reference for this? Thank You. (2 Replies)
Discussion started by: cteoh88
2 Replies

2. AIX

If the AIX need reboot after install fix pack or APAR?

After install fix pack or APAR, if aix need reboot? if not, do we need stop database and all applications before we install fix pack or APAR? (3 Replies)
Discussion started by: rainbow_bean
3 Replies

3. Shell Programming and Scripting

Help with restarting of application with reboot of AIX server

Hi, We have hosted our application on AIX server. The problem is that we have to start our application manually once the server is rebooted. Please guide me in writing a script that does this job automatically with the re-start of the server. I'm looking for something like windows services in... (2 Replies)
Discussion started by: himanshu397
2 Replies

4. AIX

Finding Root cause of AIX server reboot itself

Hi, please explain that how to find the rootcause of aix servers reboot itself. Which log or commands should be used to analyse the reboot incident? Please explain in detail. (3 Replies)
Discussion started by: cyberkingjk
3 Replies

5. AIX

Post mortem for critical Production AIX System Reboot/Crash

Hello All, Critical AIX production box crashed/rebooted while our team is working on it and we need to generate a detailed report for that, below are few questions that need to be included in the report. (We are System Administration team and everyone in our team has root access via sudo as well... (3 Replies)
Discussion started by: lovesaikrishna
3 Replies

6. AIX

Creating LPARS in AIX

Hi, I have a p520 with 2 cpus and 10gb of ram.Is it sufficient enough to create 2 lpars.What other things we have to check. (2 Replies)
Discussion started by: sekar52
2 Replies

7. AIX

Loading AIX kernel extensions on reboot

Greetings, Does anyone know how to load AIX kernel extensions on reboot? I know that Oracle loads it's postwait kernel extension via a executable in /etc/inittab. I'm assuming this executable calls the "sysconfig" system call and loads it. What if I wrote my own? What is the proper way in AIX to... (3 Replies)
Discussion started by: jbleistein
3 Replies

8. AIX

Is it must to enable TCB on AIX LPARs ?

Hi, I've verified my AIX 7.1 LPAR , and TCB is disabled by default. #odmget -q attribute=TCB_STATE PdAt PdAt: uniquetype = "" attribute = "TCB_STATE" deflt = "tcb_disabled" values = "" width = "" type = "" generic = "" ... (3 Replies)
Discussion started by: System Admin 77
3 Replies

9. AIX

How can we re-mount the RAM disk automatically after the reboot on AIX?

Hi All, I was trying to know more about RAM disk concept in AIX. I found something on IBM site. I was able to create and use/delete RAM disk as per IBM instructions. But as you guys know, this RAM disk is a temporary storage. (*when ever we reboot the AIX LPAR, content/RAM disk will be... (4 Replies)
Discussion started by: System Admin 77
4 Replies

10. AIX

Changing VLAN on AIX lpars in the same subnet

Hi Guys, Our lpars is currently running on 2 different vlans (20, 30). Now we have a requirement that vlan 30 needs to be change to vlan 31 at the same subnet. I'm not sure on what is the best approach for this or what change is involve on the AIX side. This is our setup. Network switch -... (5 Replies)
Discussion started by: kaelu26
5 Replies
SSH-KEYSIGN(8)						    BSD System Manager's Manual 					    SSH-KEYSIGN(8)

NAME
ssh-keysign -- ssh helper program for host-based authentication SYNOPSIS
ssh-keysign DESCRIPTION
ssh-keysign is used by ssh(1) to access the local host keys and generate the digital signature required during host-based authentication. ssh-keysign is disabled by default and can only be enabled in the global client configuration file /etc/ssh/ssh_config by setting EnableSSHKeysign to ``yes''. ssh-keysign is not intended to be invoked by the user, but from ssh(1). See ssh(1) and sshd(8) for more information about host-based authen- tication. FILES
/etc/ssh/ssh_config Controls whether ssh-keysign is enabled. /etc/ssh/ssh_host_dsa_key /etc/ssh/ssh_host_ecdsa_key /etc/ssh/ssh_host_ed25519_key /etc/ssh/ssh_host_rsa_key These files contain the private parts of the host keys used to generate the digital signature. They should be owned by root, read- able only by root, and not accessible to others. Since they are readable only by root, ssh-keysign must be set-uid root if host- based authentication is used. /etc/ssh/ssh_host_dsa_key-cert.pub /etc/ssh/ssh_host_ecdsa_key-cert.pub /etc/ssh/ssh_host_ed25519_key-cert.pub /etc/ssh/ssh_host_rsa_key-cert.pub If these files exist they are assumed to contain public certificate information corresponding with the private keys above. SEE ALSO
ssh(1), ssh-keygen(1), ssh_config(5), sshd(8) HISTORY
ssh-keysign first appeared in OpenBSD 3.2. AUTHORS
Markus Friedl <markus@openbsd.org> BSD
February 17, 2016 BSD
All times are GMT -4. The time now is 09:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy