2007-03-06 09:12:51 +01:00
|
|
|
diff -ru xen-3.0.4-testing.orig/tools/misc/xend xen-3.0.4-testing/tools/misc/xend
|
|
|
|
--- xen-3.0.4-testing.orig/tools/misc/xend 2006-12-14 14:49:56.000000000 -0700
|
|
|
|
+++ xen-3.0.4-testing/tools/misc/xend 2007-03-01 18:05:38.000000000 -0700
|
|
|
|
@@ -60,22 +60,6 @@
|
2007-02-11 11:48:10 +01:00
|
|
|
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
|
|
|
"""
|
2007-03-06 09:12:51 +01:00
|
|
|
@@ -102,7 +86,6 @@
|
2007-02-11 11:48:10 +01:00
|
|
|
|
|
|
|
def main():
|
|
|
|
try:
|
|
|
|
- check_logging()
|
|
|
|
check_user()
|
|
|
|
except CheckError:
|
|
|
|
sys.exit(1)
|
2007-03-06 09:12:51 +01:00
|
|
|
diff -ru xen-3.0.4-testing.orig/tools/python/xen/xend/XendDomain.py xen-3.0.4-testing/tools/python/xen/xend/XendDomain.py
|
|
|
|
--- xen-3.0.4-testing.orig/tools/python/xen/xend/XendDomain.py 2006-12-18 14:57:04.000000000 -0700
|
|
|
|
+++ xen-3.0.4-testing/tools/python/xen/xend/XendDomain.py 2007-03-01 18:06:31.000000000 -0700
|
|
|
|
@@ -780,6 +780,8 @@
|
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-03-06 09:12:51 +01:00
|
|
|
+ if dominfo._readVm('image/ostype') == "hvm":
|
2007-01-16 00:42:10 +01:00
|
|
|
+ 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.")
|
2007-03-06 09:12:51 +01:00
|
|
|
@@ -1158,6 +1160,8 @@
|
|
|
|
|
|
|
|
if dominfo.getDomid() == DOM0_ID:
|
|
|
|
raise XendError("Cannot save privileged domain %i" % domid)
|
|
|
|
+ if dominfo._readVm('image/ostype') == "hvm":
|
|
|
|
+ raise XendError("Cannot save fully virtualized domains")
|
|
|
|
|
|
|
|
fd = os.open(dst, os.O_WRONLY | os.O_CREAT | os.O_TRUNC)
|
|
|
|
try:
|