So you want to open a text console session on an LPAR on one of your Power Servers? You could log on to the HMC and run vtmenu from the HMC command line. This works but if you’re looking for a more efficient way, you might want to consider using the dconsole command on AIX. If, like many, you have a central or main NIM server from which you manage your AIX environment, then the dconsole command is probably a logical choice of tools to add your AIX admin bag of tricks.

 

Dconsole is included with the dsm.core fileset.

 

# whence dconsole

/usr/bin/dconsole

 

# lslpp -w /usr/bin/dconsole

  File                                        Fileset               Type

  ----------------------------------------------------------------------------

  /usr/bin/dconsole                           dsm.core              Symlink

 

# lslpp -l dsm.core

  Fileset                      Level  State      Description

  ----------------------------------------------------------------------------

Path: /usr/lib/objrepos

  dsm.core                  7.1.3.30  COMMITTED  Distributed Systems Management

                                                 Core

 

Here’s how to configure dconsole so you can access the HMC console on an AIX LPAR.

 

First, find the managed system name and serial number of the system where the LPAR resides. In this case, I’m interested in the managed system named stg_750.

 

hscroot@hsc02:~> lssyscfg -r sys -F name,type_model,serial_num

stg_750_2,8233-E8B,062766P

824,8286-42A,214F58V

stg_750,8233-E8B,1003CDP

 

Find the LPAR id (number) of the LPAR you wish to access. I want LPAR number 4 (750lpar11).

 

hscroot@hsc02:~> lssyscfg -r lpar -m stg_750 -F name,lpar_id

750lpar4,6

750lpar2,5

750lpar11,4

750lpar1,2

750vio1,1

 

Find the LPAR id (number) of the LPAR you wish to access. I want LPAR number 4 (750lpar11).

Run the dpasswd command to store the HMC username and password on the NIM master. Generate and exchange the NIM master SSH key with the HMC using the dkeyexch command.

 

# dpasswd -f /etc/ibm/sysmgt/dsm/config/my_password_file -U hscroot

 

# dkeyexch -f /etc/ibm/sysmgt/dsm/config/my_password_file -I hmc -H 10.1.50.30

 

Create (or edit) the /etc/ibm/sysmgt/dsm/nodeinfo file on the NIM master. This contains the LPAR name, IP address of the HMC, the hardware type-model , serial number of the target Power System, LPAR id number and the (default) location of the HMC password file.

 

# cat /etc/ibm/sysmgt/dsm/nodeinfo

750lpar11|hmc|10.1.50.30|TargetHWTypeModel=8233-E8B:TargetHWSerialNum=1003CDP:TargetLPARID=4|/etc/ibm/sysmgt/dsm/config/my_password_file

750lpar4|hmc|10.1.50.30|TargetHWTypeModel=8233-E8B:TargetHWSerialNum=1003CDP:TargetLPARID=6|/etc/ibm/sysmgt/dsm/config/my_password_file

 

With the nodeinfo file configured and in place, I can now run the dconsole command to open a console session on the desired AIX LPAR (750lpar11).

 

# dconsole -n 750lpar11 -t -l

Starting console daemon

[read-write session]

mkvterm -m 8233-E8B*1003CDP -p 750lpar11

 

 Open in progress

 

 Open Completed.

 

 

AIX Version 7

Copyright IBM Corporation, 1982, 2015.

Console login:

 

Issuing Ctrl-x within the text console window closes the console session. I specified several options to dconsole. These are explained below.

 

-t text mode.  Opens console in the current session or window.

 

-l Enable console logging (no logging if omitted). By default the console logs are written to the /var/ibm/sysmgt/dsm/log/console directory.

 

-n node_identifer. Specifies the target node and console access point.  This can be a comma separated list of nodes……

 

By specifying the –l option, all of my dconsole sessions are logged to the /var/ibm/sysmgt/dsm/log directory (shown below).

 

# cd /var/ibm/sysmgt/dsm/log

# ls -ltr

total 80

-rw-r--r--    1 root     system         2551 May 30 2013  dkeyexch.log.150

-rw-r--r--    1 root     system         1433 Oct 14 13:38 dgetmacs.log.3

-rw-r--r--    1 root     system           76 Oct 14 13:43 dgetmacs.750lpar11.log.287

-rw-r--r--    1 root     system         1431 Oct 14 13:44 dgetmacs.log.2

-rw-r--r--    1 root     system         1650 Oct 14 13:45 dgetmacs.log.1

-rw-r--r--    1 root     system          471 Oct 14 13:51 hmc_console_10.1.50.30_6

-rw-r--r--    1 root     system         5507 Oct 14 14:19 dkeyexch.log.287

-rw-r--r--    1 root     system         1650 Oct 14 14:21 dgetmacs.log

-rw-r--r--    1 root     system            0 Oct 14 14:21 dconsoled.stdout

-rw-r--r--    1 root     system            0 Oct 14 14:21 dconsoled.stderr

drwxr-xr-x    2 root     system          256 Oct 14 14:22 console

-rw-r--r--    1 root     system          583 Oct 14 14:22 hmc_console_10.1.50.30_4

 

# cat hmc_console_10.1.50.30_4

14:21:53: Wed Oct 14 2015

14:21:53: Process id is 17498196

14:21:54: HMCIPAddr: 10.1.50.30

14:21:54: UserId: hscroot

14:21:54: PswdFile: /var/ibm/sysmgt/dsm/tmp/dsm7482657445069772300.tmp

14:21:54: ManagedSystem: 8233-E8B*1003CDP

14:21:54: Target: 4

14:21:54: ssh_connect: 10.1.50.30 received command line prompt. Returning!

14:21:54: hmc_get_lparname: 10.1.50.30 command prompt > received

 

# cd /var/ibm/sysmgt/dsm/log/console

# ls -ltr

total 24

-rw-r--r--    1 root     system          114 Oct 14 13:50 750lpar4.0

-rw-r--r--    1 root     system         5087 Oct 14 14:22 750lpar11.0

 

# cat 750lpar11.0

[October 14, 2015 16:08:32 GMT - console logging started]

mkvterm -m 8233-E8B*1003CDP -p 750lpar11

 

 Open in progress

 

 Open Completed.

 

AIX Version 7

Copyright IBM Corporation, 1982, 2015.

Console login: root

root's Password:

3004-007 You entered an invalid login name or password.

login: root

root's Password:

*******************************************************************************

*                                                                             *

*                                                                             *

*  Welcome to AIX Version 7.1!                                                *

*                                                                             *

*                                                                             *

*  Please see the README file in /usr/lpp/bos for information pertinent to    *

*  this release of the AIX Operating System.                                  *

*                                                                             *

*                                                                             *

*******************************************************************************

1 unsuccessful login attempt since last login.

Last unsuccessful login: Wed Oct 14 16:08:38  2015 on /dev/vty0

Last login: Wed Oct 14 14:53:26  2015 on /dev/pts/0 from 750lpar4

 

[root@750lpar11]/ # uname -L

4 750lpar11

[root@750lpar11]/ #

 

AIX Version 7

Copyright IBM Corporation, 1982, 2015.

Console login: [October 14, 2015 16:08:49 GMT - console logging ended]

 

My NIM master was running AIX 7.1 TL3 SP5. I recommend you do the same. If you are not at this level, please ensure you’ve installed the fix for this dconsole problem…..

 

IV63880: DCONSOLE MAY FAIL TO CLOSE EXISTING TERMINAL SESSION APPLIES TO AIX 7100-03 http://www-01.ibm.com/support/docview.wss?uid=isg1IV63880