This patch adds the base linux container support.
--
Best Regards,
Dave Leskovec
IBM Linux Technology Center
Open Virtualization
---
configure.in | 6 ++++++
include/libvirt/virterror.h | 1 +
src/Makefile.am | 2 ++
src/driver.h | 1 +
src/libvirt.c | 6 ++++++
src/virterror.c | 3 +++
6 files changed, 19 insertions(+)
Index: b/configure.in
===================================================================
--- a/configure.in 2008-03-11 07:49:04.000000000 -0700
+++ b/configure.in 2008-03-14 10:55:36.000000000 -0700
@@ -132,6 +132,8 @@
[ --with-qemu add QEMU/KVM support (on)],[],[with_qemu=yes])
AC_ARG_WITH(openvz,
[ --with-openvz add OpenVZ support (off)],[],[with_openvz=no])
+AC_ARG_WITH(lxc,
+[ --with-lxc add Linux Container support (off)],[],[with_lxc=no])
AC_ARG_WITH(test,
[ --with-test add test driver support (on)],[],[with_test=yes])
AC_ARG_WITH(remote,
@@ -229,6 +231,9 @@
if test "$with_openvz" = "yes" ; then
LIBVIRT_FEATURES="$LIBVIRT_FEATURES -DWITH_OPENVZ"
fi
+if test "$with_lxc" = "yes" ; then
+ LIBVIRT_FEATURES="$LIBVIRT_FEATURES -DWITH_LXC"
+fi
if test "$with_qemu" = "yes" ; then
LIBVIRT_FEATURES="$LIBVIRT_FEATURES -DWITH_QEMU"
fi
@@ -947,6 +952,7 @@
AC_MSG_NOTICE([ Proxy: $with_xen_proxy])
AC_MSG_NOTICE([ QEMU: $with_qemu])
AC_MSG_NOTICE([ OpenVZ: $with_openvz])
+AC_MSG_NOTICE([ LXC: $with_lxc])
AC_MSG_NOTICE([ Test: $with_test])
AC_MSG_NOTICE([ Remote: $with_remote])
AC_MSG_NOTICE([Libvirtd: $with_libvirtd])
Index: b/include/libvirt/virterror.h
===================================================================
--- a/include/libvirt/virterror.h 2008-02-29 04:53:11.000000000 -0800
+++ b/include/libvirt/virterror.h 2008-03-14 10:55:36.000000000 -0700
@@ -54,6 +54,7 @@
VIR_FROM_OPENVZ, /* Error from OpenVZ driver */
VIR_FROM_XENXM, /* Error at Xen XM layer */
VIR_FROM_STATS_LINUX, /* Error in the Linux Stats code */
+ VIR_FROM_LXC, /* Error from Linux Container driver */
VIR_FROM_STORAGE, /* Error from storage driver */
} virErrorDomain;
Index: b/src/Makefile.am
===================================================================
--- a/src/Makefile.am 2008-02-28 09:07:37.000000000 -0800
+++ b/src/Makefile.am 2008-03-14 11:14:01.000000000 -0700
@@ -59,6 +59,8 @@
qemu_conf.c qemu_conf.h \
openvz_conf.c openvz_conf.h \
openvz_driver.c openvz_driver.h \
+ lxc_driver.c lxc_driver.h \
+ lxc_conf.c lxc_conf.h \
nodeinfo.h nodeinfo.c \
storage_conf.h storage_conf.c \
storage_driver.h storage_driver.c \
Index: b/src/driver.h
===================================================================
--- a/src/driver.h 2008-02-25 23:05:18.000000000 -0800
+++ b/src/driver.h 2008-03-14 10:55:36.000000000 -0700
@@ -24,6 +24,7 @@
VIR_DRV_QEMU = 3,
VIR_DRV_REMOTE = 4,
VIR_DRV_OPENVZ = 5,
+ VIR_DRV_LXC = 6
} virDrvNo;
Index: b/src/libvirt.c
===================================================================
--- a/src/libvirt.c 2008-03-13 02:27:46.000000000 -0700
+++ b/src/libvirt.c 2008-03-14 10:55:36.000000000 -0700
@@ -45,6 +45,9 @@
#ifdef WITH_OPENVZ
#include "openvz_driver.h"
#endif
+#ifdef WITH_LXC
+#include "lxc_driver.h"
+#endif
/*
* TODO:
@@ -272,6 +275,9 @@
#ifdef WITH_OPENVZ
if (openvzRegister() == -1) return -1;
#endif
+#ifdef WITH_LXC
+ if (lxcRegister() == -1) return -1;
+#endif
if (storageRegister() == -1) return -1;
#ifdef WITH_REMOTE
if (remoteRegister () == -1) return -1;
Index: b/src/virterror.c
===================================================================
--- a/src/virterror.c 2008-02-27 02:37:19.000000000 -0800
+++ b/src/virterror.c 2008-03-14 10:55:36.000000000 -0700
@@ -296,6 +296,9 @@
case VIR_FROM_STATS_LINUX:
dom = "Linux Stats ";
break;
+ case VIR_FROM_LXC:
+ dom = "LXC ";
+ break;
case VIR_FROM_STORAGE:
dom = "Storage ";
break;
--
Libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list