[libvirt] [PATCH v2 8/8] hostdev: Add iSCSI hostdev XML

John Ferlan jferlan at redhat.com
Tue Aug 5 20:49:16 UTC 2014



On 08/05/2014 04:24 PM, Eric Blake wrote:
> On 08/05/2014 01:59 PM, John Ferlan wrote:
> 
>> Both are 'scsi' adapters - existing is 'scsi_host' and the new one is 'iscsi'.
>> I'm unsure about putting the 'optional' attribute name really does. Not to
>> confuse things further, but the next step in the evolution of this is to add
>> a fiber channel adapter (eg, fc_host).
>>
>> The "first" format is for the "scsi_host" with the valid XML being:
> 
> Seeing it in context helps.
> 
>>
>>     <hostdev mode='subsystem' type='scsi'>
>>       <source>
>>         <adapter name='scsi_host0'/>
> 
> Here, I think I see the solution to my earlier confusion.  If _this_
> were written:
> 
>   <source protocol='adapter'>
>     <adapter...
> 
> where the protocol='adapter' is optional (default, for back-compat),
> then you know that <source>'s children will be <adapter> and <address>...
> 
>>         <address type='scsi' bus='0' target='0' unit='0'/>
>>       </source>
>>       <readonly/>
>>       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
>>     </hostdev>
>>
>>
>> The "second" format is for the "iscsi" valid XML for 'iscsi' is:
>>
>>     <hostdev mode='subsystem' type='scsi'>
>>       <source protocol='iscsi' name='iqn.2014-08.com.example:iscsi-nopool/1'>
> 
> ...and here, protocol='iscsi' is mandatory, to describe that that
> <source>'s children will be <host>.
> 
>>         <host name='example.com' port='3260'/>
>>       </source>
>>       <auth username='myuser'>
>>         <secret type='iscsi' usage='libvirtiscsi'/>
>>       </auth>
> 
> Is the <auth> something inherent to the overall hostdev, or something
> only to the <source protocol='iscsi'>?  I think I'd rather see this
> <auth> be a child of <source>, rather than a sibling.
> 

OK - I'll 'repost' v3 2/3... This could also make adding adapter=fc_host
a bit simpler. Moving <auth> under <source> is more like storage pool
syntax which is fine - I guess I was trying to as much like the <disk>
as I could be.

John




More information about the libvir-list mailing list