Mar 14 18:24:04 guest1 systemd[1]: Starting Pacemaker Remote Service...
Mar 14 18:24:04 guest1 systemd[1]: Started Pacemaker Remote Service.
Mar 14 18:24:04 guest1 pacemaker-remoted[1233]: notice: lrmd_init_remote_tls_server: Starting a tls listener on port 3121.
Verify Host Connection to Guest
_______________________________
Before moving forward, it's worth verifying that the host can contact the guest
on port 3121. Here's a trick you can use. Connect using ssh from the host. The
connection will get destroyed, but how it is destroyed tells you whether it
worked or not.
First add guest1 to the host machine's +/etc/hosts+ file if you haven't
already. This is required unless you have DNS setup in a way where guest1's
address can be discovered.
-::
+.. code-block:: none
# cat << END >> /etc/hosts
192.168.122.10 guest1
END
If running the ssh command on one of the cluster nodes results in this
output before disconnecting, the connection works:
-::
+.. code-block:: none
# ssh -p 3121 guest1
ssh_exchange_identification: read: Connection reset by peer
If you see one of these, the connection is not working:
-::
+.. code-block:: none
# ssh -p 3121 guest1
ssh: connect to host guest1 port 3121: No route to host
-::
+.. code-block:: none
# ssh -p 3121 guest1
ssh: connect to host guest1 port 3121: Connection refused
Once you can successfully connect to the guest from the host, shutdown the guest. Pacemaker will be managing the virtual machine from this point forward.
Integrate Guest into Cluster
############################
Now the fun part, integrating the virtual machine you've just created into the cluster. It is incredibly simple.
Start the Cluster
_________________
On the host, start pacemaker.
-::
+.. code-block:: none
# pcs cluster start
Wait for the host to become the DC. The output of ``pcs status`` should look
as it did in `Disable Stonith and Quorum`_.
Integrate as Guest Node
_______________________
If you didn't already do this earlier in the verify host to guest connection
section, add the KVM guest's IP address to the host's ``/etc/hosts`` file so we
can connect by hostname. For this example:
-::
+.. code-block:: none
# cat << END >> /etc/hosts
192.168.122.10 guest1
END
We will use the **VirtualDomain** resource agent for the management of the
virtual machine. This agent requires the virtual machine's XML config to be
dumped to a file on disk. To do this, pick out the name of the virtual machine