[libvirt] [PATCH] Fix xen driver following changes to make it stateful
Daniel Veillard
veillard at redhat.com
Fri Aug 31 02:54:11 UTC 2012
On Thu, Aug 30, 2012 at 12:53:02PM -0600, Jim Fehlig wrote:
> Recent work to improve support for loadable driver modules introduced
> a regression in the xen driver. The legacy xen driver is now a
> stateful, libvirtd driver but was not being registered when building
> without driver modules.
okay
> A slight behavior change was also noted in the xen drivers when
> built as driver modules. Previously, explicitly specifying a
> connection URI was not necessary, but now
>
> Compiled against library: libvirt 0.10.0
> Using library: libvirt 0.10.0
> Using API: QEMU 0.10.0
> error: failed to get the hypervisor version
> error: internal error Cannot find suitable emulator for x86_64
>
> The xen drivers need to be registered before the qemu driver since
> the qemu driver will return success with a null connection URI.
> This ordering is safe since the xen drivers will decline when not
> running the xen kernel.
Okay, since if running a xen kernel, kvm is not expected to be used.
> daemon/Makefile.am | 4 ++++
> daemon/libvirtd.c | 18 ++++++++++++------
> 2 files changed, 16 insertions(+), 6 deletions(-)
>
> diff --git a/daemon/Makefile.am b/daemon/Makefile.am
> index b00fc13..b45349c 100644
> --- a/daemon/Makefile.am
> +++ b/daemon/Makefile.am
> @@ -131,6 +131,10 @@ if WITH_LXC
> libvirtd_LDADD += ../src/libvirt_driver_lxc.la
> endif
>
> +if WITH_XEN
> + libvirtd_LDADD += ../src/libvirt_driver_xen.la
> +endif
> +
> if WITH_LIBXL
> libvirtd_LDADD += ../src/libvirt_driver_libxl.la
> endif
> diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
> index 352d4fe..6973df6 100644
> --- a/daemon/libvirtd.c
> +++ b/daemon/libvirtd.c
> @@ -66,6 +66,9 @@
> # ifdef WITH_LXC
> # include "lxc/lxc_driver.h"
> # endif
> +# ifdef WITH_XEN
> +# include "xen/xen_driver.h"
> +# endif
> # ifdef WITH_LIBXL
> # include "libxl/libxl_driver.h"
> # endif
> @@ -382,6 +385,12 @@ static void daemonInitialize(void)
> # ifdef WITH_NETCF
> virDriverLoadModule("interface");
> # endif
> +# ifdef WITH_XEN
> + virDriverLoadModule("xen");
> +# endif
> +# ifdef WITH_LIBXL
> + virDriverLoadModule("libxl");
> +# endif
> # ifdef WITH_QEMU
> virDriverLoadModule("qemu");
> # endif
> @@ -391,12 +400,6 @@ static void daemonInitialize(void)
> # ifdef WITH_UML
> virDriverLoadModule("uml");
> # endif
> -# ifdef WITH_XEN
> - virDriverLoadModule("xen");
> -# endif
> -# ifdef WITH_LIBXL
> - virDriverLoadModule("libxl");
> -# endif
> #else
> # ifdef WITH_NETWORK
> networkRegister();
> @@ -416,6 +419,9 @@ static void daemonInitialize(void)
> # ifdef WITH_NWFILTER
> nwfilterRegister();
> # endif
> +# ifdef WITH_XEN
> + xenRegister();
> +# endif
> # ifdef WITH_LIBXL
> libxlRegister();
> # endif
That looks fine to me, and I confirmed this didn't change the
behaviour on my non-xen machine,
ACK, and pushed,
thanks !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list