Bookmark this page

Guided Exercise: Adding and Removing Hosts in a Cluster

In this exercise, you will remove hostb.lab.example.com from the Default cluster, and then add it to clusterone.

Outcomes

You should be able to remove a host from a cluster, add it to a new cluster, and locate system events in the Events log.

Log in to workstation as the student user, using student as the password.

On workstation, run the lab hypervisor-remove start command. This command runs a start script that determines if the Red Hat Virtualization environment is configured and working.

[student@workstation ~]$ lab hypervisor-remove start
  1. Before moving hostb.lab.example.com into Maintenance mode, ensure that all virtual machines hosted by hostb.lab.example.com are powered off.

    1. Log in to workstation as student using student as the password. Open Firefox and log in to the Administration Portal using the https://rhvm.lab.example.com URL. The username is admin, the domain is internal, and the password is redhat.

    2. Click on Compute, then click on Virtual Machines.

    3. Review the Host column for each virtual machine. If the column has a value of hostb.lab.example.com, right-click the name of the virtual machine and select Shutdown. Click on Confirm to shut down the virtual machine.

      Important

      Do not attempt to switch off the Hosted Engine virtual machine. This virtual machine is the self-hosted RHV-M installation.

  2. Put hostb.lab.example.com into Maintenance mode.

    1. Click on Compute, and then click on Hosts.

    2. Click on hostb.lab.example.com.

    3. From the Management drop-down menu, select Maintenance to put hostb.lab.example.com into maintenance mode. This opens the Maintenace Host(s) window. In the Reason box type, removing hostb.lab.example.com from the cluster. Click on OK.

    4. Confirm that the Status of hostb.lab.example.com is Maintenance.

  3. Remove hostb.lab.example.com from the Default cluster. Locate the system event messages in Events.

    1. Click on hostb.lab.example.com. Click on the Remove button. This opens the Remove Host(s) window. In the Reason box, type removing hostb.lab.example.com from the default cluster. Click on OK.

    2. Click on Events. Notice the events for hostb.lab.example.com.

      The events below are listed in the order in which they occur. In the Administration Portal, the event order may be selected by clicking the Time column heading in the Events table.

      • Ansible host-remove playbook execution started on host hostb.lab.example.com.

      • Ansible host-remove playbook execution has successfully finished on host hostb.lab.example.com. For more details, check log /var/log/ovirt-engine/ansible/ansible-20190722023326-ovirt-host-remove_yml.log

      • Host hostb.lab.example.com was removed by admin@internal-authz.

      Note

      It can take several minutes for all the system event messages to appear.

  4. Add hostb.lab.example.com to clusterone.

    1. Click on Compute, and then click on Hosts.

    2. Click on the New button. This opens the New Host window.

    3. In the New Host window enter the following configuration settings:

      • Choose clusterone as the Host Cluster.

      • Enter hostb.lab.example.com in the Name field.

      • Enter hostb.lab.example.com in the Hostname field.

      • Enter redhat in the Password field.

      Click the OK button to add hostb.lab.example.com to the cluster.

    4. Click OK in the Power Management Configuration window.

      The Status of hostb.lab.example.com is Installing. It takes several minutes for the Status to change to Up.

  5. Click on Events on the menu bar to locate the system event messages. Notice the events for hostb.lab.example.com.

    The events below are listed in the order in which they occur. In the Administration Portal, the event order may be selected by clicking the Time column heading in the Events table.

    • Ansible host-deploy playbook execution has successfully finished on host hostb.lab.example.com.

    • Host hostb.lab.example.com installed.

    • No faulty multipath paths on host hostb.lab.example.com.

    • Status of host hostb.lab.example.com was set to Up.

Finish

On workstation, run the lab hypervisor-remove finish script to complete this exercise.

[student@workstation ~]$ lab hypervisor-remove finish

This concludes the guided exercise.

Revision: rh318-4.3-c05018e