Monitoring live migration

You can monitor the progress of live migration from either the web console or the CLI.

Monitoring live migration by using the web console

You can monitor the progress of all live migrations on the Overview → Migrations tab in the web console.

You can view the migration metrics of a virtual machine on the VirtualMachine details → Metrics tab in the web console.

Monitoring live migration of a virtual machine instance in the CLI

The status of the virtual machine migration is stored in the Status component of the VirtualMachineInstance configuration.

Procedure

  • Use the oc describe command on the migrating virtual machine instance:

    1. $ oc describe vmi vmi-fedora

    Example output

    1. ...
    2. Status:
    3. Conditions:
    4. Last Probe Time: <nil>
    5. Last Transition Time: <nil>
    6. Status: True
    7. Type: LiveMigratable
    8. Migration Method: LiveMigration
    9. Migration State:
    10. Completed: true
    11. End Timestamp: 2018-12-24T06:19:42Z
    12. Migration UID: d78c8962-0743-11e9-a540-fa163e0c69f1
    13. Source Node: node2.example.com
    14. Start Timestamp: 2018-12-24T06:19:35Z
    15. Target Node: node1.example.com
    16. Target Node Address: 10.9.0.18:43891
    17. Target Node Domain Detected: true

Metrics

You can use Prometheus queries to monitor live migration.

Live migration metrics

The following metrics can be queried to show live migration status:

kubevirt_migrate_vmi_data_processed_bytes

The amount of guest operating system (OS) data that has migrated to the new virtual machine (VM). Type: Gauge.

kubevirt_migrate_vmi_data_remaining_bytes

The amount of guest OS data that remains to be migrated. Type: Gauge.

kubevirt_migrate_vmi_dirty_memory_rate_bytes

The rate at which memory is becoming dirty in the guest OS. Dirty memory is data that has been changed but not yet written to disk. Type: Gauge.

kubevirt_migrate_vmi_pending_count

The number of pending migrations. Type: Gauge.

kubevirt_migrate_vmi_scheduling_count

The number of scheduling migrations. Type: Gauge.

kubevirt_migrate_vmi_running_count

The number of running migrations. Type: Gauge.

kubevirt_migrate_vmi_succeeded_total

The number of successfully completed migrations. Type: Gauge.

kubevirt_migrate_vmi_failed_total

The number of failed migrations. Type: Gauge.