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
Verify that the migration policy for the clusterone cluster is , and the resilience policy is Migrate Virtual Machines.
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.
From the menu bar, navigate to → .
Right-click the row for clusterone, and then select Edit.
The Edit Cluster window displays.
In the Migration Policy section, verify that Migration Policy is , and the Resilience Policy is Migrate Virtual Machines. When done, click to apply the configuration.
Move the host running the rhel-vm1 virtual machine into maintenance mode.
From the menu bar, click → .
Determine which host is running the rhel-vm1 virtual machine by checking the Host field for this virtual machine.
From the menu bar, click → .
Select the host that contains the rhel-vm1 virtual machine.
Click , and select .
The Maintenance Host(s) window displays.
Click to enable maintenance mode for the host.
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.
Verify that the rhel-vm1 virtual machine is running on the only host in the clusterone cluster that is Up .
From the menu bar, click → .
Verify that the Host for the rhel-vm1 virtual machine is the available host in the clusterone cluster.
Activate the host currently under maintenance in the clusterone cluster.
From the menu bar, click → .
Select the host with Maintenance as the value for the Status field.
Click , and then select to activate the host in the clusterone cluster.
Verify that the Status field for that host transitions from Activating to Up.