7.2.1. Console using a Virtual I/O Server
To demonstrate the addition of a virtual serial adapter, this section looks at a relatively unknown feature of PowerVM – the ability to start a console session to an LPAR from a virtual I/O server. This means that a console is available even when no HMC is available. As a rule, however, this option is not used in practice.
All what is required, is to create a virtual serial client adapter on the virtual I/O server; the client LPAR and slot number 0 of the virtual serial server adapter on the client are specified as the remote endpoint. By default, the “lpar addserial” command creates virtual serial adapters of the type server, so the “-c” option (client adapter) must be specified. Slot 19, which has not yet been used, is specified as the slot number on the virtual I/O server:
$ lpar addserial -c ms03-vio1 19 aix22 0
$
Overall, the virtual I/O server now has a further serial adapter in slot 19 in addition to the two standard virtual serial adapters in slot 0 and 1:
$ lpar lsserial ms03-vio1
REMOTE
LPAR_NAME SLOT REQ STATE TYPE STATUS HMC LPAR_NAME LPAR_ID SLOT
ms03-vio1 1 Yes 1 server unavailable Yes - any any
ms03-vio1 0 Yes 1 server unavailable Yes - any any
ms03-vio1 19 No 1 client unavailable No aix22 3 0 0
$
Now the virtual I/O server ms03-vio1 can be used at any time to open a console session to LPAR aix22. To do this, you have to log in to the virtual I/O server as user padmin and start the command “mkvt -id” with the LPAR-ID of the LPAR aix22 (LPAR-ID is 30 according to the output above):
padmin@ms03-vio1> mkvt -id 30AIX Version 7
Copyright IBM Corporation, 1982, 2020.
Console 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. *
* *
* *
*******************************************************************************aix22:/root>
aix22:/root> exitAIX Version 7
Copyright IBM Corporation, 1982, 2020.
Console login: ~.Virtual terminal has been disconnected
padmin@ms03-vio1>
The console session can be terminated with “~.“. If the login to the virtual I/O server has been made with OpenSSH, the console session must be ended with “~~.“, Since in this case the combination “~.” terminates the OpenSSH session to the virtual I/O server, and not the console session from the virtual I/O server to the LPAR!
An existing console session between the virtual I/O server and the LPAR can be terminated as user padmin on the virtual I/O server with the command “rmvt -id” and the LPAR ID of the LPAR in question:
padmin@ms03-vio1> rmvt -id 30
padmin@ms03-vio1>
If necessary, the virtual serial client adapter can be removed again using the “lpar rmserial” command:
$ lpar rmserial ms03-vio1 19
$
When using console sessions from a virtual I/O server, it should be noted that a console session between the virtual I/O server and the LPAR can not be terminated using the HMC (and therefore not with the LPAR tool). The only way to terminate the session in this case ist to log into the virtual I/O server and using rmvt as user padmin! Conversely, a console session between a HMC and the LPAR cannot be terminated from the virtual I/O server.