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

Nitesh Konkar niteshkonkar.libvirt at gmail.com
Mon Feb 22 12:26:54 UTC 2016


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

Signed-off-by: Nitesh Konkar <nitkon12 at linux.vnet.ibm.com>
---
 tools/virsh-domain.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 43c8436..7b4a08e 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -9837,6 +9837,10 @@ cmdMigrate(vshControl *ctl, const vshCmd *cmd)
     int timeout = 0;
     bool live_flag = false;
     virshCtrlData data = { .dconn = NULL };
+    bool live = vshCommandOptBool(cmd, "live");
+    bool offline = vshCommandOptBool(cmd, "offline");
+
+    VSH_EXCLUSIVE_OPTIONS_VAR(live, offline);
 
     if (!(dom = virshCommandOptDomain(ctl, cmd, NULL)))
         return false;
-- 
1.8.3.1




More information about the libvir-list mailing list