From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ntzt4-00058E-Vr for qemu-devel@nongnu.org; Tue, 23 Mar 2010 04:54:59 -0400 Received: from [199.232.76.173] (port=59700 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ntzt4-000580-JE for qemu-devel@nongnu.org; Tue, 23 Mar 2010 04:54:58 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Ntzt2-0000SY-Oj for qemu-devel@nongnu.org; Tue, 23 Mar 2010 04:54:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15168) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ntzt2-0000SS-Ag for qemu-devel@nongnu.org; Tue, 23 Mar 2010 04:54:56 -0400 Message-ID: <4BA881D5.8000506@redhat.com> Date: Tue, 23 Mar 2010 09:54:45 +0100 From: Jes Sorensen MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [libvirt] Supporting hypervisor specific APIs in libvirt References: <4BA7C40C.2040505@codemonkey.ws> <20100322201003.GC28709@redhat.com> <4BA7E23A.2070502@redhat.com> <4BA7E6F0.5010501@codemonkey.ws> In-Reply-To: <4BA7E6F0.5010501@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: "libvir-list@redhat.com" , Gerd Hoffmann , qemu-devel On 03/22/10 22:53, Anthony Liguori wrote: > On 03/22/2010 04:33 PM, Gerd Hoffmann wrote: >> libvirt is very unfriendly to qemu hackers. There is no easy way to >> add command line switches. There is no easy way to get access to the >> monitor. I can get it done by pointing to a wrapper script >> and mangle the qemu command line there. But this sucks big time. And >> it doesn't integrate with libvirt at all. > > It's not just developers. As we're doing deployments of qemu/kvm, we > keep running into the same problem. We realize that we need to use a > feature of qemu/kvm that isn't modelled by libvirt today. I've gone as > far as to temporarily pausing libvirtd, finding the pty fd from > /proc/, and hijacking the monitor session temporarily. One problem I have found, and I am not sure how to fix this in this context. Sometimes when hacking on qemu, I want to try out a new qemu binary on an existing image, without replacing the system wide one and may want to pass new command line flags for testing those, plus have access to the monitor. What I do now is to look at the command line arguments of a guest using ps and try and mimic it, but due to the random magic ptys and other stuff, it's practically impossible to replicate a libvirt spawned qemu on the command line. I end up having a somewhat similar command line with everything removed that I cannot replicate. I find it a real problem that libvirt tries to wrap things to the point that an ordinary human cannot read, modify it's configuration or do a simple command line spawn to replicate it, but as I said, I am not sure how to solve the problem. Regards, Jes