Bookmark this page

Guided Exercise: Configuring Automated Migration and Scheduling Policies

In this exercise, you will configure a virtual machine to automatically migrate to another host in the cluster when that host enters maintenance mode.

Outcomes

You should be able to:

  • Configure a cluster policy to automatically migrate virtual machines when a host moves into maintenance mode.

  • Move a host running a VM into maintenance mode.

This exercise uses the development data center, which contains the clusterone cluster, and the hostb and hostd hosts. This exercise also uses the rhel-vm1 virtual machine, which runs on either the hostb or the hostd host.

Log in as the student user on workstation and run the lab migration-auto start command. This command ensures that the hosts, clusters, data centers, and networks of the Red Hat Virtualization environment are configured appropriately.

[student@workstation ~]$ lab migration-auto start
  1. Verify that the migration policy for the clusterone cluster is Minimal downtime, and the resilience policy is Migrate Virtual Machines.

    1. Using the https://rhvm.lab.example.com URL log into the Administration Portal of the RHV Manager as admin in the internal profile. Use redhat as the password.

    2. From the menu bar, navigate to ComputeClusters.

    3. Right-click the row for clusterone, and then select Edit. The Edit Cluster window displays.

    4. In the Migration Policy section, verify that Migration Policy is Minimal downtime, and the Resilience Policy is Migrate Virtual Machines. When done, click OK to apply the configuration.

  2. Move the host running the rhel-vm1 virtual machine into maintenance mode.

    1. From the menu bar, click ComputeVirtual Machines.

    2. Determine which host is running the rhel-vm1 virtual machine by checking the Host field for this virtual machine.

    3. From the menu bar, click ComputeHosts.

    4. Select the host that contains the rhel-vm1 virtual machine. Click Management, and select Maintenance. The Maintenance Host(s) window displays.

    5. Click OK to enable maintenance mode for the host.

    6. In the Compute >> Hosts page, verify that the Status for the host transitions from Preparing for Maintenance to Maintenance. This process may take up to a minute.

  3. Verify that the rhel-vm1 virtual machine is running on the only host in the clusterone cluster that is Up .

    1. From the menu bar, click ComputeVirtual Machines.

    2. Verify that the Host for the rhel-vm1 virtual machine is the available host in the clusterone cluster.

  4. Activate the host currently under maintenance in the clusterone cluster.

    1. From the menu bar, click ComputeHosts.

    2. Select the host with Maintenance as the value for the Status field. Click Management, and then select Activate to activate the host in the clusterone cluster.

    3. Verify that the Status field for that host transitions from Activating to Up.

Finish

On workstation, run the lab migration-auto finish script to complete this exercise.

[student@workstation ~]$ lab migration-auto finish

This concludes the guided exercise.

Revision: rh318-4.3-c05018e