[Libvir] [Libvirt] Proposal to add 3 functions for VBDs (Virtual Block Devices)

Daniel P. Berrange berrange at redhat.com
Thu Aug 24 16:58:02 UTC 2006


On Thu, Aug 24, 2006 at 12:51:58PM -0400, Daniel Veillard wrote:
> On Thu, Aug 24, 2006 at 05:54:21PM +0200, Philippe Berthault wrote:
> > I think that, instead of designate the backend domain by its id, it 
> > would be better to designate it by its name.
> > This is because the id isn't fix, excepted for the domain-0.
> 
>   Right, providing a flexible and generic enough naming scheme is probably
> the best, using strings is definitely better IMHO. Usually devices will
> be associated to existing devices or files, which will be referenced by
> names. If those resources doesn't exist as such or can't be named, it's 
> better to still build a naming scheme around the mechanism, for example:
> 
>     'xen:vbd:0:1234' or 'xen:vif:2:0123' 
> 
> and using those names separates the API from the specifics, while allowing
> some flexibility.

This is just exposing xen specific attributes via the backdoor, rather 
than via an explicit API. The result is same - applications will become
more dependant on particular hypervisor impementation details.

If we're going to expose block info & allow attach / detach, we should
follow the data format already exposed for block devices in the XML:

  - device name   - eg  hda, xvda1, xvda1, etc
  - backing store - path to a file 
  - type - phys / file
  - readonly - boolean
  - type - floppy, cdrom, disk

Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 




More information about the libvir-list mailing list