domain: Remove internal 'cloning' marker
qemu nowadays should reject the common cases here with its default image locking. Our impl wasn't very good anyways so let's just leave it up to the lower layers
This commit is contained in:
parent
9c8e879ff0
commit
b513388979
|
@ -838,8 +838,6 @@ class vmmCloneVM(vmmGObjectUI):
|
||||||
progWin.run()
|
progWin.run()
|
||||||
|
|
||||||
def _async_clone(self, asyncjob):
|
def _async_clone(self, asyncjob):
|
||||||
try:
|
|
||||||
self.vm.set_cloning(True)
|
|
||||||
meter = asyncjob.get_meter()
|
meter = asyncjob.get_meter()
|
||||||
|
|
||||||
refresh_pools = []
|
refresh_pools = []
|
||||||
|
@ -863,10 +861,6 @@ class vmmCloneVM(vmmGObjectUI):
|
||||||
self.idle_add(pool.refresh)
|
self.idle_add(pool.refresh)
|
||||||
except Exception:
|
except Exception:
|
||||||
logging.debug("Error looking up pool=%s for refresh after "
|
logging.debug("Error looking up pool=%s for refresh after "
|
||||||
"VM clone.", poolname, exc_info=True)
|
|
||||||
|
|
||||||
finally:
|
|
||||||
self.vm.set_cloning(False)
|
|
||||||
|
|
||||||
def change_storage_browse(self, ignore):
|
def change_storage_browse(self, ignore):
|
||||||
def callback(src_ignore, txt):
|
def callback(src_ignore, txt):
|
||||||
|
|
|
@ -252,11 +252,6 @@ class vmmDomain(vmmLibvirtObject):
|
||||||
self._status_reason = self._backend.state()[1]
|
self._status_reason = self._backend.state()[1]
|
||||||
return self._status_reason
|
return self._status_reason
|
||||||
|
|
||||||
def get_cloning(self):
|
|
||||||
return self.cloning
|
|
||||||
def set_cloning(self, val):
|
|
||||||
self.cloning = bool(val)
|
|
||||||
|
|
||||||
# If manual shutdown or destroy specified, make sure we don't continue
|
# If manual shutdown or destroy specified, make sure we don't continue
|
||||||
# install process
|
# install process
|
||||||
def get_install_abort(self):
|
def get_install_abort(self):
|
||||||
|
@ -1281,9 +1276,6 @@ class vmmDomain(vmmLibvirtObject):
|
||||||
|
|
||||||
@vmmLibvirtObject.lifecycle_action
|
@vmmLibvirtObject.lifecycle_action
|
||||||
def startup(self):
|
def startup(self):
|
||||||
if self.get_cloning():
|
|
||||||
raise RuntimeError(_("Cannot start guest while cloning "
|
|
||||||
"operation in progress"))
|
|
||||||
self._backend.create()
|
self._backend.create()
|
||||||
|
|
||||||
@vmmLibvirtObject.lifecycle_action
|
@vmmLibvirtObject.lifecycle_action
|
||||||
|
@ -1316,9 +1308,6 @@ class vmmDomain(vmmLibvirtObject):
|
||||||
|
|
||||||
@vmmLibvirtObject.lifecycle_action
|
@vmmLibvirtObject.lifecycle_action
|
||||||
def resume(self):
|
def resume(self):
|
||||||
if self.get_cloning():
|
|
||||||
raise RuntimeError(_("Cannot resume guest while cloning "
|
|
||||||
"operation in progress"))
|
|
||||||
self._backend.resume()
|
self._backend.resume()
|
||||||
|
|
||||||
@vmmLibvirtObject.lifecycle_action
|
@vmmLibvirtObject.lifecycle_action
|
||||||
|
|
Loading…
Reference in New Issue