Add nicer message when live migrate fails

This commit is contained in:
Joshua Boniface 2019-07-10 17:42:24 -04:00
parent 13d13b75d7
commit 32a6369de2
1 changed files with 2 additions and 2 deletions

View File

@ -285,8 +285,8 @@ class VMInstance(object):
target_dom = self.dom.migrate(dest_lv_conn, libvirt.VIR_MIGRATE_LIVE, None, dest_tcp, 0)
if not target_dom:
raise
except:
self.logger.out('Failed to send VM to {}; aborting live migration.'.format(dest_lv), state='e', prefix='Domain {}:'.format(self.domuuid))
except Exception as e:
self.logger.out('Failed to send VM to {} - aborting live migration; error: {}'.format(dest_lv, e), state='e', prefix='Domain {}:'.format(self.domuuid))
dest_lv_conn.close()
return False