[libvirt] Questions on libvirt storage internals

Eric Blake eblake at redhat.com
Wed Jul 6 20:58:55 UTC 2011


On 06/30/2011 04:23 AM, Shehjar Tikoo wrote:
> Hi All
> 
> I am working on integrating GlusterFS with OpenStack so that VM volumes
> can be placed on shared GlusterFS volumes. I would highly appreciate if
> you please help me find the answers to some questions:
> 
> 1. Whats the difference between a storage driver and a storage backend
> driver?

A storage driver implements the callbacks used by the public API, as
called from src/libvirt.c.  Most hypervisors can use the generic storage
driver in src/storage/, but some use their own (such as
src/esx/esx_storage_driver.c).

A storage backend driver implements additional callbacks, so that the
generic storage driver can target several types of storage devices.  It
sounds like your work on GlusterFS would be a storage callback driver,
and that all hypervisors that defer to the generic storage driver (such
as qemu and lxc) will then automatically know how to do operations on
images stored in GlusterFS.

> 
> 2. Why does virDomainAttachDevice code path call the corresponding
> domainAttach function in the hypervisor driver and not the volume or
> pool creation method if a disk is being attached? Does it assume that
> the volume has already been created before this call?

The virDomainAttachDevice API is for hot-plugging an existing disk into
a running VM.  It is not about disk creation (although if that proves
useful and common enough, we could possibly introduce some flags to both
allocate and attach storage volumes via a single API).

> 
> 3. Which part of libvirtd source handles receiving messages from the
> libvirt client?

daemon/remote.c receives all RPC messages from the libvirt client.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110706/7dfb27f7/attachment-0001.sig>


More information about the libvir-list mailing list