[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [Patch] fix xm create -load option issue
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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |