mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
Fix managed domain rebooting by only complaining about a VM name conflict if
the VM UUID conflicts as well. Also, remove the previous_restart_time node when explicitly rebooting a guest -- the user ought to be able to drive reboots faster than the safety catch. Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
1 parent
be61b6ee05
commit
f99727ee65
1 file changed
+5
-3
@@ -479,8 +479,9 @@ class XendDomainInfo:
|
||||
|
||||
if reason not in DOMAIN_SHUTDOWN_REASONS.values():
|
||||
raise XendError('Invalid reason: %s' % reason)
|
||||
self._removeVm('xend/previous_restart_time')
|
||||
self.storeDom("control/shutdown", reason)
|
||||
|
||||
|
||||
def pause(self):
|
||||
"""Pause domain
|
||||
|
||||
@@ -1692,8 +1693,9 @@ class XendDomainInfo:
|
||||
raise VmError('Invalid VM Name')
|
||||
|
||||
dom = XendDomain.instance().domain_lookup_nr(name)
|
||||
if dom and dom != self and not dom.info['dying']:
|
||||
raise VmError("VM name '%s' already exists" % name)
|
||||
if dom and dom.info['uuid'] != self.info['uuid']:
|
||||
raise VmError("VM name '%s' already exists as domain %s" %
|
||||
(name, str(dom.domid)))
|
||||
|
||||
|
||||
def update(self, info = None, refresh = True):
|
||||
|
||||