From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46172) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMtMf-0002yw-50 for qemu-devel@nongnu.org; Tue, 12 Jul 2016 04:48:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMtMa-0000aW-64 for qemu-devel@nongnu.org; Tue, 12 Jul 2016 04:48:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMtMZ-0000aC-Vp for qemu-devel@nongnu.org; Tue, 12 Jul 2016 04:48:20 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4A62C85547 for ; Tue, 12 Jul 2016 08:48:19 +0000 (UTC) From: Gerd Hoffmann Date: Tue, 12 Jul 2016 10:48:09 +0200 Message-Id: <1468313290-14308-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1468313290-14308-1-git-send-email-kraxel@redhat.com> References: <1468313290-14308-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 2/3] usb: add storage hotplug documentation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Suggested-by: Paolo Bonzini Signed-off-by: Gerd Hoffmann Message-id: 1466667901-1341-1-git-send-email-kraxel@redhat.com --- docs/usb-storage.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/usb-storage.txt b/docs/usb-storage.txt index c5a3866..fbc1f2e 100644 --- a/docs/usb-storage.txt +++ b/docs/usb-storage.txt @@ -40,6 +40,18 @@ numbers must be continuous, i.e. for three devices you must use 0+1+2. The 0+1+5 numbering from the "usb-uas" example isn't going to work with "usb-bot". +Starting with qemu version 2.7 usb-bot and usb-uas devices can be +hotplugged. In the hotplug case they are added with "attached = +false" so the guest will not see the device until the "attached" +property is explicitly set to true. That allows to attach one or more +scsi devices before making the device visible to the guest, i.e. the +workflow looks like this: + + (1) device-add usb-bot,id=foo + (2) device-add scsi-{hd,cd},bus=foo.0,lun=0 + (2b) optionally add more devices (luns 1 ... 15). + (3) scripts/qmp/qom-set foo.attached = true + enjoy, Gerd -- 1.8.3.1