---
cfg.mk |1 +
configure.ac|7 +
include/libvirt/virterror.h |1 +
po/POTFILES.in |2 +
src/Makefile.am | 24 +-
src/driver.h|3 +-
src/libvirt.c | 13 +
src/util/virterror.c|3 +
src/vmware/vmware_conf.c| 500 +
src/vmware/vmware_conf.h| 83
src/vmware/vmware_driver.c | 1013 +++
src/vmware/vmware_driver.h | 25 +
12 files changed, 1671 insertions(+), 4 deletions(-)
create mode 100644 src/vmware/vmware_conf.c
create mode 100644 src/vmware/vmware_conf.h
create mode 100644 src/vmware/vmware_driver.c
create mode 100644 src/vmware/vmware_driver.h
diff --git a/cfg.mk b/cfg.mk
index bda8c57..03186b3 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -388,6 +388,7 @@ msg_gen_function += virXMLError
msg_gen_function += virXenInotifyError
msg_gen_function += virXenStoreError
msg_gen_function += virXendError
+msg_gen_function += vmwareError
msg_gen_function += xenapiSessionErrorHandler
msg_gen_function += xenUnifiedError
msg_gen_function += xenXMError
diff --git a/configure.ac b/configure.ac
index 64e76dc..5ec524d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -227,6 +227,8 @@ AC_ARG_WITH([uml],
AC_HELP_STRING([--with-uml], [add UML support
@:@default=check@:@]),[],[with_uml=check])
AC_ARG_WITH([openvz],
AC_HELP_STRING([--with-openvz], [add OpenVZ support
@:@default=yes@:@]),[],[with_openvz=yes])
+AC_ARG_WITH([vmware],
+ AC_HELP_STRING([--with-vmware], [add VMware support
@:@default=yes@:@]),[],[with_vmware=yes])
AC_ARG_WITH([libssh2],
AC_HELP_STRING([--with-libssh2=@:@PFX@:@], [libssh2 location
@:@default=/usr/local/lib@:@]),[],[with_libssh2=yes])
AC_ARG_WITH([phyp],
@@ -316,6 +318,10 @@ if test $with_openvz = yes; then
fi
AM_CONDITIONAL([WITH_OPENVZ], [test $with_openvz = yes])
+if test $with_vmware = yes; then
+AC_DEFINE_UNQUOTED([WITH_VMWARE], 1, [whether VMware driver is enabled])
+fi
+AM_CONDITIONAL([WITH_VMWARE], [test $with_vmware = yes])
dnl
dnl check for XDR
@@ -2277,6 +2283,7 @@ AC_MSG_NOTICE([ Xen: $with_xen])
AC_MSG_NOTICE([QEMU: $with_qemu])
AC_MSG_NOTICE([ UML: $with_uml])
AC_MSG_NOTICE([ OpenVZ: $with_openvz])
+AC_MSG_NOTICE([ VMware: $with_vmware])
AC_MSG_NOTICE([VBox: $with_vbox])
AC_MSG_NOTICE([ XenAPI: $with_xenapi])
AC_MSG_NOTICE([ LXC: $with_lxc])
diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h
index eaeb477..a1f88f4 100644
--- a/include/libvirt/virterror.h
+++ b/include/libvirt/virterror.h
@@ -52,6 +52,7 @@ typedef enum {
VIR_FROM_TEST, /* Error from test driver */
VIR_FROM_REMOTE, /* Error from remote driver */
VIR_FROM_OPENVZ,/* Error from OpenVZ driver */
+VIR_FROM_VMWARE,/* Error from VMware 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 */
diff --git a/po/POTFILES.in b/po/POTFILES.in
index e7be0d3..5561ace 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -100,6 +100,8 @@ src/util/xml.c
src/vbox/vbox_XPCOMCGlue.c
src/vbox/vbox_driver.c
src/vbox/vbox_tmpl.c
+src/vmware/vmware_conf.c
+src/vmware/vmware_driver.c
src/xen/xen_driver.c
src/xen/xen_hypervisor.c
src/xen/xen_inotify.c
diff --git a/src/Makefile.am b/src/Makefile.am
index 196d8af..8bab5e2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -219,8 +219,6 @@ check-local: remote_protocol-structs
TEST_DRIVER_SOURCES = \
test/test_driver.c test/test_driver.h
-
-
# Now the Hypervisor specific drivers
XEN_DRIVER_SOURCES = \
xen/sexpr.c xen/sexpr.h \
@@ -256,6 +254,10 @@ OPENVZ_DRIVER_SOURCES =
\
openvz/openvz_conf.c openvz/openvz_conf.h \
openvz/openvz_driver.c openvz/openvz_driver.h
+VMWARE_DRIVER_SOURCES =\
+ vmware/vmware_driver.c vmware/vmware.h \
+ vmware/vmware_conf.c vmware/vmware_conf.h
+
VBOX_DRIVER_SOURCES = \
vbox/vbox_XPCOMCGlue.c vbox/vbox_XPCOMCGlue.h \
vbox/vbox_driver.c vbox/vbox_driver.h \
@@ -601,6 +603,21 @@ endif
libvirt_driver_openvz_la_SOURCES = $(OPENVZ_DRIVER_SOURCES)
endif
+if WITH_VMWARE
+if WITH_DRIVER_MODULES
+mod_LTLIBRARIES += libvirt_driver_vmware.la
+else
+noinst_LTLIBRARIES += libvirt_driver_vmware.la
+libvirt_la_BUILT_LIBADD += libvirt_driver_vmware.la
+endif
+libvirt_driver_vmware_la_CFLAGS = \
+ -...@top_srcdir@/src/conf
+if WITH_DRIVER_MODULES
+libvirt_driver_vmware_la_LDFLAGS = -module -avoid-version
+endif