As part of working with OS X VMs in VMware Fusion and ESXi, I’ve regularly installed the VMware Tools and have even found ways to incorporate their installation into my build process. However, getting the latest VMware Tools installer into my VM building workflow has usually involved at least one manual step or having a system management tool handle the installation for me. I wanted something that was completely automated without needing to also install a system management client. My end goal was that I didn’t have to worry about doing anything; the latest VMware Tools for my OS X VM would just be installed into the VM as part of the build process.
After doing some research and testing, I have a solution that looks like it does just that. For more details, see below the jump.
However, it is recommended that you install VMware Tools using the Darwin.iso file downloaded with VMware Unlocker, which is used to run MacOS systems on VMware. It is the ideal way to install VMware Tools using the darwin.iso file on the macOS Mojave 10.14 virtual machine.
My colleague Joe Chilcote had adapted using AutoPkg to install Puppet Labs‘ Puppet and Facter tools into VMs, using the script available from the link below:
Update – 5-10-2016: Joe let me know that his script was a fork of Tim Sutton‘s Puppet / Facter installation script, so credit to Tim for the original idea.
My colleague Jesse Peterson had written a VMware Tools provider for AutoPkg, which was designed to download the latest copy of VMware Tools for OS X:
I had already used Jesse’s AutoPkg provider to build AutoPkg recipes to download, uncompress and extract the VMware Tools installer, so I decided to see if I could leverage Joe’s technique with my existing VMwareTools.pkg recipe for AutoPkg. I also wanted to make sure to clean all AutoPkg-related parts from the system, as I didn’t want to leave traces behind on what could otherwise be a completely unconfigured OS X VM. After some work, I have a script which does the following:
- Downloads AutoPkg from GitHub using git.
- Adds the AutoPkg recipe repo containing the VMwareTools .download and .pkg recipes
- Redirects the AutoPkg cache to a temp location.
- Downloads the current release version of VMware Tools for OS X using AutoPkg and extracts the installer package.
- Installs the latest VMware Tools using the AutoPkg-generated installer package.
Post-installation
Once VMware Tools has been installed by the script, the OS X VM where VMware Tools has been installed must be restarted in order to enable VMware Tools’ functionality.
Notes
One thing I found in my testing is that git would be needed for this process, so an essential pre-requisite for running this script is installing git.
This can be most easily accomplished by installing Xcode or the Xcode command line tools (CLT). Both will include git, so installing either should work. One gotcha I ran into during my testing is that Xcode / Xcode CLT usually require accepting Apple’s license before you’ll be able to use git, so make sure the license has been accepted prior to running this script.
I’ve posted the script to my GitHub repo at the following address:
This script is also available as a payload-free installer package, stored as a .zip file in the payload_free_installer directory.
![Freebsd Freebsd](/uploads/1/2/6/2/126289117/339123007.png)
The following sections describe how to install VMware Tools:
Don't Forget VMware Tools
It is very important that you install VMware Tools in the guest operating system.
With the VMware Tools SVGA driver installed, Workstation supports significantly faster graphics performance.
The VMware Tools package provides support required for shared folders and for drag and drop operations.
Other tools in the package support synchronization of time in the guest operating system with time on the host, automatic grabbing and releasing of the mouse cursor, copying and pasting between guest and host, and improved mouse performance in some guest operating systems.
The installers for VMware Tools for Windows, Linux, FreeBSD, and NetWare guest operating systems are built into VMware Workstation as ISO image files. (An ISO image file looks like a CD-ROM to your guest operating system and even appears as a CD-ROM in Windows Explorer. You do not use an actual CD-ROM to install VMware Tools, nor do you need to download the CD-ROM image or burn a physical CD-ROM of this image file.)
When you choose VM > Install VMware Tools from the VMware Workstation menu, VMware Workstation temporarily connects the virtual machine's first virtual CD-ROM drive to the ISO image file that contains the VMware Tools installer for your guest operating system and you are ready to begin the installation process.