From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkbCF-0001Yp-Va for qemu-devel@nongnu.org; Thu, 06 Jun 2013 10:29:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkbCE-0005Fr-Ld for qemu-devel@nongnu.org; Thu, 06 Jun 2013 10:29:47 -0400 Received: from [2001:41d0:8:2b42::1] (port=56624 helo=ns232118.ovh.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkbCE-0005Fk-Fs for qemu-devel@nongnu.org; Thu, 06 Jun 2013 10:29:46 -0400 Message-ID: <51B09CD7.2060805@greensocs.com> Date: Thu, 06 Jun 2013 16:29:43 +0200 From: Frederic Konrad MIME-Version: 1.0 References: <51B060BE.8090107@ozlabs.ru> <51B08434.2020908@greensocs.com> <51B095AC.3020508@ozlabs.ru> In-Reply-To: <51B095AC.3020508@ozlabs.ru> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [QEMU question] Disk hot plugging without working PCI hotplug - possible? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: "qemu-devel@nongnu.org" , "Michael S. Tsirkin" On 06/06/2013 15:59, Alexey Kardashevskiy wrote: > On 06.06.2013 22:44, Frederic Konrad wrote: >> On 06/06/2013 12:13, Alexey Kardashevskiy wrote: >>> Hi! >>> >>> For the pseries platform (server PPC64) we do not support PCI hotplug >>> yet. >>> However we still want to hot plug disks. >>> >>> As a workaround, we could add multiple SCSI host devices >>> (virtio-scsi-pci, >>> spapr-vscsi) without any disk attached and later (using qemu console) >>> attach drives to them as we do with the "-drive" parameter in the >>> command line. >>> >>> So I enabled CONFIG_PCI_HOTPLUG_OLD=y and tried. >>> >>> However, drive_add console command works only with PCI what eliminates >>> "spapr-vscsi" from the list. Oookay. >>> >>> Then I tried running qemu with "-device virtio-scsi-pci,id=device0" and >>> later doing "drive_add 0 file=virtimg/test1" from the qemu console. This >>> time qemu responded with "Device is not a SCSI adapter" what is >>> correct as >>> nowadays virtio-XXXX-pci devices are not what are they called as they >>> simply create underlying virtio-bus, attach a real virtio-XXXX-device >>> there >>> (which is not PCI) and only then attach disk to non-PCI virtio device. >> Hi, >> >> Seems it's a bug: il should be compatible with the old virtio-scsi-pci. >> What's the meaning of the "0" in drive_add command? > It is a PCI slot number, the complete address would include a domain and > a bus. > > Ok thanks, I'll take a look. >> Fred >>> So as I see there is no way to attach a disk to an existing controller in >>> already running qemu. >>> >>> This is how I add disks to qemu now: >>> -device virtio-scsi-pci,id=virtioscsi0 \ >>> -drive file=virtimg/fc18guest,if=none,id=drive0,readonly=off, >>> format=raw,media=disk,werror=stop,rerror=stop \ >>> -device scsi-disk,id=scsidisk0,bus=virtioscsi0.0,channel=0, >>> scsi-id=0,lun=0,drive=drive0,removable=off \ This two last command isn't available in the monitor? >>> >>> I want to only add "-device virtio-scsi-pci,id=virtioscsi0" to the >>> command >>> line and do the rest from the qemu console. >>> >>> Am I missing some useful command from qemu console or anything else? >>> Thanks! >