IBM AIX 7.3 TL3 introduced support for encrypting and decrypting rootvg logical volumes (LVs) during preservation and migration installations. While the NIM repository also supports this feature, this tutorial focuses on preservation and migration installation using the VIOS media repository.
The enhancement in AIX 7.3 TL3 adds LV encryption support for default rootvg LVs during preservation and migration installations. Users can choose to encrypt rootvg LVs using the Platform KeyStore (PKS) authentication method or decrypt them based on the input provided during the installation process.
PKS is a hardware backed non-volatile random access memory (NVRAM) that offers secured storage for sensitive material. With the PKS encryption authentication method, rootvg LVs will be automatically unlocked without user intervention.
Prerequisites to enable PKS encryption
Users need to make sure that the following prerequisites are fulfilled to enable PKS encryption for rootvg logical volumes during preservation and migration installation of an AIX logical partition (LPAR), using VIOS media repository:
Ensure that PKS is enabled for the AIX LPAR on the Hardware Management Console (HMC) that manages the corresponding central processor complex (CPC).
In the HMC GUI, on the partition properties page for the AIX logical partition, in the Advanced Settings section, for Platform KeyStore Size parameter, ensure that a minimum value of 4 KB is set. This setting enables PKS for the AIX LPAR. Before setting this parameter value, power-off the LPAR and power-on the LPAR, once the value is set.
If PKS is already enabled for the AIX LPAR, ensure sufficient free PKS slots are available. Use hdcryptmgr pksshow AIX command to confirm this.
To host the media repository, identify a VIOS partition on the same CPC as that of the AIX logical partition. Ensure that a virtual Small Computer System Interface (VSCSI) connection between the identified VIOS partition and the AIX LPAR exists. On my test VIOS, vhost1 represents the VSCSI connection between my test VIOS and my test AIX LPAR:
Steps to perform preservation and migration installation
Perform the following steps to perform preservation and migration installation of an AIX LPAR with PKS encryption enabled on rooting logical volumes using the VIOS media repository:
On the VIOS partition, get the installation distribution media ISO file and loop mount the ISO file.
Customize the bosinst.template file located under ./usr/lpp/bosinst/, within the extracted folder.
Here are the parameters in the bosinst.template, possible parameter values, and the description.
The following are the valid values for the INSTALL_METHOD parameter:
Overwrite: Performs a clean installation
Preserve: Preserves all the non-system logical volumes
Migrate: Migrates the AIX OS version across major releases, preserving all system logical volumes
The following are the valid values for the PROMPT parameter:
Yes: Performs prompt mode of installation
No: Performs non-prompt mode of installation
The following are the valid values for LV encryption in preservation and migration installation:
Preserve: The Preserve mode retains the previous LV encryption state for all the LVs. This mode is the default mode for LV encryption.
No: The No mode disables LV encryption for all the LVs and keeps the LVs plain. When the LV encryption option is No, all the encrypted LVs are decrypted during the installation operation.
Yes: The Yes mode enables LV encryption in the selected LVs. The values provided in the lv_encryption stanza are considered.
The following values are valid for each rootvg LV name in the lv_encryption stanza:
Preserve: PKS retains the previous PKS encryption state of the LV
No: PKS decrypts the LV
Yes: PKS encrypts the LV
Note that multiple target_disk_data stanzas need to be mentioned – one stanza for each rootvg member hdisk on the AIX LPAR.
Here is a customized bosinst.template sample file for a non-prompt mode of migration installation case:
Make the customized ISO DVD available to the AIX LPAR being migrated as a boot device. This will be accomplished using the VIOS media repository. a. On the VIOS partition, create a media repository in the rootvg:
(0) padmin @ vios-lpar: /home/padmin
$ mkrep -sp rootvg -size 6G
Virtual Media Repository Created
Repository created within "VMLibrary"logical volume
(0) padmin @ vios-lpar: /home/padmin
$ chrep -size 4G
(0) padmin @ vios-lpar: /home/padmin
$ lsrep
Size(mb) Free(mb) Parent Pool Parent Size Parent Free
10198 10198 rootvg 20384 416
Name File Size Optical Access
(0) padmin @ vios-lpar: /home/padmin
$
Show more
b. Create a virtual media disk from the custom ISO DVD:
c. Ensure that the virtual media disk created in previous step is listed in the lsrep command output and thus verify that the virtual media disk is part of the repository.
At this stage, the vtopt device appears as a virtual CD ROM device on the AIX LPAR (Note: The CD ROM device appears, after issuing the cfgmgr command on the AIX LPAR):
(0) root @ aix-lpar: /
# cfgmgr
(0) root @ aix-lpar: /
# lsdev | grep cdcd0 Available Virtual SCSI Optical Served by VIO Server
(0) root @ aix-lpar: /
#
Show more
f. Back on VIOS, load the virtual media disk on the vtopt device:
Rootvg on my AIX LPAR spans across four hdisks: hdisk0, hdisk1, hdisk2, and hdisk3. Rootvg member disks could be different on AIX LPARs. Ensure target_disk_data stanzas in bosinst.template file are customized accordingly.
(0) root @ aix-lpar: /
# lspv
hdisk0 00c4c1b895b581dd rootvg active
hdisk1 00c4c1b8bac818fb rootvg active
hdisk2 00c4c1b8bac8197d rootvg active
hdisk3 00c4c1b8bac819fa rootvg active
hdisk4 none None
(0) root @ aix-lpar: /
#
Show more
None of the PKS slots on my AIX LPAR are used yet (PKS encryption is not enabled for any of the rootvg LVs on my AIX LPAR):
(0) root @ aix-lpar: /
# hdcryptmgr pksshow
PKS uses 32 bytes on a maximum of 4096 bytes.
PKS_Label (LVid) Status
PKS_Label (objects)
(0) root @ aix-lpar: /
#
Show more
Initiate migration installation on the AIX LPAR.
On the AIX partition, run the cfgmgr command (if not done already), and change the bootlist to boot from cd0.
(0) root @ aix-lpar: /
# bootlist -m normal -o
hdisk0 blv=hd5 pathid=0
(0) root @ aix-lpar: /
# lsdev | grep cdcd0 Available Virtual SCSI Optical Served by VIO Server
(0) root @ aix-lpar: /
# bootlist -m normal cd0
(0) root @ aix-lpar: /
# bootlist -m normal -o
cd0
(0) root @ aix-lpar: /
#
Show more
Reboot the AIX LPAR so that it boots from cd0 and the migration installation proceeds:
(0) root @ aix-lpar: /
# shutdown -Fr
SHUTDOWN PROGRAM
Thu Dec 1206:27:35 CST 2024
Running /etc/rc.d/rc2.d/Khtxd stop
Stopping htx daemon: ...
Running /etc/rc.d/rc2.d/Ksshd stop
0513-044 The sshd Subsystem was requested to stop.
Running /etc/rc.d/rc2.d/Kwpars stop
Running /etc/rc.d/rc3.d/Ksoed stop
Wait for'Rebooting...' before stopping.
.
.
.
Show more
Post-migration installation verification
When migration installation is complete and the system prompts for user login, enter the root user credentials. On my AIX LPAR, post successful migration installation, I performed the following verifications:
Verified that the AIX level on the migrated LPAR is now at AIX 7.3 TL3.
Starting from AIX 7.3 TL3, user can use PKS to encrypt or decrypt rootvg LVs of an AIX LPAR, during a prompt mode or non-prompt mode of preservation and migration installation. This tutorial explained in detail how to enable PKS encryption to rootvg LVs, during migration installation in the non-prompt mode using a VIOS media repository.
About cookies on this siteOur websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising.For more information, please review your cookie preferences options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.