Last active
August 29, 2015 14:16
-
-
Save kivanio/429f09599c5e413bd268 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
set -x | |
if ! mount -t cd9660 /dev/cd0 /mnt; then | |
echo 'Must run Virtual Machines > Install VMware Tools first' >&2 | |
exit 1 | |
fi | |
VMWARE_TOOLS=/tmp/vmware-tools-distrib | |
MOUNTED_CD=/mnt | |
trap 'RESULT=$?; rm -rf "$VMWARE_TOOLS"; umount "$MOUNTED_CD" >/dev/null 2>&1 || true; exit $RESULT' INT TERM HUP PIPE QUIT EXIT | |
env ASSUME_ALWAYS_YES=YES pkg install pkg | |
env ASSUME_ALWAYS_YES=YES pkg install compat6x-`uname -p` perl5 | |
tar xf /mnt/vmware-freebsd-tools.tar.gz -C /tmp/ | |
cd /tmp/vmware-tools-distrib | |
./vmware-install.pl "${@---default}" | |
cat >&2 << NOTES | |
Next steps: | |
0. Run: sed -i '' 's/em0/vmx3f0/g' /etc/rc.conf | |
1. Power off this vm (do not use suspend) | |
2. Edit the .vmx on the actual machine, change the following line from: | |
ethernet0.virtualDev = "e1000" | |
to: | |
#ethernet0.virtualDev = "e1000" | |
ethernet0.virtualDev = "vmxnet3" | |
3. Power on the VM | |
NOTES |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment