This way we won't squash the original error report in
MigratePerform, as is done for P2P and Tunneled migration.
Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
---
src/qemu/qemu_driver.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index daa6f94..fc6b9fa 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7670,8 +7670,12 @@ qemudDomainMigrateFinish2 (virConnectPtr dconn,
virDomainObjPtr vm;
virDomainPtr dom = NULL;
virDomainEventPtr event = NULL;
+ virErrorPtr origerr = NULL;
int newVM = 1;
+ /* Migration failed. Save the current error so nothing squashes it */
+ origerr = virSaveLastError();
+
qemuDriverLock(driver);
vm = virDomainFindByName(&driver->domains, dname);
if (!vm) {
@@ -7765,6 +7769,10 @@ endjob:
vm = NULL;
cleanup:
+ if (origerr) {
+ virSetError(origerr);
+ virFreeError(origerr);
+ }
if (vm)
virDomainObjUnlock(vm);
if (event)
--
1.6.5.2