Received: from [140.186.70.92] (port=34953 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PsIU6-0006Ay-D7 for qemu-devel@nongnu.org; Wed, 23 Feb 2011 12:26:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PsIU5-0007f4-77 for qemu-devel@nongnu.org; Wed, 23 Feb 2011 12:26:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:7975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PsIU4-0007er-V4 for qemu-devel@nongnu.org; Wed, 23 Feb 2011 12:26:41 -0500 From: Markus Armbruster Subject: Re: [Qemu-devel] Re: [patch 2/3] Add support for live block copy References: <20110222170004.808373778@redhat.com> <20110222170115.710717278@redhat.com> <4D642181.4080509@codemonkey.ws> <20110222210735.GA9372@amt.cnet> <4D64266A.3060106@codemonkey.ws> <20110222230935.GA11082@amt.cnet> <4D644343.4050800@codemonkey.ws> <4D65051A.6070707@redhat.com> <4D651B20.70405@codemonkey.ws> <4D652852.60505@redhat.com> Date: Wed, 23 Feb 2011 18:26:25 +0100 In-Reply-To: <4D652852.60505@redhat.com> (Avi Kivity's message of "Wed, 23 Feb 2011 17:31:30 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Jes.Sorensen@redhat.com, Marcelo Tosatti , qemu-devel@nongnu.org Avi Kivity writes: > On 02/23/2011 04:35 PM, Anthony Liguori wrote: >> On 02/23/2011 07:01 AM, Avi Kivity wrote: >>> On 02/23/2011 01:14 AM, Anthony Liguori wrote: >>>> >>>> -drive already ties into the qemuopts infrastructure and we have >>>> readconfig and writeconfig. I don't think we're missing any major >>>> pieces to do this in a more proper fashion. >>> >>> The problem with qemu config files is that it splits the >>> authoritative source of where images are stored into two. Is it in >>> the management tool's database or is it in qemu's config file? >> >> I like to use the phrase "stateful config file". To me, it's just a >> database for QEMU to persist data about the VM. It's the only way >> for QEMU to make certain transactions atomic in the face of QEMU >> crashing. >> >> The user visible config file is a totally different concept. A >> management tool launches QEMU and tells it where to keep it's state >> database. The management application may prepopulate the state >> database or it may just use an empty file. > > In that case the word 'config' is misleading. To me, it implies that > the user configures something, and qemu reads it, not something mostly > internal to qemu. > > Qemu does keep state. Currently only images, but in theory also the > on-board NVRAM. > >> >> QEMU uses the state database to store information that is created >> dynamically. For instance, devices added through device_add. A >> device added via -device wouldn't necessary get added to the state >> database. >> >> Practically speaking, it let's you invoke QEMU with a fixed command >> line, while still using the monitor to make changes that would >> otherwise require the command line being updated. > > Then the invoker quickly loses track of what the actual state is. It > can't just remember which commands it issued (presumably in response > to the user updating user visible state). It has to parse the > stateful config file qemu outputs. But at which points should it > parse it? > > I don't think it's reasonable to have three different ways to interact > with qemu, all needed: the command line, reading and writing the > stateful config file, and the monitor. I'd rather push for starting > qemu with a blank guest and assembling (cold-plugging) all the > hardware via the monitor before starting the guest. Exactly. And qdev has brought his within our reach. [...]