From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LuNVG-0006cJ-3m for qemu-devel@nongnu.org; Thu, 16 Apr 2009 05:03:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LuNVB-0006b9-Tl for qemu-devel@nongnu.org; Thu, 16 Apr 2009 05:03:25 -0400 Received: from [199.232.76.173] (port=58125 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LuNVB-0006av-Ik for qemu-devel@nongnu.org; Thu, 16 Apr 2009 05:03:21 -0400 Received: from mx2.redhat.com ([66.187.237.31]:34573) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LuNVA-0004pX-Sv for qemu-devel@nongnu.org; Thu, 16 Apr 2009 05:03:21 -0400 Message-ID: <49E6F451.6020604@redhat.com> Date: Thu, 16 Apr 2009 12:03:13 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [libvirt] Re: [Qemu-devel] [PATCH 1/6] Allow multiple monitor devices (v2) References: <49DE229B.7050408@redhat.com> <49DE2580.2030507@us.ibm.com> <49DE29C5.6010601@redhat.com> <49DE3321.4090900@us.ibm.com> <49E0C47F.9070501@redhat.com> <49E0FB00.8080500@codemonkey.ws> <49E10823.8060200@redhat.com> <20090412184217.GB4394@shareable.org> <20090414083016.GF14297@redhat.com> <49E4542B.8020808@redhat.com> <20090414181908.GD32311@shareable.org> In-Reply-To: <20090414181908.GD32311@shareable.org> 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: Jamie Lokier Cc: libvir-list@redhat.com, Jan Kiszka , qemu-devel@nongnu.org, Hollis Blanchard Jamie Lokier wrote: > Avi Kivity wrote: > >> Daniel P. Berrange wrote: >> >>> Yes indeed its a little crazy :-) As anthony mentioned if libvirt were >>> able to be notified of changes a user makes in the monitor, there's no >>> reason we could not allow end users to access the monitor of a VM >>> libvirt is managing. We just need to make sure libvirt doesn't miss >>> changes like attaching or detaching block devices, etc, because that'll >>> cause crash/data loss later when libvirt migrates or does save/restore, >>> etc because it'll launch QEMU with wrong args >>> >>> >> You still have an inherent race here. >> >> user: plug in disk >> libvirt: start migration, still without disk >> qemu: libvirt, a disk has been plugged in. >> > > Then fix it. The race is not necessary. > > user: plug in a disk > libvirt: lock VM against user changes incompatible with migration > qemu: libvirt, lock granted > libvirt: query for current disk state > libvirt: start migration, knows about the disk > > The "libvirt, a disk has been plugged in" will be delivered but it's > not important. libvirt queries the state of things after it acquires > the lock and before it starts migration. > > Migration is supposed to be transparent. You're reducing quality of service if you're disabling features while migrating. >> That means that to debug a problem in the field you have to locate a >> guest's host, and follow it around as it migrates (or disable migration). >> > > That's right you do. Is there any way to debug a guest without > disabling migration? I don't think there is at present, so of course > you have to disable migration when you debug. Another reason for that > "lock against migration" mentioned above. > Nothing prevents you from debugging a guest during migration. You'll have to reconnect to the monitor, but that's it. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.