From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MwAgK-000117-Qh for qemu-devel@nongnu.org; Fri, 09 Oct 2009 04:18:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MwAgG-00010e-FN for qemu-devel@nongnu.org; Fri, 09 Oct 2009 04:18:32 -0400 Received: from [199.232.76.173] (port=47592 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MwAgG-00010b-At for qemu-devel@nongnu.org; Fri, 09 Oct 2009 04:18:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1843) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MwAgF-0008Bv-Uj for qemu-devel@nongnu.org; Fri, 09 Oct 2009 04:18:28 -0400 Date: Fri, 9 Oct 2009 09:18:22 +0100 From: "Daniel P. Berrange" Message-ID: <20091009081822.GB27937@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: [Qemu-devel] Re: [libvirt] dynamic scsi disk attach seems to be broken in qemu(-kvm)-0.11, libvirt-0.7.1 Reply-To: "Daniel P. Berrange" List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dustin Kirkland Cc: libvir-list@redhat.com, qemu-devel@nongnu.org, kvm@vger.kernel.org On Thu, Oct 08, 2009 at 10:57:55PM -0500, Dustin Kirkland wrote: > Now, all of that said, it is actually possible to hot-add a second > scsi device. However, as far as I can tell, this method is not yet > supported by libvirt. It looks to me that with modern qemu, you have > to do it this way: > > Drop to a qemu console with ctrl-alt-2. Get the address of the current scsi bus: > (qemu) info pci > Look for "SCSI Controller". In my case, it's on Bus 0, device 4, function 0 > > Now instead of pci_add, use drive_add > (qemu) drive_add 0:4 file=/tmp/foo,if=scsi > OK bus 0, unit 1 That is correct - the SCSI driver hotplug in libvirt is not implemented in the right way. If you specify multiple SCSI devices at boot, they all get on one controller, if you hotplug multiple SCSI devices, we're hotplugging a new SCSI controller per disk. This is clearly not good, because when you then reboot, all those controllers are merged back into one. There is a guy who is working on implementing the correct SCSI hotplug approach for libvirt, that is still work in progress though. The most recent patches were here: http://www.redhat.com/archives/libvir-list/2009-September/msg00551.html We will ultimately support hotplug of both drives, and drive controllers independantly, giving apps/users the flexibility they need. > I would like some advice on how to proceed with this bug, and where > the solution lies...in qemu or in libvirt. Ultimately, I would like > the behavior we had in our previous release with kvm-84 and > libvirt-0.6.1, where we could dynamically add scsi devices without a > problem, using: > pci_add 1 storage file=/tmp/foo,if=scsi > > Can anyone else reproduce this? Is this considered a regression by > anyone else? Where should I look to solve this, in libvirt, or in > qemu? Independently of what I said about libvirt not implementing SCSI hotplug with the right apporoach, the pci-add stuff should definitely work, so if it doesn't then this is a regression that needs to be fixed Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|