mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
xm migrate: Better error report when attempt to migrate non-running domain.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
This commit is contained in:
1 parent
7087fca7e1
commit
07a57a397e
1 file changed
+4
@@ -1282,6 +1282,10 @@ class XendDomain:
|
||||
|
||||
if dominfo.getDomid() == DOM0_ID:
|
||||
raise XendError("Cannot migrate privileged domain %s" % domid)
|
||||
if dominfo._stateGet() != DOM_STATE_RUNNING:
|
||||
raise VMBadState("Domain is not running",
|
||||
POWER_STATE_NAMES[DOM_STATE_RUNNING],
|
||||
POWER_STATE_NAMES[dominfo._stateGet()])
|
||||
|
||||
""" The following call may raise a XendError exception """
|
||||
dominfo.testMigrateDevices(True, dst)
|
||||
|
||||