From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39965) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4TD9-0008Ti-10 for qemu-devel@nongnu.org; Thu, 23 Aug 2012 04:56:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4TD4-00042b-Ir for qemu-devel@nongnu.org; Thu, 23 Aug 2012 04:56:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55761) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4TD4-00042S-B2 for qemu-devel@nongnu.org; Thu, 23 Aug 2012 04:56:14 -0400 Date: Thu, 23 Aug 2012 09:56:10 +0100 From: "Daniel P. Berrange" Message-ID: <20120823085610.GA10833@redhat.com> References: <20120822200337.GA9878@redhat.com> <87obm28yil.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87obm28yil.fsf@codemonkey.ws> Subject: Re: [Qemu-devel] How to reliably start a bare QEMU target to query capabilities via QMP Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, Markus Armbruster On Wed, Aug 22, 2012 at 03:25:38PM -0500, Anthony Liguori wrote: > "Daniel P. Berrange" writes: > > > I've been adapting libvirt to use to the various new QMP commands to > > query QEMU's capabilities, instead of the hated -help parsing. Obviously > > the critical part of this is being able to reliably start a bare QEMU > > process with no actual guest OS configured (no disks, no kernel, etc) > > and talk to its monitor. I hadn't anticipated problems since I only > > tested with x86_64 / i386 most of the time, which work well in this > > respect. Currently I am doing > > > > # $QEMU_BINARY -S \ > > -no-user-config \ > > -nodefconfig \ > > -nodefaults \ > > -nographic \ > > -qmp stdio > > > > > > This works for about 50% of the QEMU targets: > > Do we have to go down the route of adding some sort of "-no-vm" flag to > > explicitly say we don't care about any of the VM setup parts ? This would > > be more like what my old patches did which mapped monitors commands > > onto '-query-XXXXX' command line args, bypassing VM setup, but still > > using normal QMP monitor interaction. > > > > Any other suggestions on how to reliably get a QMP monitor to a target, > > without any VM config. ? > > -M none. See the patch I just sent out. I think we can include this in > 1.2 as it poses no real risk. Great, that's an nice elegant solution to the problem :-) Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|