On 06/07/2012 06:45 AM, Eric Blake wrote:
On 06/04/2012 09:16 AM, Cole Robinson wrote:
>>> This isn't exactly what I had in mind when I recommended a libvirt
patch.
>>> Change libvirt to add:
>>>
>>> <controller type='scsi' index='0'>
>>> <address type='spapr-vio'/>
>>> </controller>
>>>
>>> when the guest XML has
>>>
>>> <disk type='file' device='disk'>
>>> <driver name='qemu' type='raw'/>
>>> <source file='/path/file'/>
>>> <target dev='sda' bus='scsi'/>
>>> <address type='spapr-vio'/>
>>> </disk>
>>>
>>> and the guest XML doesn't already have spapr-vio<controller>.
>>
>> Thanks a lot for your suggestion. :)
>>
>> I see the libvirt will always set the address type of the disk as
>> "drive". There is one drive address structure in libvirt, which
>> records the controller, bus and unit.
It sounds like we need<disk> address structure to support more than
just drive addressing, but to instead support a union of addressing
based on the type='' attribute.
I think if we add the type of "spapr-vio", it has the almost same of
"drive".
>>
>> the address can be specified in the target.
>>
>> <disk type='file' device='disk'>
>> <driver name='qemu' type='raw'/>
>> <source file='/path/file'/>
>> <target dev='sda' bus='scsi'
address='spapr-vio'/>
No, I don't think you want address added to<target>, but...
>> <address type='drive' controller='0' bus='0'
unit='0' />
you instead want<address type='spapr-vio'/> to be something you add to
your XML to force libvirt to then populate the remaining attributes and
auto-instantiate the controller.
In fact, this address is used to find right
controller.
The disk is selected by users, libvirt needs to help find right
controller.
And also, this type of disk can be reconfigured after it is created.
>> </disk>
>>
>
> That sounds okay to me, bug maybe eblake or danpb should sign off on it
> conceptually, since it's a new XML element.
>
> - Cole
>
>
--
Best Regards
Li
IBM LTC, China System&Technology Lab, Beijing