All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] qemu - SCSI disk "Device Model", "Serial Number", and "Firmware Version"?
@ 2011-06-07  7:04 Dave Seddon
  2011-06-07  7:35 ` Paolo Bonzini
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Dave Seddon @ 2011-06-07  7:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: dave

Greetings,

Just wondering if it would be difficult to add the ability to define the
SCSI disk "Device Model", "Serial Number", and "Firmware Version".  I've
been using the '-device lsi' successfully to emulate the LSI controller,
but now I want to emulate certain disks too.

e.g.  I've been using this:
---------------------------
...
	-drive if=none,id=disk00,file=/home/das/documents/qemu/disk00.img.qcow,media=disk,cache=writeback \
	-device lsi \
	-device scsi-disk,drive=disk00,bus=scsi.0 \
...
---------------------------


The reason this would be really cool is that tools like smartmontools
seem to match on the "Device Model", and the device-model "QEMU" hasn't
made it into the list yet.

I found hunting around the net that somebody has tried to make this
work.  I'm not sure if it works.
'-drive ...,serial=xyz'



This is how the QEMU disks are currently seen in dmesg:
-------------------------------------------------------
scsi 0:0:0:0: Direct-Access     QEMU     QEMU HARDDISK    0.12 PQ: 0
ANSI: 3
 target0:0:0: tagged command queuing enabled, command queue depth 16.
 target0:0:0: Beginning Domain Validation
 target0:0:0: Domain Validation skipping write tests
 target0:0:0: Ending Domain Validation
-------------------------------------------------------

This is an example of a real disk, that I would like to 'fake':
-------------------------------------------------------
scsi 2:0:0:0: Direct-Access     ATA      ST3500320NS      SN06 PQ: 0 ANSI: 5
sd 2:0:0:0: [sda] 976773168 512-byte hardware sectors (500108 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 73 00 00 08
sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 2:0:0:0: [sda] 976773168 512-byte hardware sectors (500108 MB)
sd 2:0:0:0: [sda] Write Protect is off
sd 2:0:0:0: [sda] Mode Sense: 73 00 00 08
sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
-------------------------------------------------------


Here's an example of the nasty/QEMU output of smartmontools:
-------------------------------------------------------
# smartctl -d sat --all /dev/sg0
smartctl version 5.38 [i686-spcdn-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===
Device Model:     [No Information Found]
Serial Number:    [No Information Found]
Firmware Version: �\x1d"
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   1
ATA Standard is:  Exact ATA specification draft version not indicated
Local Time is:    Tue Jun  7 16:57:08 2011 UTC
SMART is only available in ATA Version 3 Revision 3 or greater.
We will try to proceed in spite of this.
SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 82-83 don't show if SMART supported.
                  Checking for SMART support by trying SMART ENABLE command.
                  SMART ENABLE appeared to work!  Continuing.
SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 85-87 don't show if SMART is enabled.
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options
-------------------------------------------------------


Here's an example of the output of smartmontools from a real disk:
-------------------------------------------------------
# smartctl -d sat --all /dev/sg1
smartctl version 5.38 [i686-spcdn-linux-gnu] Copyright (C) 2002-8 Bruce
Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===
Device Model:     ST3500320NS     <--- CAN WE SIMULATE THIS?
Serial Number:    9QMCAMS6        <--- AND THIS?
Firmware Version: SN06            <--- AND THIS?
User Capacity:    500,107,862,016 bytes
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   8
ATA Standard is:  ATA-8-ACS revision 4
Local Time is:    Tue Jun  7 06:01:29 2011 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
-------------------------------------------------------



Looking in the source, I can see that the "QEMU HARDDISK" for example is
statically defined.  Would this be difficult to make an option for the
'-drive '?
-------------------------------------------------------
[root@tester hw]# grep -R 'QEMU' scsi-disk.c
    QEMUIOVector qiov;
    QEMUBH *bh;
        memcpy(&outbuf[16], "QEMU CD-ROM     ", 16);
        memcpy(&outbuf[16], "QEMU HARDDISK   ", 16);
    memcpy(&outbuf[8], "QEMU    ", 8);
        s->version = qemu_strdup(QEMU_VERSION);
-------------------------------------------------------

Kind regards,
Dave Seddon
dave@seddon.ca

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] qemu - SCSI disk "Device Model", "Serial Number", and "Firmware Version"?
  2011-06-07  7:04 [Qemu-devel] qemu - SCSI disk "Device Model", "Serial Number", and "Firmware Version"? Dave Seddon
@ 2011-06-07  7:35 ` Paolo Bonzini
  2011-06-07  8:11   ` Kevin Wolf
  2011-06-07  8:14 ` Markus Armbruster
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Paolo Bonzini @ 2011-06-07  7:35 UTC (permalink / raw)
  To: dave; +Cc: qemu-devel

On 06/07/2011 09:04 AM, Dave Seddon wrote:
> Here's an example of the nasty/QEMU output of smartmontools:
> -------------------------------------------------------
> # smartctl -d sat --all /dev/sg0
> smartctl version 5.38 [i686-spcdn-linux-gnu] Copyright (C) 2002-8 Bruce Allen
> Home page is http://smartmontools.sourceforge.net/
>
> === START OF INFORMATION SECTION ===
> Device Model:     [No Information Found]
> Serial Number:    [No Information Found]
> Firmware Version: �\x1d
"
> Device is:        Not in smartctl database [for details use: -P showall]
> ATA Version is:   1
> ATA Standard is:  Exact ATA specification draft version not indicated
> Local Time is:    Tue Jun  7 16:57:08 2011 UTC
> SMART is only available in ATA Version 3 Revision 3 or greater.
> We will try to proceed in spite of this.
> SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 82-83 don't show if SMART supported.
>                    Checking for SMART support by trying SMART ENABLE command.
>                    SMART ENABLE appeared to work!  Continuing.
> SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 85-87 don't show if SMART is enabled.
> A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options
> -------------------------------------------------------

Here we should perhaps try to improve the ATA emulation.

> Looking in the source, I can see that the "QEMU HARDDISK" for example is
> statically defined.  Would this be difficult to make an option for the
> '-drive '?
> -------------------------------------------------------
> [root@tester hw]# grep -R 'QEMU' scsi-disk.c
>      QEMUIOVector qiov;
>      QEMUBH *bh;
>          memcpy(&outbuf[16], "QEMU CD-ROM     ", 16);
>          memcpy(&outbuf[16], "QEMU HARDDISK   ", 16);
>      memcpy(&outbuf[8], "QEMU    ", 8);
>          s->version = qemu_strdup(QEMU_VERSION);
> -------------------------------------------------------

It should not be hard.  It probably would be better to do it for if=ide 
too, though.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] qemu - SCSI disk "Device Model", "Serial Number", and "Firmware Version"?
  2011-06-07  7:35 ` Paolo Bonzini
@ 2011-06-07  8:11   ` Kevin Wolf
  2011-06-07  9:02     ` Paolo Bonzini
  0 siblings, 1 reply; 8+ messages in thread
From: Kevin Wolf @ 2011-06-07  8:11 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, dave

Am 07.06.2011 09:35, schrieb Paolo Bonzini:
> On 06/07/2011 09:04 AM, Dave Seddon wrote:
>> Here's an example of the nasty/QEMU output of smartmontools:
>> -------------------------------------------------------
>> # smartctl -d sat --all /dev/sg0
>> smartctl version 5.38 [i686-spcdn-linux-gnu] Copyright (C) 2002-8 Bruce Allen
>> Home page is http://smartmontools.sourceforge.net/
>>
>> === START OF INFORMATION SECTION ===
>> Device Model:     [No Information Found]
>> Serial Number:    [No Information Found]
>> Firmware Version: �\x1d"
>> Device is:        Not in smartctl database [for details use: -P showall]
>> ATA Version is:   1
>> ATA Standard is:  Exact ATA specification draft version not indicated
>> Local Time is:    Tue Jun  7 16:57:08 2011 UTC
>> SMART is only available in ATA Version 3 Revision 3 or greater.
>> We will try to proceed in spite of this.
>> SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 82-83 don't show if SMART supported.
>>                    Checking for SMART support by trying SMART ENABLE command.
>>                    SMART ENABLE appeared to work!  Continuing.
>> SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 85-87 don't show if SMART is enabled.
>> A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options
>> -------------------------------------------------------
> 
> Here we should perhaps try to improve the ATA emulation.

But this is scsi-disk - what does smartctl even try here?

Kevin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] qemu - SCSI disk "Device Model", "Serial Number", and "Firmware Version"?
  2011-06-07  7:04 [Qemu-devel] qemu - SCSI disk "Device Model", "Serial Number", and "Firmware Version"? Dave Seddon
  2011-06-07  7:35 ` Paolo Bonzini
@ 2011-06-07  8:14 ` Markus Armbruster
  2011-06-07 23:26 ` Dave Seddon
  2011-07-11 18:59 ` Ryan Harper
  3 siblings, 0 replies; 8+ messages in thread
From: Markus Armbruster @ 2011-06-07  8:14 UTC (permalink / raw)
  To: dave; +Cc: qemu-devel

Dave Seddon <dave@seddon.ca> writes:

> Greetings,
>
> Just wondering if it would be difficult to add the ability to define the
> SCSI disk "Device Model", "Serial Number", and "Firmware Version".  I've
> been using the '-device lsi' successfully to emulate the LSI controller,
> but now I want to emulate certain disks too.
>
> e.g.  I've been using this:
> ---------------------------
> ...
> 	-drive if=none,id=disk00,file=/home/das/documents/qemu/disk00.img.qcow,media=disk,cache=writeback \
> 	-device lsi \
> 	-device scsi-disk,drive=disk00,bus=scsi.0 \
> ...
> ---------------------------
>
>
> The reason this would be really cool is that tools like smartmontools
> seem to match on the "Device Model", and the device-model "QEMU" hasn't
> made it into the list yet.
>
> I found hunting around the net that somebody has tried to make this
> work.  I'm not sure if it works.
> '-drive ...,serial=xyz'
>
>
>
> This is how the QEMU disks are currently seen in dmesg:
> -------------------------------------------------------
> scsi 0:0:0:0: Direct-Access     QEMU     QEMU HARDDISK    0.12 PQ: 0
> ANSI: 3
>  target0:0:0: tagged command queuing enabled, command queue depth 16.
>  target0:0:0: Beginning Domain Validation
>  target0:0:0: Domain Validation skipping write tests
>  target0:0:0: Ending Domain Validation
> -------------------------------------------------------
>
> This is an example of a real disk, that I would like to 'fake':
> -------------------------------------------------------
> scsi 2:0:0:0: Direct-Access     ATA      ST3500320NS      SN06 PQ: 0 ANSI: 5
> sd 2:0:0:0: [sda] 976773168 512-byte hardware sectors (500108 MB)
> sd 2:0:0:0: [sda] Write Protect is off
> sd 2:0:0:0: [sda] Mode Sense: 73 00 00 08
> sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
> sd 2:0:0:0: [sda] 976773168 512-byte hardware sectors (500108 MB)
> sd 2:0:0:0: [sda] Write Protect is off
> sd 2:0:0:0: [sda] Mode Sense: 73 00 00 08
> sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
> -------------------------------------------------------
>
>
> Here's an example of the nasty/QEMU output of smartmontools:
> -------------------------------------------------------
> # smartctl -d sat --all /dev/sg0
> smartctl version 5.38 [i686-spcdn-linux-gnu] Copyright (C) 2002-8 Bruce Allen
> Home page is http://smartmontools.sourceforge.net/
>
> === START OF INFORMATION SECTION ===
> Device Model:     [No Information Found]
> Serial Number:    [No Information Found]
> Firmware Version: �\x1d"

That's not what I see.  What version of QEMU are you using?

> Device is:        Not in smartctl database [for details use: -P showall]
> ATA Version is:   1
> ATA Standard is:  Exact ATA specification draft version not indicated
> Local Time is:    Tue Jun  7 16:57:08 2011 UTC
> SMART is only available in ATA Version 3 Revision 3 or greater.
> We will try to proceed in spite of this.
> SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 82-83 don't show if SMART supported.
>                   Checking for SMART support by trying SMART ENABLE command.
>                   SMART ENABLE appeared to work!  Continuing.
> SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 85-87 don't show if SMART is enabled.
> A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options
> -------------------------------------------------------
>
>
> Here's an example of the output of smartmontools from a real disk:
> -------------------------------------------------------
> # smartctl -d sat --all /dev/sg1
> smartctl version 5.38 [i686-spcdn-linux-gnu] Copyright (C) 2002-8 Bruce
> Allen
> Home page is http://smartmontools.sourceforge.net/
>
> === START OF INFORMATION SECTION ===
> Device Model:     ST3500320NS     <--- CAN WE SIMULATE THIS?

No.  Hardcoded to "QEMU HARDDISK   ".

> Serial Number:    9QMCAMS6        <--- AND THIS?
> Firmware Version: SN06            <--- AND THIS?

Yes.  But -drive doesn't give you enough control.  You need to use
-device.  I'd point you to docs/qdev-device-use.txt for the details,
except it's outdated, and my patch to update it has been stuck on the
list for three weeks.  Need to repost.

Try

    -drive if=none,id=disk0,...
    -device scsi-hd,drive=disk0,serial=S,ver=V

> User Capacity:    500,107,862,016 bytes
> Device is:        Not in smartctl database [for details use: -P showall]
> ATA Version is:   8
> ATA Standard is:  ATA-8-ACS revision 4
> Local Time is:    Tue Jun  7 06:01:29 2011 UTC
> SMART support is: Available - device has SMART capability.
> SMART support is: Enabled
> -------------------------------------------------------
>
>
>
> Looking in the source, I can see that the "QEMU HARDDISK" for example is
> statically defined.  Would this be difficult to make an option for the
> '-drive '?

Doubt it would be difficult.  But would it be useful?  It's a bluff, and
if the guest calls it by using vendor-specific stuff, we'll surely fail,
won't we?

[...]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] qemu - SCSI disk "Device Model", "Serial Number", and "Firmware Version"?
  2011-06-07  8:11   ` Kevin Wolf
@ 2011-06-07  9:02     ` Paolo Bonzini
  0 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2011-06-07  9:02 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-devel, dave

On 06/07/2011 10:11 AM, Kevin Wolf wrote:
> > >  SMART is only available in ATA Version 3 Revision 3 or greater.
> > >  We will try to proceed in spite of this.
> > >  SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 82-83 don't show if SMART supported.
> > >                      Checking for SMART support by trying SMART ENABLE command.
> > >                      SMART ENABLE appeared to work!  Continuing.
> > >  SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 85-87 don't show if SMART is enabled.
> > >  A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options
> > >  -------------------------------------------------------
> >
> >  Here we should perhaps try to improve the ATA emulation.
>
> But this is scsi-disk - what does smartctl even try here?

smartctl has to try anyway because libata shows IDE disks as /dev/sdX. 
I tried smartctl on a USB drive and it will happily run (and show no 
SMART support).

Paolo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] qemu - SCSI disk "Device Model", "Serial Number", and "Firmware Version"?
  2011-06-07  7:04 [Qemu-devel] qemu - SCSI disk "Device Model", "Serial Number", and "Firmware Version"? Dave Seddon
  2011-06-07  7:35 ` Paolo Bonzini
  2011-06-07  8:14 ` Markus Armbruster
@ 2011-06-07 23:26 ` Dave Seddon
  2011-06-08  6:29   ` Markus Armbruster
  2011-07-11 18:59 ` Ryan Harper
  3 siblings, 1 reply; 8+ messages in thread
From: Dave Seddon @ 2011-06-07 23:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: dave

Greetings,

Thanks for all the responses.

Overall it sounds like supporting this is capability would be fairly
easy.  However, Sadly for me it sounds like this won't be useful to
people generally unless they are trying to virtulize something that
relies on these codes. 

Answers to:
------------------------------------------------
Paulo:

Statement:  Here we should perhaps try to improve the ATA emulation.
Response:  It would probably be helpful to improve both SCSI and ATA
emulation.

------------------------------------------------
Markus:

Question:  That's not what I see.  What version of QEMU are you using?
Answer:  Using current package for Ubuntu 0.12.5 (that's probably a bad
word, give all the @redhat emails. sorry :) )  What do you see?  I did
download the source and check, hence the grep snippet.

Statement:  No.  Hardcoded to "QEMU HARDDISK   ".
Response:  Why couldn't this be a configuration item?

Thanks for your reference to: docs/qdev-device-use.txt
And also for the 'scsi-hd' example.  I can't see why, if the
"serial=S,ver=V" options are supported, that "model=" couldn't also be
added.  - I will try this.

Statement:  Doubt it would be difficult.  But would it be useful?
Agree with what your saying about specific calls, however, in my case
I'm trying to run a vendor supplied image which "only supports" certain
disks.  It is currently borking because it doesn't like the disks.  I
strongly doubt it does any disk specific calls.  They are doing this to
stop us installing disks bigger than 500GB, for example.  I'm trying to
make "appliance" software run virtually.

------------------------------------------------
Kevin:
Q:  But this is scsi-disk - what does smartctl even try here?
A:  True.  SMART only applied to ATA.  I should not have included this
smartctl example, however the 'dmesg' output is still relevant.


------------------------------------------------

Kind regards,
Dave Seddon

On Tue, 2011-06-07 at 17:04 +1000, Dave Seddon wrote:
> Greetings,
> 
> Just wondering if it would be difficult to add the ability to define the
> SCSI disk "Device Model", "Serial Number", and "Firmware Version".  I've
> been using the '-device lsi' successfully to emulate the LSI controller,
> but now I want to emulate certain disks too.
> 
> e.g.  I've been using this:
> ---------------------------
> ...
> 	-drive if=none,id=disk00,file=/home/das/documents/qemu/disk00.img.qcow,media=disk,cache=writeback \
> 	-device lsi \
> 	-device scsi-disk,drive=disk00,bus=scsi.0 \
> ...
> ---------------------------
> 
> 
> The reason this would be really cool is that tools like smartmontools
> seem to match on the "Device Model", and the device-model "QEMU" hasn't
> made it into the list yet.
> 
> I found hunting around the net that somebody has tried to make this
> work.  I'm not sure if it works.
> '-drive ...,serial=xyz'
> 
> 
> 
> This is how the QEMU disks are currently seen in dmesg:
> -------------------------------------------------------
> scsi 0:0:0:0: Direct-Access     QEMU     QEMU HARDDISK    0.12 PQ: 0
> ANSI: 3
>  target0:0:0: tagged command queuing enabled, command queue depth 16.
>  target0:0:0: Beginning Domain Validation
>  target0:0:0: Domain Validation skipping write tests
>  target0:0:0: Ending Domain Validation
> -------------------------------------------------------
> 
> This is an example of a real disk, that I would like to 'fake':
> -------------------------------------------------------
> scsi 2:0:0:0: Direct-Access     ATA      ST3500320NS      SN06 PQ: 0 ANSI: 5
> sd 2:0:0:0: [sda] 976773168 512-byte hardware sectors (500108 MB)
> sd 2:0:0:0: [sda] Write Protect is off
> sd 2:0:0:0: [sda] Mode Sense: 73 00 00 08
> sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
> sd 2:0:0:0: [sda] 976773168 512-byte hardware sectors (500108 MB)
> sd 2:0:0:0: [sda] Write Protect is off
> sd 2:0:0:0: [sda] Mode Sense: 73 00 00 08
> sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
> -------------------------------------------------------
> 
> 
> Here's an example of the nasty/QEMU output of smartmontools:
> -------------------------------------------------------
> # smartctl -d sat --all /dev/sg0
> smartctl version 5.38 [i686-spcdn-linux-gnu] Copyright (C) 2002-8 Bruce Allen
> Home page is http://smartmontools.sourceforge.net/
> 
> === START OF INFORMATION SECTION ===
> Device Model:     [No Information Found]
> Serial Number:    [No Information Found]
> Firmware Version: �\x1d"
> Device is:        Not in smartctl database [for details use: -P showall]
> ATA Version is:   1
> ATA Standard is:  Exact ATA specification draft version not indicated
> Local Time is:    Tue Jun  7 16:57:08 2011 UTC
> SMART is only available in ATA Version 3 Revision 3 or greater.
> We will try to proceed in spite of this.
> SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 82-83 don't show if SMART supported.
>                   Checking for SMART support by trying SMART ENABLE command.
>                   SMART ENABLE appeared to work!  Continuing.
> SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 85-87 don't show if SMART is enabled.
> A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options
> -------------------------------------------------------
> 
> 
> Here's an example of the output of smartmontools from a real disk:
> -------------------------------------------------------
> # smartctl -d sat --all /dev/sg1
> smartctl version 5.38 [i686-spcdn-linux-gnu] Copyright (C) 2002-8 Bruce
> Allen
> Home page is http://smartmontools.sourceforge.net/
> 
> === START OF INFORMATION SECTION ===
> Device Model:     ST3500320NS     <--- CAN WE SIMULATE THIS?
> Serial Number:    9QMCAMS6        <--- AND THIS?
> Firmware Version: SN06            <--- AND THIS?
> User Capacity:    500,107,862,016 bytes
> Device is:        Not in smartctl database [for details use: -P showall]
> ATA Version is:   8
> ATA Standard is:  ATA-8-ACS revision 4
> Local Time is:    Tue Jun  7 06:01:29 2011 UTC
> SMART support is: Available - device has SMART capability.
> SMART support is: Enabled
> -------------------------------------------------------
> 
> 
> 
> Looking in the source, I can see that the "QEMU HARDDISK" for example is
> statically defined.  Would this be difficult to make an option for the
> '-drive '?
> -------------------------------------------------------
> [root@tester hw]# grep -R 'QEMU' scsi-disk.c
>     QEMUIOVector qiov;
>     QEMUBH *bh;
>         memcpy(&outbuf[16], "QEMU CD-ROM     ", 16);
>         memcpy(&outbuf[16], "QEMU HARDDISK   ", 16);
>     memcpy(&outbuf[8], "QEMU    ", 8);
>         s->version = qemu_strdup(QEMU_VERSION);
> -------------------------------------------------------
> 
> Kind regards,
> Dave Seddon
> dave@seddon.ca
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] qemu - SCSI disk "Device Model", "Serial Number", and "Firmware Version"?
  2011-06-07 23:26 ` Dave Seddon
@ 2011-06-08  6:29   ` Markus Armbruster
  0 siblings, 0 replies; 8+ messages in thread
From: Markus Armbruster @ 2011-06-08  6:29 UTC (permalink / raw)
  To: dave; +Cc: qemu-devel

Dave Seddon <dave@seddon.ca> writes:

> Greetings,
>
> Thanks for all the responses.
>
> Overall it sounds like supporting this is capability would be fairly
> easy.  However, Sadly for me it sounds like this won't be useful to
> people generally unless they are trying to virtulize something that
> relies on these codes. 
>
> Answers to:
> ------------------------------------------------
> Paulo:
>
> Statement:  Here we should perhaps try to improve the ATA emulation.
> Response:  It would probably be helpful to improve both SCSI and ATA
> emulation.
>
> ------------------------------------------------
> Markus:
>
> Question:  That's not what I see.  What version of QEMU are you using?
> Answer:  Using current package for Ubuntu 0.12.5 (that's probably a bad
> word, give all the @redhat emails. sorry :) )  What do you see?  I did
> download the source and check, hence the grep snippet.

We take patches even from Ubuntu users ;)

0.12.5 is pretty old.

> Statement:  No.  Hardcoded to "QEMU HARDDISK   ".
> Response:  Why couldn't this be a configuration item?
>
> Thanks for your reference to: docs/qdev-device-use.txt
> And also for the 'scsi-hd' example.  I can't see why, if the
> "serial=S,ver=V" options are supported, that "model=" couldn't also be
> added.  - I will try this.

Use "ver" as example to follow.  "serial" carries some backward
compatibility baggage.

> Statement:  Doubt it would be difficult.  But would it be useful?
> Agree with what your saying about specific calls, however, in my case
> I'm trying to run a vendor supplied image which "only supports" certain
> disks.  It is currently borking because it doesn't like the disks.  I
> strongly doubt it does any disk specific calls.  They are doing this to
> stop us installing disks bigger than 500GB, for example.  I'm trying to
> make "appliance" software run virtually.

Ha.

I don't know wether a patch would be accepted, but there's just one way
to find out.

[...]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] qemu - SCSI disk "Device Model", "Serial Number", and "Firmware Version"?
  2011-06-07  7:04 [Qemu-devel] qemu - SCSI disk "Device Model", "Serial Number", and "Firmware Version"? Dave Seddon
                   ` (2 preceding siblings ...)
  2011-06-07 23:26 ` Dave Seddon
@ 2011-07-11 18:59 ` Ryan Harper
  3 siblings, 0 replies; 8+ messages in thread
From: Ryan Harper @ 2011-07-11 18:59 UTC (permalink / raw)
  To: Dave Seddon; +Cc: qemu-devel

* Dave Seddon <dave@seddon.ca> [2011-06-07 02:28]:
> Greetings,
> 
> Just wondering if it would be difficult to add the ability to define the
> SCSI disk "Device Model", "Serial Number", and "Firmware Version".  I've
> been using the '-device lsi' successfully to emulate the LSI controller,
> but now I want to emulate certain disks too.
> 
> e.g.  I've been using this:
> ---------------------------
> ...
> 	-drive if=none,id=disk00,file=/home/das/documents/qemu/disk00.img.qcow,media=disk,cache=writeback \
> 	-device lsi \
> 	-device scsi-disk,drive=disk00,bus=scsi.0 \
> ...
> ---------------------------
> 
> 
> The reason this would be really cool is that tools like smartmontools
> seem to match on the "Device Model", and the device-model "QEMU" hasn't
> made it into the list yet.
> 

What's the end goal here?  Are you really passing an entire disk to the
guest and want to have the guest monitor the device? If not, then I
suggest just disabling smartmontools since it won't give you meaningful
data anyhow.



-- 
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
ryanh@us.ibm.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-07-11 18:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-07  7:04 [Qemu-devel] qemu - SCSI disk "Device Model", "Serial Number", and "Firmware Version"? Dave Seddon
2011-06-07  7:35 ` Paolo Bonzini
2011-06-07  8:11   ` Kevin Wolf
2011-06-07  9:02     ` Paolo Bonzini
2011-06-07  8:14 ` Markus Armbruster
2011-06-07 23:26 ` Dave Seddon
2011-06-08  6:29   ` Markus Armbruster
2011-07-11 18:59 ` Ryan Harper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.