Hi, When executed "xm create" with the load option (--load) , an error occurs. error is : Please report to xen-devel@lists.xensource.com 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@soft.fujitsu.com> 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@lists.xensource.com http://lists.xensource.com/xen-devel
Ewan Mellor
2006-Mar-17 11:29 UTC
Re: [Xen-devel] [Patch] fix xm create -load option issue
On Fri, Mar 17, 2006 at 05:35:12PM +0900, Matsumoto wrote:> Hi, > > When executed "xm create" with the load option (--load) , > an error occurs.I didn''t even know that there _was_ an xm create --load command! It seems to me that xm create --load is precisely equivalent to xm restore (following your patch). Obviously, no-one''s using this -- it seems to have been broken since at least July 2004! I''ll just remove the option altogether -- please use xm restore instead. Thanks, Ewan. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel