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:
Keir Fraser committed 2008-05-20 09:43:02 +01:00
1 parent 7087fca7e1
commit 07a57a397e
1 file changed
+4
+4
View File
@@ -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)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.