xen/xen-messages.diff

58 lines
2.1 KiB
Diff

Index: xen-3.0.5-testing/tools/misc/xend
===================================================================
--- xen-3.0.5-testing.orig/tools/misc/xend
+++ xen-3.0.5-testing/tools/misc/xend
@@ -50,22 +50,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:
- 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")
-
def check_user():
"""Check that the effective user id is 0 (root).
"""
@@ -92,7 +76,6 @@ def start_blktapctrl():
def main():
try:
- check_logging()
check_user()
except CheckError:
sys.exit(1)
Index: xen-3.0.5-testing/tools/python/xen/xend/XendDomain.py
===================================================================
--- xen-3.0.5-testing.orig/tools/python/xen/xend/XendDomain.py
+++ xen-3.0.5-testing/tools/python/xen/xend/XendDomain.py
@@ -825,6 +825,8 @@ class XendDomain:
if dominfo.getDomid() == DOM0_ID:
raise XendError("Cannot save privileged domain %s" % domname)
+ if dominfo._readVm('image/ostype') == "hvm":
+ raise XendError("Cannot save fully virtualized domains")
if dominfo._stateGet() != DOM_STATE_RUNNING:
raise VMBadState("Domain is not running",
@@ -1243,6 +1245,8 @@ class XendDomain:
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")
oflags = os.O_WRONLY | os.O_CREAT | os.O_TRUNC
if hasattr(os, "O_LARGEFILE"):