2007-02-11 11:48:10 +01:00
|
|
|
Index: xen-3.0.4-testing/tools/misc/xend
|
2007-01-16 00:42:10 +01:00
|
|
|
===================================================================
|
2007-02-11 11:48:10 +01:00
|
|
|
--- xen-3.0.4-testing.orig/tools/misc/xend
|
|
|
|
+++ xen-3.0.4-testing/tools/misc/xend
|
|
|
|
@@ -60,22 +60,6 @@ def hline():
|
|
|
|
def msg(message):
|
|
|
|
print >>sys.stderr, "*" * 3, message
|
|
|
|
|
|
|
|
-def check_logging():
|
|
|
|
- """Check python logging is installed and raise an error if not.
|
|
|
|
- Logging is standard from Python 2.3 on.
|
|
|
|
- """
|
|
|
|
- try:
|
|
|
|
- import logging
|
|
|
|
- except ImportError:
|
2007-01-16 00:42:10 +01:00
|
|
|
- hline()
|
|
|
|
- msg("Python logging is not installed.")
|
|
|
|
- msg("Use 'make install-logging' at the xen root to install.")
|
|
|
|
- msg("")
|
|
|
|
- msg("Alternatively download and install from")
|
|
|
|
- msg("http://www.red-dove.com/python_logging.html")
|
|
|
|
- hline()
|
|
|
|
- raise CheckError("logging is not installed")
|
2007-02-11 11:48:10 +01:00
|
|
|
-
|
2007-01-16 00:42:10 +01:00
|
|
|
def check_user():
|
|
|
|
"""Check that the effective user id is 0 (root).
|
2007-02-11 11:48:10 +01:00
|
|
|
"""
|
|
|
|
@@ -102,7 +86,6 @@ def start_blktapctrl():
|
|
|
|
|
|
|
|
def main():
|
|
|
|
try:
|
|
|
|
- check_logging()
|
|
|
|
check_user()
|
|
|
|
except CheckError:
|
|
|
|
sys.exit(1)
|
|
|
|
Index: xen-3.0.4-testing/tools/python/xen/xend/XendDomain.py
|
2007-01-16 00:42:10 +01:00
|
|
|
===================================================================
|
2007-02-11 11:48:10 +01:00
|
|
|
--- xen-3.0.4-testing.orig/tools/python/xen/xend/XendDomain.py
|
|
|
|
+++ xen-3.0.4-testing/tools/python/xen/xend/XendDomain.py
|
|
|
|
@@ -780,6 +780,8 @@ class XendDomain:
|
2007-01-16 00:42:10 +01:00
|
|
|
|
2007-02-11 11:48:10 +01:00
|
|
|
if dominfo.getDomid() == DOM0_ID:
|
|
|
|
raise XendError("Cannot save privileged domain %s" % domname)
|
2007-01-16 00:42:10 +01:00
|
|
|
+ if dominfo.readVm('image/ostype') == "hvm":
|
|
|
|
+ raise XendError("Cannot save fully virtualized domains")
|
|
|
|
|
2007-02-11 11:48:10 +01:00
|
|
|
if dominfo.state != DOM_STATE_RUNNING:
|
|
|
|
raise XendError("Cannot suspend domain that is not running.")
|