[libvirt] [PATCH] esx: Add autodetection for the SCSI controller model
matthias.bolte at googlemail.com
Tue Jul 13 20:11:23 UTC 2010
2010/7/7 Daniel P. Berrange <berrange at redhat.com>:
> On Tue, Jul 06, 2010 at 08:19:55PM +0200, Matthias Bolte wrote:
>> This works for file-backed SCSI disk device with a datastore
>> related source path.
>> docs/drvesx.html.in | 6 ++
>> docs/schemas/domain.rng | 1 +
>> src/conf/domain_conf.c | 1 +
>> src/conf/domain_conf.h | 1 +
>> src/esx/esx_vi_generator.input | 149 +++++++++++++++++++++++++++++++++
>> src/esx/esx_vi_generator.py | 3 +
>> src/esx/esx_vmx.c | 180 +++++++++++++++++++++++++++++++++++++++-
>> src/esx/esx_vmx.h | 8 ++-
>> 8 files changed, 344 insertions(+), 5 deletions(-)
>> diff --git a/docs/drvesx.html.in b/docs/drvesx.html.in
>> index f4e7530..75c24cb 100644
>> --- a/docs/drvesx.html.in
>> +++ b/docs/drvesx.html.in
>> @@ -292,6 +292,12 @@ ethernet0.checkMACAddress = "false"
>> <h4>SCSI controller models</h4>
>> + <dt><code>auto</code></dt>
>> + <dd>
>> + This isn't a actual controller model. If specified the ESX driver
>> + tries to detect the SCSI controller model referenced in the
>> + <code>.vmdk</code> file and use it. <span class="since">Since 0.8.3</span>
>> + </dd>
>> BusLogic SCSI controller for older guests.
>> diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng
>> index b171d01..e090366 100644
>> --- a/docs/schemas/domain.rng
>> +++ b/docs/schemas/domain.rng
>> @@ -673,6 +673,7 @@
>> <attribute name="model">
>> + <value>auto</value>
> I don't really see how this can sensibly work.
> A controller can have multiple disks associated with
> it. Each associated disk has a drive address that uniquely
> identifies its position on the controller.
> Now consider a controller of mode 'auto' and attach two
> disks to it. One VMDK specifies 'lsilogic' and the other
> VMDK specifies 'lsisas1068'. This is not reconcilable
> because you have 2 conflicting controller models, but have
> associated both disks with the same controller object.
In case of detecting conflicting controller models for one controller
the autodetection has to fail. The current code just picks the
reported model for the first disk and doesn't look at the other disk
on the same controller. That's wrong and I fixed this in v2.
> Furthermore both disks could be LUN 1 on their respective
> controller, which means you'd now have a uniquness violation
> on the drive address.
I don't get what you try to say. The model autodetection doesn't
affect the drive address at all and is a per-controller action.
More information about the libvir-list