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.
Daniel
--
|: Red Hat, Engineering, London -o-
http://people.redhat.com/berrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org -o-
http://ovirt.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|