diff -Nru libvirt-1.2.6/debian/changelog libvirt-1.2.6/debian/changelog --- libvirt-1.2.6/debian/changelog 2014-08-08 07:57:08.000000000 -0700 +++ libvirt-1.2.6/debian/changelog 2014-09-05 03:39:57.000000000 -0700 @@ -1,3 +1,9 @@ +libvirt (1.2.6-0ubuntu6) utopic; urgency=medium + + * Fix: can't input password on ssh when virsh migrate (LP: #1365947) + + -- Seyeong Kim Fri, 05 Sep 2014 03:38:48 -0700 + libvirt (1.2.6-0ubuntu5) utopic; urgency=medium * cgroups-ignore-systemd-failure - fix incoming migration failures when diff -Nru libvirt-1.2.6/debian/patches/fix-input-password-fail-on-ssh libvirt-1.2.6/debian/patches/fix-input-password-fail-on-ssh --- libvirt-1.2.6/debian/patches/fix-input-password-fail-on-ssh 1969-12-31 16:00:00.000000000 -0800 +++ libvirt-1.2.6/debian/patches/fix-input-password-fail-on-ssh 2014-09-10 16:36:45.000000000 -0700 @@ -0,0 +1,85 @@ +Index: libvirt-1.2.6/tools/virsh-domain.c +=================================================================== +--- libvirt-1.2.6.orig/tools/virsh-domain.c 2014-09-05 03:01:08.404691749 -0700 ++++ libvirt-1.2.6/tools/virsh-domain.c 2014-09-10 16:36:39.683244155 -0700 +@@ -8927,6 +8927,7 @@ + virTypedParameterPtr params = NULL; + int nparams = 0; + int maxparams = 0; ++ virConnectPtr dconn = data->dconn; + + sigemptyset(&sigmask); + sigaddset(&sigmask, SIGINT); +@@ -9041,18 +9042,12 @@ + ret = '0'; + } else { + /* For traditional live migration, connect to the destination host directly. */ +- virConnectPtr dconn = NULL; + virDomainPtr ddom = NULL; + +- dconn = vshConnect(ctl, desturi, false); +- if (!dconn) +- goto out; +- + if ((ddom = virDomainMigrate3(dom, dconn, params, nparams, flags))) { + virDomainFree(ddom); + ret = '0'; + } +- virConnectClose(dconn); + } + + out: +@@ -9089,7 +9084,7 @@ + bool functionReturn = false; + int timeout = 0; + bool live_flag = false; +- vshCtrlData data; ++ vshCtrlData data = { .dconn = NULL }; + + if (!(dom = vshCommandOptDomain(ctl, cmd, NULL))) + return false; +@@ -9114,6 +9109,23 @@ + data.cmd = cmd; + data.writefd = p[1]; + ++ if (vshCommandOptBool(cmd, "p2p") || vshCommandOptBool(cmd, "direct")) { ++ data.dconn = NULL; ++ } else { ++ /* For traditional live migration, connect to the destination host. */ ++ virConnectPtr dconn = NULL; ++ const char *desturi = NULL; ++ ++ if (vshCommandOptStringReq(ctl, cmd, "desturi", &desturi) < 0) ++ goto cleanup; ++ ++ dconn = vshConnect(ctl, desturi, false); ++ if (!dconn) ++ goto cleanup; ++ ++ data.dconn = dconn; ++ } ++ + if (virThreadCreate(&workerThread, + true, + doMigrate, +@@ -9125,6 +9137,8 @@ + virThreadJoin(&workerThread); + + cleanup: ++ if (data.dconn) ++ virConnectClose(data.dconn); + virDomainFree(dom); + VIR_FORCE_CLOSE(p[0]); + VIR_FORCE_CLOSE(p[1]); +Index: libvirt-1.2.6/tools/virsh.h +=================================================================== +--- libvirt-1.2.6.orig/tools/virsh.h 2014-06-25 04:25:52.000000000 -0700 ++++ libvirt-1.2.6/tools/virsh.h 2014-09-05 03:37:41.396659393 -0700 +@@ -371,6 +371,7 @@ + vshControl *ctl; + const vshCmd *cmd; + int writefd; ++ virConnectPtr dconn; + }; + + /* error handling */ diff -Nru libvirt-1.2.6/debian/patches/series libvirt-1.2.6/debian/patches/series --- libvirt-1.2.6/debian/patches/series 2014-08-08 07:56:40.000000000 -0700 +++ libvirt-1.2.6/debian/patches/series 2014-09-05 03:32:46.000000000 -0700 @@ -19,3 +19,4 @@ add-cgmanager-support.patch cgroups-ignore-systemd-failure ovs-delete-port-if-exists-while-adding-new-one +fix-input-password-fail-on-ssh