From: Keir Fraser Date: Thu, 21 Jan 2010 09:03:00 +0000 (+0000) Subject: xend: Unbreak live migration with tapdisk2 after 20691:054042ba73b6 X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12712 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1e4743291b9e4fd7b131d9de03dcfd8a72682fd0;p=xen.git xend: Unbreak live migration with tapdisk2 after 20691:054042ba73b6 vm.image does not exist at this point in the restore process. I haven't looked at the memory_sharing code. It's likely something better is needed to make that work across relocation. Signed-off-by: Brendan Cully --- diff --git a/tools/python/xen/xend/server/BlktapController.py b/tools/python/xen/xend/server/BlktapController.py index f75e14dcc3..48cd13e152 100644 --- a/tools/python/xen/xend/server/BlktapController.py +++ b/tools/python/xen/xend/server/BlktapController.py @@ -198,7 +198,7 @@ class Blktap2Controller(BlktapController): self.deviceClass = 'tap2' return devid - if self.vm.image.memory_sharing: + if self.vm.image and self.vm.image.memory_sharing: cmd = [ TAPDISK_BINARY, '-n', '%s:%s' % (params, file), '-s', '%d' % self.vm.getDomid() ] else: cmd = [ TAPDISK_BINARY, '-n', '%s:%s' % (params, file) ]