mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
in XenDomain. The devices we will add, like network, will need to run console commands when a domain is started. So I have made console be a part of domain object, which it's tied to anyway. Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
38 lines
788 B
Python
38 lines
788 B
Python
#!/usr/bin/python
|
|
|
|
# Copyright (C) International Business Machines Corp., 2005
|
|
# Author: Dan Smith <danms@us.ibm.com>
|
|
|
|
import time
|
|
|
|
from XmTestLib import *
|
|
|
|
if ENABLE_HVM_SUPPORT:
|
|
SKIP("Save currently not supported for HVM domains")
|
|
|
|
domain = XmTestDomain()
|
|
|
|
try:
|
|
console = domain.start()
|
|
except DomainError, e:
|
|
if verbose:
|
|
print "Failed to create test domain because:"
|
|
print e.extra
|
|
FAIL(str(e))
|
|
|
|
domain.closeConsole()
|
|
|
|
# Save it out
|
|
try:
|
|
s, o = traceCommand("xm save %s /tmp/test.state" % domain.getName(),
|
|
timeout=30)
|
|
except TimeoutError, e:
|
|
FAIL(str(e))
|
|
|
|
if s != 0:
|
|
FAIL("save command exited %i != 0" % s)
|
|
|
|
# Make sure it's gone
|
|
if isDomainRunning(domain.getName()):
|
|
FAIL("Domain still running after save!")
|