RFC: use virDomainMigrate3 in virt-manager

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

I received a bug report (apologies for no link, but it's not publicly
accessible) about migration failing with virt-manager between Xen hosts. It's
rather embarrassing to admit, but I've never tried migration with virt-manager
and Xen :-/.

The libvirt libxl driver for Xen only supports the extensible params version of
the migration V3 API. virt-manager currently uses the virDomainMigrate API,
which can accommodate migration protocol versions 1, 2 and 3, but doesn't
support the extensible params variant of the V3 protocol. The virDomainMigrate3
API does support the extensible params variant. Switching virt-manager to use
virDomainMigrate3 would allow virt-manager's migrate functionality to work with
hypervisors only supporting the newer migrate APIs.

Any opinions on changing virt-manager to use virDomainMigrate3? Attached is an
initial attempt at doing so.

Regards,
Jim
>From 5314d51a91f57542d97f04aa589e79d13352ce22 Mon Sep 17 00:00:00 2001
From: Jim Fehlig <jfehlig@xxxxxxxx>
Date: Wed, 31 Aug 2016 11:26:24 -0600
Subject: [PATCH 1/2] virt-manager: use virDomainMigrate3 API

libvirt has supported the migration V3 protocol for many years now.
A nice feature of the virDomainMigrate3 API is that it will detect
the protocol version supported by the underlying hypervisor,
including whether it supports the extensible parameters variant,
and call the hypervisor API with parameters fixed up as needed.

Change virt-manager to use the virDomainMigrate3 API, allowing
migration to work with hypervisors that only support the extensible
parameters variant of the migration V3 API.

Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx>
---
 virtManager/domain.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/virtManager/domain.py b/virtManager/domain.py
index 3185cf8..a707f25 100644
--- a/virtManager/domain.py
+++ b/virtManager/domain.py
@@ -1487,7 +1487,11 @@ class vmmDomain(vmmLibvirtObject):
         if meter:
             start_job_progress_thread(self, meter, _("Migrating domain"))
 
-        self._backend.migrate(libvirt_destconn, flags, None, interface, 0)
+        params = {}
+        if interface:
+            params[libvirt.VIR_MIGRATE_PARAM_URI] = interface
+
+        self._backend.migrate3(libvirt_destconn, params, flags)
 
         # Don't schedule any conn update, migrate dialog handles it for us
 
-- 
2.1.4

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list

[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux