6.13. Migrating Virtual Machines Between Hosts
6.13.1. Live Migration Prerequisites Copy linkLink copied to clipboard!
- The source and destination host should both be members of the same cluster, ensuring CPU compatibility between them.
Note
Live migrating virtual machines between different clusters is generally not recommended. The currently only supported use case is documented at https://access.redhat.com/articles/1390733. - The source and destination host must have a status of
Up
. - The source and destination host must have access to the same virtual networks and VLANs.
- The source and destination host must have access to the data storage domain on which the virtual machine resides.
- There must be enough CPU capacity on the destination host to support the virtual machine's requirements.
- There must be enough RAM on the destination host that is not in use to support the virtual machine's requirements.
- The migrating virtual machine must not have the
cache!=none
custom property set.
6.13.2. Optimizing Live Migration Copy linkLink copied to clipboard!
Procedure 6.28. Configuring Auto-convergence and Migration Compression for Virtual Machine Migration
- Configure the optimization settings at the global level:
- Enable auto-convergence at the global level:
engine-config -s DefaultAutoConvergence=True
# engine-config -s DefaultAutoConvergence=True
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Enable migration compression at the global level:
engine-config -s DefaultMigrationCompression=True
# engine-config -s DefaultMigrationCompression=True
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Restart the
ovirt-engine
service to apply the changes:systemctl restart ovirt-engine.service
# systemctl restart ovirt-engine.service
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- Configure the optimization settings at the cluster level:
- Select a cluster.
- Click.
- Click the Migration Policy tab.
- From the Auto Converge migrations list, select Inherit from global setting, Auto Converge, or Don't Auto Converge.
- From the Enable migration compression list, select Inherit from global setting, Compress, or Don't Compress.
- Configure the optimization settings at the virtual machine level:
- Select a virtual machine.
- Click.
- Click the Host tab.
- From the Auto Converge migrations list, select Inherit from cluster setting, Auto Converge, or Don't Auto Converge.
- From the Enable migration compression list, select Inherit from cluster setting, Compress, or Don't Compress.
6.13.3. Guest Agent Hooks Copy linkLink copied to clipboard!
- Before migration
- After migration
- Before hibernation
- After hibernation
/etc/ovirt-guest-agent/hooks.d
on Linux systems and C:\Program Files\Redhat\RHEV\Drivers\Agent
on Windows systems.
before_migration
and after_migration
, before_hibernation
and after_hibernation
. All files or symbolic links in that directory will be executed.
ovirtagent
. If the script needs root
permissions, the elevation must be executed by the creator of the hook script.
System Service
user.
6.13.4. Automatic Virtual Machine Migration Copy linkLink copied to clipboard!
6.13.5. Preventing Automatic Migration of a Virtual Machine Copy linkLink copied to clipboard!
Procedure 6.29. Preventing Automatic Migration of Virtual Machine
- Click the Virtual Machines tab and select a virtual machine.
- Click Edit.
Figure 6.19. The Edit Virtual Machine Window
- Click the Host tab.
- Use the Start Running On radio buttons to designate the virtual machine to run on Any Host in Cluster or a Specific host. If applicable, select a specific host or group of hosts from the list.
Warning
Explicitly assigning a virtual machine to one specific host and disabling migration is mutually exclusive with Red Hat Virtualization high availability. Virtual machines that are assigned to one specific host can only be made highly available using third party high availability products like Red Hat High Availability. This restriction does not apply to virtual machines that are assigned to multiple specific hosts.Important
If the virtual machine has host devices directly attached to it, and a different host is specified, the host devices from the previous host will be automatically removed from the virtual machine. - Select Allow manual migration only or Do not allow migration from the Migration Options drop-down list.
- Optionally, select the Use custom migration downtime check box and specify a value in milliseconds.
- Click.
6.13.6. Manually Migrating Virtual Machines Copy linkLink copied to clipboard!
Note
Note
Procedure 6.30. Manually Migrating Virtual Machines
- Click the Virtual Machines tab and select a running virtual machine.
- Click.
- Use the radio buttons to select whether to Select Host Automatically or to Select Destination Host, specifying the host using the drop-down list.
Note
When the Select Host Automatically option is selected, the system determines the host to which the virtual machine is migrated according to the load balancing and power management rules set up in the scheduling policy. - Click.
6.13.7. Setting Migration Priority Copy linkLink copied to clipboard!
Procedure 6.31. Setting Migration Priority
- Click the Virtual Machines tab and select a virtual machine.
- Click.
- Select the High Availability tab.
- Select Low, Medium, or High from the Priority drop-down list.
- Click.
6.13.8. Canceling Ongoing Virtual Machine Migrations Copy linkLink copied to clipboard!
Procedure 6.32. Canceling Ongoing Virtual Machine Migrations
- Select the migrating virtual machine. It is displayed in the Virtual Machines resource tab with a status of Migrating from.
- Click.
6.13.9. Event and Log Notification upon Automatic Migration of Highly Available Virtual Servers Copy linkLink copied to clipboard!
Example 6.1. Notification in the Events Tab of the Web Admin Portal
Example 6.2. Notification in the Manager engine.log
/var/log/ovirt-engine/engine.log
: