From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KWF1c-0001nD-LV for qemu-devel@nongnu.org; Thu, 21 Aug 2008 14:36:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KWF1b-0001ko-22 for qemu-devel@nongnu.org; Thu, 21 Aug 2008 14:36:48 -0400 Received: from [199.232.76.173] (port=53268 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWF1a-0001kL-O8 for qemu-devel@nongnu.org; Thu, 21 Aug 2008 14:36:46 -0400 Received: from wr-out-0506.google.com ([64.233.184.229]:16864) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KWF1Y-0004Hm-WC for qemu-devel@nongnu.org; Thu, 21 Aug 2008 14:36:45 -0400 Received: by wr-out-0506.google.com with SMTP id c46so122156wra.18 for ; Thu, 21 Aug 2008 11:36:42 -0700 (PDT) Message-ID: <48ADB58D.9070409@codemonkey.ws> Date: Thu, 21 Aug 2008 13:35:57 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] vnc port selection References: <48AD99CF.6070004@redhat.com> <48ADB43D.9050401@qumranet.com> In-Reply-To: <48ADB43D.9050401@qumranet.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Xen Development Mailing List Avi Kivity wrote: > Gerd Hoffmann wrote: >> Hi folks, >> >> Xen's qemu-dm version has a '-vncunused' command line switch which asks >> the internal vnc server to pick any unused tcp port to listen on. The >> actual port is communicated to the outside world via xenstore. >> >> I'm looking for a reasonable way to implement that functionality in >> upstream qemu. First, I think it shouldn't be a separate command line >> switch but an option for the existion -vnc switch. Second, we need a >> way to communicate the port picked which isn't xen-specific. Obvious >> choice is a monitor info subcommand. >> >> Comments? Other suggestions? >> >> > > Presumably -vncunused is passed by the management application, which > knows about all domains. Can't it figure out an unused port and pass > it on? An argument for this sort of semantics is that if you just launch vncserver with no argument, it'll sit on the first unused port. So people are sort of used to this behavior. > Alternatively, have the management application pass an fd denoting the > socket. If you are allocating the ports in the management tool, then just tell QEMU what port to open up. I don't think you gain anything passing an fd. Regards, Anthony Liguori