On Thu, Feb 21, 2008 at 02:36:10PM +0000, Daniel P. Berrange wrote: > On Thu, Feb 21, 2008 at 09:26:38AM -0500, Daniel Veillard wrote: > > What do people think ? I would be tempted to provide a patch to change > > do_open() behaviour on linux in the case name is NULL or "", and > > then check what hypervisor might be present and running, > > I think it is worthwhile - the 'default to Xen' behavious is a major cause > of pain for people initially using libvirt, particularly since KVM is > becoming the defacto standard for Linux platforms. I'd see the following > levels of customization: > > - If a non-NULL URI is passed in virConnectOpen, use that > - Else if LIBVIRT_DEFAULT_URI is set use that URI > - Else probe each registered driver in order until one succeeds > > For the latter I think we could add a 'probe' method to the internal driver > API table. Then we can just call 'probe' on each driver in turn until we > find one which is available on the system. Yup, that's even better than ad-hoc attempt at detecting, it really should go in the driver. > At the same time it could be worth having a public API to 'detect drivers' > which will call probe for each driver and return a list of all drivers > which are available. This allows an app to easily ask libvirt what it > supports - because long term we'll definitely get hosts supporting many > drivers at once. We can also advertise this list of supported drivers > using the Avahi mDNS broadcasts we do from the remote daemon. That can be done in a second step, less urgent IMHO but useful too, Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@xxxxxxxxxx | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list