Refuse to save dom0, and move the check that refuses to migrate dom0 from

migrate.py into XendDomain.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
emellor@leeni.uk.xensource.com committed 2005-12-08 12:08:59 +00:00
1 parent d96a859929
commit 7b4fe715a5
2 files changed
+7 -6

No files matched your search

+6
View File
@@ -395,6 +395,9 @@ class XendDomain:
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)
@@ -416,6 +419,9 @@ class XendDomain:
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:
# For now we don't support 'live checkpoint'
+1 -6
View File
@@ -13,6 +13,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#============================================================================
# Copyright (C) 2004, 2005 Mike Wray <mike.wray@hp.com>
# Copyright (c) 2005 XenSource Ltd.
#============================================================================
"""Domain migration.
@@ -23,9 +24,6 @@ import sys
from xen.xend.XendClient import server
from xen.xm.opts import *
DOM0_NAME = 'Domain-0'
DOM0_ID = '0'
gopts = Opts(use="""[options] DOM HOST
Migrate domain DOM to host HOST.
@@ -58,7 +56,4 @@ def main(argv):
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)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.