[libvirt] [PATCH] storage pool discovery

Stefan de Konink skinkie at xs4all.nl
Mon Aug 4 09:28:03 UTC 2008


Daniel P. Berrange schreef:
> On Mon, Aug 04, 2008 at 11:19:25AM +0200, Stefan de Konink wrote:
>> Daniel P. Berrange schreef:
>>> On Mon, Aug 04, 2008 at 11:02:33AM +0200, Stefan de Konink wrote:
>>>> On Mon, 4 Aug 2008, Daniel P. Berrange wrote:
>>>>
>>>>>> - - For iSCSI and related stuff everything was relatively easy, because
>>>>>>  this would just mean to write the right /dev/blabla to the xenstore.
>>>>>>  What is your idea to get different drivers working via:
>>>>>>  virt://pool/volume (so basically blktap vs file vs disk)
>>>>> My idea was to have a script in /etc/xen/scripts/
>>>> Me too, but in order to 'fetch' the actual configuration it is required to
>>>> contact libvirt. And query about the pool/volume location. In this way it
>>>> would be actually a 'redirection' to blktap or adding a devicepath.
>>>>
>>>> So this script is now written in plain C, but I want to know how you
>>>> imagine the driver selection based on connection uri.
>>> You can simply use  xen:/// as the URI. There is no need for configurable
>>> URIs since thisis a xen specific script.
>> You don't get the issue. In order to run a specific script for example a 
>> block device, it should have an unique prefix. That will make the 
>> executable that is called so virt:// will call 
>> /etc/xen/scripts/block-virt as script.
>>
>> As you might notice here, the common file://, tap:aio:// or psy:// is 
>> not present, so if a pool is file based or device based it should some 
>> how inform this 'script' how to redirect the parameters to the 
>> appropriate script.
> 
> This is what the <driver> tag in the XML can be used for. It can include
> a driver name (file, phys, tap) and subtype (raw, aio, qcow, etc). You
> just need to decide how to encode this info when passing it to Xend.

Yes... and this was exactly my question ;)

So if we have a pool and want to send it to xen it would look something 
like: virt://driver/pool/volume, now the 'tiny' problem is that I don't 
want to reimplement every possible driver. So I'll do some research in 
order to pass a connection url exported by libvirt to the 'default' 
scripts, while maintaining the virt:// in xen.


Stefan




More information about the libvir-list mailing list