Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

16.04 should use open-vm-tools #621

Merged
merged 1 commit into from
Jul 9, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 25 additions & 16 deletions scripts/common/vmtools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,35 @@ virtualbox-iso|virtualbox-ovf)
;;

vmware-iso|vmware-vmx)
mkdir -p /tmp/vmware;
mkdir -p /tmp/vmware-archive;
mount -o loop $HOME_DIR/linux.iso /tmp/vmware;
ubuntu_version="`lsb_release -r | awk '{print $2}'`";
ubuntu_major_version="`echo $ubuntu_version | awk -F. '{print $1}'`";

TOOLS_PATH="`ls /tmp/vmware/VMwareTools-*.tar.gz`";
VER="`echo "${TOOLS_PATH}" | cut -f2 -d'-'`";
MAJ_VER="`echo ${VER} | cut -d '.' -f 1`";
# Use open-vm-tools
if [ "$ubuntu_version" = "16.04" ]; then
apt-get install -y open-vm-tools
mkdir /mnt/hgfs;
else
mkdir -p /tmp/vmware;
mkdir -p /tmp/vmware-archive;
mount -o loop $HOME_DIR/linux.iso /tmp/vmware;

echo "VMware Tools Version: $VER";
TOOLS_PATH="`ls /tmp/vmware/VMwareTools-*.tar.gz`";
VER="`echo "${TOOLS_PATH}" | cut -f2 -d'-'`";
MAJ_VER="`echo ${VER} | cut -d '.' -f 1`";

tar xzf ${TOOLS_PATH} -C /tmp/vmware-archive;
if [ "${MAJ_VER}" -lt "10" ]; then
/tmp/vmware-archive/vmware-tools-distrib/vmware-install.pl --default;
else
/tmp/vmware-archive/vmware-tools-distrib/vmware-install.pl --force-install;
echo "VMware Tools Version: $VER";

tar xzf ${TOOLS_PATH} -C /tmp/vmware-archive;
if [ "${MAJ_VER}" -lt "10" ]; then
/tmp/vmware-archive/vmware-tools-distrib/vmware-install.pl --default;
else
/tmp/vmware-archive/vmware-tools-distrib/vmware-install.pl --force-install;
fi
umount /tmp/vmware;
rm -rf /tmp/vmware;
rm -rf /tmp/vmware-archive;
rm -f $HOME_DIR/*.iso;
fi
umount /tmp/vmware;
rm -rf /tmp/vmware;
rm -rf /tmp/vmware-archive;
rm -f $HOME_DIR/*.iso;
;;

parallels-iso|parallels-pvm)
Expand Down