Skip to content

Commit

Permalink
Merge pull request kubernetes#19 from coreos/vmwarefusion
Browse files Browse the repository at this point in the history
vmwarefusion support
  • Loading branch information
Sergiusz Urbaniak authored Sep 19, 2016
2 parents 0ffb371 + 768d623 commit d948152
Show file tree
Hide file tree
Showing 11 changed files with 230 additions and 3 deletions.
23 changes: 22 additions & 1 deletion board/coreos/minikube/linux-4.7_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,22 @@ CONFIG_DEVTMPFS_MOUNT=y
CONFIG_DEBUG_DEVRES=y
CONFIG_CONNECTOR=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_VMWARE_BALLOON=m
CONFIG_VMWARE_VMCI=m
CONFIG_BLK_DEV_SD=y
CONFIG_BLK_DEV_SR=y
CONFIG_BLK_DEV_SR_VENDOR=y
CONFIG_CHR_DEV_SG=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_SPI_ATTRS=y
# CONFIG_SCSI_LOWLEVEL is not set
CONFIG_SCSI_FC_ATTRS=m
CONFIG_SCSI_ISCSI_ATTRS=m
CONFIG_SCSI_SAS_LIBSAS=m
CONFIG_SCSI_SAS_ATA=y
CONFIG_SCSI_SRP_ATTRS=m
CONFIG_MEGARAID_NEWGEN=y
CONFIG_MEGARAID_MM=m
CONFIG_VMWARE_PVSCSI=y
CONFIG_ATA=y
CONFIG_SATA_AHCI=y
CONFIG_ATA_PIIX=y
Expand All @@ -236,12 +245,21 @@ CONFIG_BLK_DEV_MD=y
CONFIG_BLK_DEV_DM=y
CONFIG_DM_MIRROR=y
CONFIG_DM_ZERO=y
CONFIG_FUSION=y
CONFIG_FUSION_SPI=m
CONFIG_FUSION_FC=m
CONFIG_FUSION_SAS=m
CONFIG_FUSION_CTL=m
CONFIG_FUSION_LOGGING=y
CONFIG_MACINTOSH_DRIVERS=y
CONFIG_MAC_EMUMOUSEBTN=y
CONFIG_NETDEVICES=y
CONFIG_NETCONSOLE=y
CONFIG_VETH=y
CONFIG_VIRTIO_NET=y
CONFIG_AMD8111_ETH=m
CONFIG_PCNET32=m
CONFIG_PCMCIA_NMCLAN=m
CONFIG_TIGON3=y
CONFIG_NET_TULIP=y
CONFIG_E100=y
Expand Down Expand Up @@ -335,11 +353,14 @@ CONFIG_EFI_VARS=y
CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
CONFIG_BTRFS_FS=m
CONFIG_BTRFS_FS_POSIX_ACL=y
CONFIG_QUOTA=y
CONFIG_QUOTA_NETLINK_INTERFACE=y
# CONFIG_PRINT_QUOTA_WARNING is not set
CONFIG_QFMT_V2=y
CONFIG_AUTOFS4_FS=y
CONFIG_FUSE_FS=y
CONFIG_OVERLAY_FS=m
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
Expand Down
Empty file.
4 changes: 2 additions & 2 deletions board/coreos/minikube/users
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
rkt -1 rkt -1 - /home/rkt /bin/bash rkt-admin,wheel -
docker -1 docker -1 - /home/docker /bin/bash rkt,rkt-admin,wheel -
rkt -1 rkt -1 - /home/rkt /bin/bash rkt-admin,wheel -
docker -1 docker -1 =tcuser /home/docker /bin/bash rkt,rkt-admin,wheel -
3 changes: 3 additions & 0 deletions configs/minikube_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ BR2_PACKAGE_XZ=y
BR2_PACKAGE_E2FSPROGS=y
BR2_PACKAGE_PARTED=y
BR2_PACKAGE_CA_CERTIFICATES=y
BR2_PACKAGE_LIBFUSE=y
BR2_PACKAGE_BRIDGE_UTILS=y
BR2_PACKAGE_IPROUTE2=y
BR2_PACKAGE_IPTABLES=y
Expand All @@ -33,3 +34,5 @@ BR2_PACKAGE_UTIL_LINUX_NSENTER=y
BR2_TARGET_ROOTFS_CPIO_BZIP2=y
BR2_TARGET_ROOTFS_ISO9660=y
BR2_TARGET_SYSLINUX=y
BR2_PACKAGE_OPENVMTOOLS10=y
BR2_PACKAGE_OPENVMTOOLS10_PROCPS=y
1 change: 1 addition & 0 deletions package/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ menu "System tools"
source "$BR2_EXTERNAL/package/automount/Config.in"
source "$BR2_EXTERNAL/package/docker-bin/Config.in"
source "$BR2_EXTERNAL/package/cni-bin/Config.in"
source "$BR2_EXTERNAL/package/openvmtools10/Config.in"
endmenu
54 changes: 54 additions & 0 deletions package/openvmtools10/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
config BR2_PACKAGE_OPENVMTOOLS10
bool "openvmtools10"
depends on BR2_i386 || BR2_x86_64
depends on BR2_USE_MMU # libglib2
depends on BR2_USE_WCHAR # libglib2
depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC
depends on BR2_ENABLE_LOCALE
depends on !BR2_TOOLCHAIN_USES_UCLIBC
select BR2_PACKAGE_LIBGLIB2
select BR2_PACKAGE_LIBDNET
help
Open Virtual Machine Tools for VMware guest OS

http://open-vm-tools.sourceforge.net/

ICU locales, Xerces, and X11 tools are currently not supported.

NOTE: Support for vmblock-fuse will be enabled in openvmtools if the
libfuse package is selected.

if BR2_PACKAGE_OPENVMTOOLS10

config BR2_PACKAGE_OPENVMTOOLS10_PROCPS
bool "procps support"
depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
select BR2_PACKAGE_PROCPS_NG
help
Enable support for procps / meminfo

comment "procps support needs BR2_PACKAGE_BUSYBOX_SHOW_OTHERS"
depends on !BR2_PACKAGE_BUSYBOX_SHOW_OTHERS

config BR2_PACKAGE_OPENVMTOOLS10_PAM
bool "PAM support"
select BR2_PACKAGE_LINUX_PAM
# linux-pam needs locale and wchar, but we already have this
# dependency on the main symbol, above.
depends on !BR2_STATIC_LIBS
depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam
help
Support for PAM in openvmtools

comment "PAM support needs a glibc toolchain w/ dynamic library"
depends on BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL

endif

comment "openvmtools needs a glibc or musl toolchain w/ wchar, threads, RPC, locale"
depends on BR2_i386 || BR2_x86_64
depends on BR2_USE_MMU
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
!BR2_TOOLCHAIN_HAS_NATIVE_RPC || !BR2_ENABLE_LOCALE || \
BR2_TOOLCHAIN_USES_UCLIBC
33 changes: 33 additions & 0 deletions package/openvmtools10/S10vmtoolsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/sh
#
# Starts vmtoolsd for openvmtools
#

EXEC="/usr/bin/vmtoolsd"
ARGS="-b"
PID="/var/run/vmtoolsd.pid"

case "$1" in
start)
printf "Starting vmtoolsd: "
start-stop-daemon -S -q -x $EXEC -- $ARGS $PID
if [ $? != 0 ]; then
echo "FAILED"
exit 1
else
echo "OK"
fi
;;
stop)
printf "Stopping vmtoolsd: "
start-stop-daemon -K -q -p $PID
echo "OK"
;;
restart|reload)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
2 changes: 2 additions & 0 deletions package/openvmtools10/openvmtools.hash
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# locally computed
sha256 87d76dc3affd39dccfae80c7210ac89e8f14cb493a651709780f67b1b5a92ec8 open-vm-tools-stable-10.0.7.tar.gz
92 changes: 92 additions & 0 deletions package/openvmtools10/openvmtools.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
################################################################################
#
# openvmtools
#
################################################################################

OPENVMTOOLS10_VERSION = stable-10.0.7
OPENVMTOOLS10_SITE = $(call github,vmware,open-vm-tools,$(OPENVMTOOLS10_VERSION))
OPENVMTOOLS10_SUBDIR = open-vm-tools
OPENVMTOOLS10_LICENSE = LGPLv2.1
OPENVMTOOLS10_LICENSE_FILES = $(OPENVMTOOLS10_SUBDIR)/COPYING
# Autoreconf needed or config/missing will run configure again at buildtime

define OPENVMTOOLS10_RUN_AUTOCONF
cd $(@D)/open-vm-tools; $(HOST_DIR)/usr/bin/autoreconf -i
endef

OPENVMTOOLS10_PRE_PATCH_HOOKS += OPENVMTOOLS10_RUN_AUTOCONF

OPENVMTOOLS10_CONF_OPTS = --with-dnet \
--without-icu --without-x --without-gtk2 \
--without-gtkmm --without-kernel-modules \
--disable-deploypkg --without-xerces
OPENVMTOOLS10_CONF_ENV += CUSTOM_DNET_CPPFLAGS=" "
OPENVMTOOLS10_DEPENDENCIES = libglib2 libdnet

# When libfuse is available, openvmtools can build vmblock-fuse, so
# make sure that libfuse gets built first
ifeq ($(BR2_PACKAGE_LIBFUSE),y)
OPENVMTOOLS10_DEPENDENCIES += libfuse
endif

ifeq ($(BR2_PACKAGE_OPENSSL),y)
OPENVMTOOLS10_CONF_OPTS += --with-ssl
OPENVMTOOLS10_DEPENDENCIES += openssl
else
OPENVMTOOLS10_CONF_OPTS += --without-ssl
endif

ifeq ($(BR2_PACKAGE_OPENVMTOOLS10_PROCPS),y)
OPENVMTOOLS10_CONF_OPTS += --with-procps
OPENVMTOOLS10_DEPENDENCIES += procps-ng
else
OPENVMTOOLS10_CONF_OPTS += --without-procps
endif

ifeq ($(BR2_PACKAGE_OPENVMTOOLS10_PAM),y)
OPENVMTOOLS10_CONF_OPTS += --with-pam
OPENVMTOOLS10_DEPENDENCIES += linux-pam
else
OPENVMTOOLS10_CONF_OPTS += --without-pam
endif

# configure needs execution permission
define OPENVMTOOLS10_PRE_CONFIGURE_CHMOD
chmod 0755 $(@D)/$(OPENVMTOOLS10_SUBDIR)/configure
endef

OPENVMTOOLS10_PRE_CONFIGURE_HOOKS += OPENVMTOOLS10_PRE_CONFIGURE_CHMOD

# symlink needed by lib/system/systemLinux.c (or will cry in /var/log/messages)
# defined in lib/misc/hostinfoPosix.c
# /sbin/shutdown needed for Guest OS restart/shutdown from hypervisor
define OPENVMTOOLS10_POST_INSTALL_TARGET_THINGIES
ln -fs os-release $(TARGET_DIR)/etc/lfs-release
if [ ! -e $(TARGET_DIR)/sbin/shutdown ]; then \
$(INSTALL) -D -m 755 package/openvmtools/shutdown \
$(TARGET_DIR)/sbin/shutdown; \
fi

mkdir -p $(TARGET_DIR)/usr/local/bin

ln -fs ../../bin/vmhgfs-fuse \
$(TARGET_DIR)/usr/local/bin/vmhgfs-fuse
endef

OPENVMTOOLS10_POST_INSTALL_TARGET_HOOKS += OPENVMTOOLS10_POST_INSTALL_TARGET_THINGIES

define OPENVMTOOLS10_INSTALL_INIT_SYSV
$(INSTALL) -D -m 755 package/openvmtools/S10vmtoolsd \
$(TARGET_DIR)/etc/init.d/S10vmtoolsd
endef

define OPENVMTOOLS10_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 package/openvmtools/vmtoolsd.service \
$(TARGET_DIR)/usr/lib/systemd/system/vmtoolsd.service
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -fs ../../../../usr/lib/systemd/system/vmtoolsd.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/vmtoolsd.service
endef

$(eval $(autotools-package))
7 changes: 7 additions & 0 deletions package/openvmtools10/shutdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
#compatibility script for openvmtools
if [ "$1" == "-r" ]; then
/sbin/reboot
else
/sbin/poweroff
fi
14 changes: 14 additions & 0 deletions package/openvmtools10/vmtoolsd.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=vmtoolsd for openvmtools
After=syslog.target network.target

[Service]
Type=forking
PIDFile=/var/run/vmtoolsd.pid
ExecStart=/usr/bin/vmtoolsd -b /var/run/vmtoolsd.pid
Restart=on-failure
KillMode=process
KillSignal=SIGKILL

[Install]
WantedBy=multi-user.target

0 comments on commit d948152

Please sign in to comment.