From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJ1HD-0005lO-8Q for qemu-devel@nongnu.org; Tue, 23 Jun 2009 04:22:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJ1H8-0005hl-6b for qemu-devel@nongnu.org; Tue, 23 Jun 2009 04:22:46 -0400 Received: from [199.232.76.173] (port=42909 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJ1H8-0005hb-3s for qemu-devel@nongnu.org; Tue, 23 Jun 2009 04:22:42 -0400 Received: from mx2.redhat.com ([66.187.237.31]:55144) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJ1H7-000851-HZ for qemu-devel@nongnu.org; Tue, 23 Jun 2009 04:22:41 -0400 Date: Tue, 23 Jun 2009 11:22:37 +0300 From: Gleb Natapov Subject: Re: [Qemu-devel] Re: [PATCH] Add serial number support for virtio_blk Message-ID: <20090623082237.GA21041@redhat.com> References: <4A3FCCEB.1080603@redhat.com> <4A3FD5E8.1060300@codemonkey.ws> <20090622193019.GD15865@redhat.com> <4A3FE978.9040406@codemonkey.ws> <20090622203851.GE15865@redhat.com> <20090622204216.GA25237@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090622204216.GA25237@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: john cooper , qemu-devel@nongnu.org On Mon, Jun 22, 2009 at 09:42:16PM +0100, Daniel P. Berrange wrote: > On Mon, Jun 22, 2009 at 11:38:51PM +0300, Gleb Natapov wrote: > > On Mon, Jun 22, 2009 at 03:28:40PM -0500, Anthony Liguori wrote: > > > Gleb Natapov wrote: > > >> On Mon, Jun 22, 2009 at 02:05:12PM -0500, Anthony Liguori wrote: > > >> > > >>> I also noticed that if=scsi,serial=XXX doesn't seem to do anything useful. > > >>> > > >>> > > >> What makes you think so? > > >> > > > > > > It doesn't seem to change /dev/disk/by-id/PATH > > > > > I thought you mean that there is no way to get it from guest hence the > > question. I don't know what Linux uses for /dev/disk/by-id/PATH, but > > Windows retrieve disk serial using the scsi command that QEMU > > implements. > > It is done by udev rules, which call out to a 'scsi_id' command. On a > Fedora 11 host /lib/udev/rules.d/60-persistent-storage.rules > According to man page scsi_id uses VPD page 0x80 or 0x83. QEMU implement both, but puts serial into page 0x80. scsi_id -p 0x80 -s /dev/sda should print something similar to what was provided to serial option. -- Gleb.