[libvirt] Libvirt iSCSI APIs

Daniel P. Berrange berrange at redhat.com
Thu Jul 12 09:35:45 UTC 2012


On Thu, Jul 12, 2012 at 11:24:30AM +0800, Osier Yang wrote:
> On 2012年07月12日 08:28, Ata Bohra wrote:
> >Hi All,
> >
> >I am interested in extending libvirt APIs to support iSCSI operations
> >such as: add/remove targets, list targets, list remote LUNs, rescan luns
> >etc.
> 
> Nice.
> 
> The intention is to provide an interface that external programs can
> >hook to manage iSCSI storage devices on a given hypervisor(I would be
> >adding interfaces for ESX first). Looking at the libvirt.c interface for
> >storage driver I'm unable find routines that can be overridden for
> >specific hypervisor. Googling lead to a nice blog presentation that
> >provisions VMs on remote LUN(s) for KVM but uses virish.
> >(http://berrange.com/tags/iscsi/).
> 
> The storage APIs are independant, not associated with domain APIs.
> AFAIK, the storage management is just common, not tied with specific
> hypervisor (I may be wrong, perhaps there is specific stuffs I
> don't known yet).
> 
> The blog post presents using virsh/virt-manager/virt-install, but
> if you have the APIs, you can use the APIs (of both domain and storage)
> to provision the guests with whatever external programs you want.
> 
> So if I understand you correctly, what you need to do is add the
> implementations for those APIs in iscsi backend.
> 
> >
> >My question is; is this as per design not to expose iSCSI related APIs?
> 
> No, we'd like to see new useful APIs.
> 
> >Will an extention to libvirt.c (_virStorageDriver) so that every
> >hypervisor can implement it is acceptable?
> 
> Again, either you or me is wrong, my understanding is the storage
> management is not specific for different hypervisors, and it should
> keep independant.

This isn't quite correct. For any Linux drivers that run in libvirtd,
we have the generic storage driver. For drivers that run clientside
like VWMare, VirtualBox, Hyper-V, etc, they are responsible for implementing
the storage APIs themselves.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list