From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [patch 23/23] QEMU/KVM: device hot-remove Date: Wed, 05 Mar 2008 08:28:46 +0200 Message-ID: <47CE3D9E.3030709@qumranet.com> References: <20080304183419.187172133@localhost.localdomain> <20080304183904.138632390@localhost.localdomain> <20080304191843.GM6713@redhat.com> <47CDA3C6.6080407@codemonkey.ws> <20080304200008.GA28625@dmt> <20080304200629.GR6713@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm-devel@lists.sourceforge.net, Glauber Costa To: "Daniel P. Berrange" Return-path: In-Reply-To: <20080304200629.GR6713@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Daniel P. Berrange wrote: >> (qemu) info block >> ide0-hd0: type=hd removable=0 file=/root/images/marcelo5.img ro=0 drv=raw >> ide1-cd0: type=cdrom removable=1 locked=0 [not inserted] >> floppy0: type=floppy removable=1 locked=0 [not inserted] >> sd0: type=floppy removable=1 locked=0 [not inserted] >> scsi0-hd0: type=hd removable=0 file=/tmp/bigfile ro=0 drv=raw >> scsi0-hd1: type=hd removable=0 file=/tmp/bigfile.2 ro=0 drv=raw >> >> (qemu) info network >> VLAN 0 devices: >> tap: ifname=tap0 setup_script=qemu-ifup-tap0 >> rtl8139 pci macaddr=52:54:00:12:34:56 >> > > This is utterly horrible for a human to parse & use if they're using the > QEMU monitor, let alone something that libvirt could parse. In fact this > doesn't let you map between the network device & pci device if there is > more than one device added because 'info pci' doesn't show the MAC address > info, and 'info network' does not show any PCI device number info - the > same for disks. > > We need a machine friendly protocol for libvirt and other management tools. Versioned commands (with some backward compatibility), command discovery, and command/response tagging so you can associate an async reply to the command that triggered it, and quoting so that strings with spaces and other special chars are properly supported. But how the information is presented is orthogonal to what information is presented. btw, the qemu command line parses something fairly similar, I don't see why libvirt should have problems with it. It wouldn't be fun to code, but is doable. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/