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-devel

[Xen-devel] [Patch] fix xm create -load option issue

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [Patch] fix xm create -load option issue
From: Matsumoto <n_matumoto@xxxxxxxxxxxxxxxx>
Date: Fri, 17 Mar 2006 17:35:12 +0900
Delivery-date: Fri, 17 Mar 2006 08:34:53 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

When executed "xm create" with the load option (--load) ,
an error occurs.

error is :
Please report to xen-devel@xxxxxxxxxxxxxxxxxxx
Traceback (most recent call last):
  File "/usr/sbin/xm", line 10, in ?
    main.main(sys.argv)
  File "/usr/lib/python/xen/xm/main.py", line 1117, in main
    rc = cmd(args)
  File "<string>", line 1, in <lambda>
  File "/usr/lib/python/xen/xm/main.py", line 553, in xm_subcommand
    cmd.main([command] + args)
  File "/usr/lib/python/xen/xm/create.py", line 891, in main
    dom = make_domain(opts, config)
  File "/usr/lib/python/xen/xm/create.py", line 824, in make_domain
    dominfo = server.xend_domain_restore(filename, config)
TypeError: xend_domain_restore() takes exactly 2 arguments (3 given)

This patch fixed the problem above.

Best Regards,
Matsumoto

Signed-off-by: Matsumoto <n_matumoto@xxxxxxxxxxxxxxxx>

diff -r 1569bc48b0b8 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Wed Mar 15 19:25:50 2006
+++ b/tools/python/xen/xm/create.py     Fri Mar 17 16:35:42 2006
@@ -819,11 +819,7 @@
     """
 
     try:
-        if opts.vals.load:
-            filename = os.path.abspath(opts.vals.load)
-            dominfo = server.xend_domain_restore(filename, config)
-        else:
-            dominfo = server.xend_domain_create(config)
+        dominfo = server.xend_domain_create(config)
     except XendError, ex:
         import signal
         if vncpid:
@@ -852,6 +848,9 @@
         gopts.load_defconfig(help=1)
     if gopts.vals.help or gopts.vals.help_config:
         return (None, None)
+
+    if gopts.vals.load:
+        return (gopts, None)
 
     if not gopts.vals.display:
         gopts.vals.display = os.getenv("DISPLAY")
@@ -887,6 +886,9 @@
 
     if opts.vals.dryrun:
         PrettyPrint.prettyprint(config)
+    elif opts.vals.load:
+        filename = os.path.abspath(opts.vals.load)
+        server.xend_domain_restore(filename)
     else:
         dom = make_domain(opts, config)
         if opts.vals.console_autoconnect:



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

<Prev in Thread] Current Thread [Next in Thread>