From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Wolf Subject: [PATCH] Fix xm start -c / --vncviewer Date: Thu, 25 Sep 2008 13:27:55 +0200 Message-ID: <48DB75BB.9000400@suse.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060806000607050809020405" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------060806000607050809020405 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit In xm start the --vncviewer option has no effect, instead -c tries to both connect to the console and start vncviewer. Additionally, to start vncviewer it uses the domid variable which is only defined a few lines later. Thus xm start -c doesn't work at all. This patch fixes both problems. Signed-off-by: Kevin Wolf --------------060806000607050809020405 Content-Type: text/x-patch; name="fix-xm-start.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fix-xm-start.patch" Index: xen-unstable.hg/tools/python/xen/xm/main.py =================================================================== --- xen-unstable.hg.orig/tools/python/xen/xm/main.py +++ xen-unstable.hg/tools/python/xen/xm/main.py @@ -1224,9 +1224,6 @@ def xm_start(args): if console_autoconnect: start_do_console(dom) - if console_autoconnect: - console.runVncViewer(domid, vncviewer_autopass, True) - try: if serverType == SERVER_XEN_API: server.xenapi.VM.start(get_single_vm(dom), paused) @@ -1241,6 +1238,10 @@ def xm_start(args): if domid == -1: raise xmlrpclib.Fault(0, "Domain '%s' is not started" % dom) + if vncviewer: + console.runVncViewer(domid, vncviewer_autopass, True) + + def xm_delete(args): arg_check(args, "delete", 1) dom = args[0] --------------060806000607050809020405 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------060806000607050809020405--