diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index 1ac8e30466..ae6a15c7bd 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -73,6 +73,9 @@ # ifdef WITH_UML # include "uml/uml_driver.h" # endif +# ifdef WITH_VBOX +# include "vbox/vbox_driver.h" +# endif # ifdef WITH_NETWORK # include "network/bridge_driver.h" # endif @@ -400,6 +403,9 @@ static void daemonInitialize(void) # ifdef WITH_UML virDriverLoadModule("uml"); # endif +# ifdef WITH_VBOX + virDriverLoadModule("vbox"); +# endif #else # ifdef WITH_NETWORK networkRegister(); @@ -434,6 +440,9 @@ static void daemonInitialize(void) # ifdef WITH_UML umlRegister(); # endif +# ifdef WITH_VBOX + vboxRegister(); +# endif #endif } diff --git a/docs/drvvbox.html.in b/docs/drvvbox.html.in index d59da5783f..4888dd2668 100644 --- a/docs/drvvbox.html.in +++ b/docs/drvvbox.html.in @@ -31,6 +31,18 @@ vbox+tcp://user@example.com/session (remote access, SASl/Kerberos) vbox+ssh://user@example.com/session (remote access, SSH tunnelled) +
+ NOTE: as of libvirt 1.0.6, the VirtualBox driver will always + run inside the libvirtd daemon, instead of being built-in to the + libvirt.so library directly. This change was required due to the + fact that VirtualBox code is LGPLv2-only licensed, which is not + compatible with the libvirt.so license of LGPLv2-or-later. The + daemon will be auto-started when the first connection to VirtualBox + is requested. This change also means that it will not be possible + to use VirtualBox URIs on the Windows platform, until additional + work is completed to get the libvirtd daemon working there. +
+diff --git a/src/Makefile.am b/src/Makefile.am index 9a17f595d6..4ca132032a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -958,12 +958,26 @@ libvirt_driver_vmware_la_SOURCES = $(VMWARE_DRIVER_SOURCES) endif if WITH_VBOX +noinst_LTLIBRARIES += libvirt_driver_vbox_impl.la +libvirt_driver_vbox_la_SOURCES = +libvirt_driver_vbox_la_LIBADD = libvirt_driver_vbox_impl.la +if WITH_DRIVER_MODULES +mod_LTLIBRARIES += libvirt_driver_vbox.la +libvirt_driver_vbox_la_LIBADD += ../gnulib/lib/libgnu.la +libvirt_driver_vbox_la_LDFLAGS = -module -avoid-version +else noinst_LTLIBRARIES += libvirt_driver_vbox.la -libvirt_la_BUILT_LIBADD += libvirt_driver_vbox.la -libvirt_driver_vbox_la_CFLAGS = \ - -I$(top_srcdir)/src/conf $(AM_CFLAGS) -libvirt_driver_vbox_la_LIBADD = $(DLOPEN_LIBS) $(MSCOM_LIBS) -libvirt_driver_vbox_la_SOURCES = $(VBOX_DRIVER_SOURCES) +# GPLv2-only license requries that it be linked into +# libvirtd and *not* libvirt.so +#libvirt_la_BUILT_LIBADD += libvirt_driver_vbox.la +endif + +libvirt_driver_vbox_impl_la_CFLAGS = \ + -I$(top_srcdir)/src/conf \ + $(AM_CFLAGS) +libvirt_driver_vbox_impl_la_LDFLAGS = $(AM_LDFLAGS) +libvirt_driver_vbox_impl_la_LIBADD = $(DLOPEN_LIBS) $(MSCOM_LIBS) +libvirt_driver_vbox_impl_la_SOURCES = $(VBOX_DRIVER_SOURCES) endif if WITH_XENAPI diff --git a/src/libvirt.c b/src/libvirt.c index 30f9646110..4c018ecb83 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -81,9 +81,6 @@ #ifdef WITH_PHYP # include "phyp/phyp_driver.h" #endif -#ifdef WITH_VBOX -# include "vbox/vbox_driver.h" -#endif #ifdef WITH_ESX # include "esx/esx_driver.h" #endif @@ -465,10 +462,6 @@ virGlobalInit(void) if (phypRegister() == -1) goto error; #endif -#ifdef WITH_VBOX - if (vboxRegister() == -1) - goto error; -#endif #ifdef WITH_ESX if (esxRegister() == -1) goto error;