1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

add offline migration option

This commit is contained in:
Ing. Jan KRCMAR 2017-01-04 13:14:30 +01:00
parent 48371ff92d
commit 20d0e5a09d
3 changed files with 12 additions and 8 deletions

View file

@ -67,20 +67,18 @@ class wvmInstances(wvmConnect):
dom = self.get_instance(name)
dom.resume()
def moveto(self, conn, name, live, unsafe, undefine):
def moveto(self, conn, name, live, unsafe, undefine, offline):
flags = 0
if live and conn.get_status() == 1:
flags |= VIR_MIGRATE_LIVE
if unsafe and conn.get_status() == 1:
flags |= VIR_MIGRATE_UNSAFE
dom = conn.get_instance(name)
dom.migrate(self.wvm, flags, name, None, 0)
xml = dom.XMLDesc(VIR_DOMAIN_XML_SECURE)
if not offline:
dom.migrate(self.wvm, flags, None, None, 0)
if undefine:
dom.undefine()
def define_move(self, name):
dom = self.get_instance(name)
xml = dom.XMLDesc(VIR_DOMAIN_XML_SECURE)
self.wvm.defineXML(xml)
def graphics_type(self, name):