[PATCH] Migration with --live --offline option performs offline migration without warning/error.

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

 



This patch gives an error when migration is attempted with both
--live and --offline options.

Signed-off-by: Nitesh Konkar <nitkon12@xxxxxxxxxxxxxxxxxx>
---
 tools/virsh-domain.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 62acecb..527db38 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -9795,6 +9795,12 @@ doMigrate(void *opaque)
     } else {
         /* For traditional live migration, connect to the destination host directly. */
         virDomainPtr ddom = NULL;
+          
+        if ((flags & VIR_MIGRATE_OFFLINE) && (flags & VIR_MIGRATE_LIVE)){
+            vshError(ctl, "%s", _("migrate: Using both --live and --offline option together is not permitted."));
+            goto out;
+        }    
 
         if ((ddom = virDomainMigrate3(dom, dconn, params, nparams, flags))) {
             virDomainFree(ddom);
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]