In this lab, you will investigate the process of configuring the NativeHA Queue Manager on RHEL Virtual Machines. Additionally, you will conduct High Availability testing in the Live environment and monitoring the transition of client connections.
You need to reserve Techzone environment which will have 6 RHEL VMs, and 1 WIndows VM.
For this lab we will be using acemq1,acemq2,acemq3 for doing the MQ nativeHA.
We will launch everything from the Windows image.
Click on the Windows image console to open it.

From the Windows console click on the CAD to get to the login page. Click on OK for the Business Use Notice

Login to the windows using techzone/IBMDem0s

From the Windows VM’s Console, open Putty program and open acemq1, acemq2, acemq3 Virtual Machine sessions.

Arrange the windows on your desktop and you should have the 3 RH vms. Login to each VM using ibmuser/engage.

Run the following commands on each of the Virtual Machines (acemq1, acemq2, acemq3).
Create Queue Manager MQ01HA
crtmqm -lr `hostname` -lf 8192 -lp 10 -ls 10 -p 1414 MQ01HA

runmqakm -keydb -create -db /var/mqm/qmgrs/MQ01HA/ssl/key.kdb -pw passw0rd -stash
runmqakm -cert -create -db /var/mqm/qmgrs/MQ01HA/ssl/key.kdb -pw passw0rd -label selfsigned -dn CN=MQ01HA -size 2048
sudo chown -R :mqm /var/mqm/qmgrs/MQ01HA/ssl/key.*
sudo chmod g+r /var/mqm/qmgrs/MQ01HA/ssl/key.*

sftp ibmuser@acemq2
mput /var/mqm/qmgrs/MQ01HA/ssl/key.* /var/mqm/qmgrs/MQ01HA/ssl
quit
sftp ibmuser@acemq3
Enter password
mput /var/mqm/qmgrs/MQ01HA/ssl/key.* /var/mqm/qmgrs/MQ01HA/ssl
quit

sudo chown -R :mqm /var/mqm/qmgrs/MQ01HA/ssl/key.*
sudo chmod g+r /var/mqm/qmgrs/MQ01HA/ssl/key.*

On each VM (acemq1,2,3), we will add the TLS parameters as well as all 3 NativeHAInstances to qm.ini.
You can run the following command on all 3 images to look at the current qm.ini files.
cat /var/mqm/qmgrs/MQ01HA/qm.ini

We will now from the acemq1 putty session we will run the update script that will update all 3 qm.ini files on the 3 instances.
The output will show that you have updated all 3 instances.
cd mqha-crr
./1-qm-ha.sh

When done run the following command on all 3 instances to verify that the qm.ini was updated correctly.
cat /var/mqm/qmgrs/MQ01HA/qm.ini

Run the following commands to restart the queue manager on all 3 vm’s (acemq1,2,3).
strmqm MQ01HA
Once all 3 QMgrs are running go to one of the VMs and run the following command.
The Queue Manager should be active in one of Virtual Machines.
dspmq -o nativeha -x

Find the node that the QMgr is running as Active using this command.
dspmq -o nativeha -x
Run the following command, on the node where the queue manager is Active,
This will disable security and define the channel and local Queue used for testing.
runmqsc MQ01HA
ALTER QMGR CHLAUTH(DISABLED) CONNAUTH(' ')
REFRESH SECURITY TYPE(CONNAUTH)
DEFINE CHANNEL(NATIVEHACHL.SVRCONN) CHLTYPE(SVRCONN)
DEFINE QLOCAL(APPQ) DEFPSIST(YES)

Reference:
https://www.ibm.com/docs/en/ibm-mq/9.4.x?topic=ha-monitoring-restarting-ending-queue-manager-instances
You must implement a method to ensure that the queue manager instances in the Native HA configuration are still running, and restart them if required.
Run the following commands on each RHEL VM.
ln -s /opt/mqm/samp/mqmonitor@.service /etc/systemd/system
sudo systemctl enable mqmonitor@MQ01HA
sudo systemctl start mqmonitor@MQ01HA
On the Windows VM
Open the MQ-Labs folder and start the putter and getter batch files.

We will now manually failover the Queue Manager from where it’s running.
Run dspmq on each of the RH VMs and you will see where the QMgr is currently running.
Next from that location run the following command to failover the QMgr.
sudo systemctl restart mqmonitor@MQ01HA
Notice that the amqsphac, amqsghac getting reconnected.

This indicates that the NativeHA is functioning as intended, and the queue manager is currently Active in a different Standby node, allowing the amqsphac and amqsghac to reconnect.
Congratulations! At this point, you ought to be familiar with the process of configuring IBM MQ HA in a Primary region.