[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] Questions on libvirt storage internals



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 redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]