ia64/xen-unstable

changeset 15577:2099e4af5aed

xend: Fix 'xm dumpcore' for inactive managed domains.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author kfraser@localhost.localdomain
date Wed Jul 11 10:53:32 2007 +0100 (2007-07-11)
parents eae9dc5e7898
children c7b68954963b
files tools/python/xen/xend/XendDomain.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomain.py	Wed Jul 11 10:52:19 2007 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomain.py	Wed Jul 11 10:53:32 2007 +0100
     1.3 @@ -1164,6 +1164,10 @@ class XendDomain:
     1.4  
     1.5          if dominfo.getDomid() == DOM0_ID:
     1.6              raise XendError("Cannot dump core for privileged domain %s" % domid)
     1.7 +        if dominfo._stateGet() not in (DOM_STATE_PAUSED, DOM_STATE_RUNNING):
     1.8 +            raise VMBadState("Domain '%s' is not started" % domid,
     1.9 +                             POWER_STATE_NAMES[DOM_STATE_PAUSED],
    1.10 +                             POWER_STATE_NAMES[dominfo._stateGet()])
    1.11  
    1.12          try:
    1.13              log.info("Domain core dump requested for domain %s (%d) "