WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Refuse to save dom0, and move the check that refuses to

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Refuse to save dom0, and move the check that refuses to migrate dom0 from
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 08 Dec 2005 15:28:08 +0000
Delivery-date: Thu, 08 Dec 2005 15:28:44 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 05b37057b1cf9ca018a024e69712b37c5d946a44
# Parent  b215584242c43415eccd008b90c812f3d04b398d
Refuse to save dom0, and move the check that refuses to migrate dom0 from
migrate.py into XendDomain.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r b215584242c4 -r 05b37057b1cf tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Wed Dec  7 16:26:07 2005
+++ b/tools/python/xen/xend/XendDomain.py       Thu Dec  8 12:08:59 2005
@@ -395,6 +395,9 @@
 
         dominfo = self.domain_lookup(domid)
 
+        if dominfo.getDomid() == PRIV_DOMAIN:
+            raise XendError("Cannot migrate privileged domain %i" % domid)
+
         port = xroot.get_xend_relocation_port()
         try:
             sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@@ -415,6 +418,9 @@
 
         try:
             dominfo = self.domain_lookup(domid)
+
+            if dominfo.getDomid() == PRIV_DOMAIN:
+                raise XendError("Cannot save privileged domain %i" % domid)
 
             fd = os.open(dst, os.O_WRONLY | os.O_CREAT | os.O_TRUNC)
             try:
diff -r b215584242c4 -r 05b37057b1cf tools/python/xen/xm/migrate.py
--- a/tools/python/xen/xm/migrate.py    Wed Dec  7 16:26:07 2005
+++ b/tools/python/xen/xm/migrate.py    Thu Dec  8 12:08:59 2005
@@ -13,6 +13,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #============================================================================
 # Copyright (C) 2004, 2005 Mike Wray <mike.wray@xxxxxx>
+# Copyright (c) 2005 XenSource Ltd.
 #============================================================================
 
 """Domain migration.
@@ -22,9 +23,6 @@
 
 from xen.xend.XendClient import server
 from xen.xm.opts import *
-
-DOM0_NAME = 'Domain-0'
-DOM0_ID = '0'
 
 gopts = Opts(use="""[options] DOM HOST
 
@@ -58,7 +56,4 @@
         opts.err('Invalid arguments: ' + str(args))
     dom = args[0]
     dst = args[1]
-    if dom in [DOM0_NAME, DOM0_ID]:
-        opts.err('Cannot migrate ' + dom)
     server.xend_domain_migrate(dom, dst, opts.vals.live, opts.vals.resource)
-        

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Refuse to save dom0, and move the check that refuses to migrate dom0 from, Xen patchbot -unstable <=