Product Announcements

Setting up a Shared VMware Tools Directory

Kyle Gleed, Sr. Technical Marketing Manager, VMware

I often get asked why VMware provides two different image profiles as part of the ESXi offline bundle. For those who are not familiar with what an offline bundle is think of it as a copy of the installation ISO in a zip format.  The offline bundle is meant to be used with the ESXi Image Builder CLI to create custom installation images. These custom images, referred to as image profiles, can then be used to install ESXi hosts by exporting them as an ISO image or uploading them to an Auto Deploy server.

The offline bundle, sometimes referred to as an offline depot, can be downloaded from the same place where you download the ISO image (look for the .zip file).  The offline bundle comes with two pre-configured image profiles that you can use right out of the box, one with VMware Tools (standard) and one without (no-tools):


The reason for providing two separate image profiles has to do with using vSphere Auto Deploy to PXE boot your hosts. The full ESXi 5.0 image is approximately ~300MB and of this the VMware Tools accounts for roughly half (~147MB). While in many respects a 300MB installation image is quite small, it’s important to understand that when PXE booting the full image gets copied over the network each time a host boots. When working with a large number of hosts, and especially when many hosts are likely to boot concurrently (i.e. boot storm), the summation of many 300MB images going over the network can quickly add up, and as such it helps to use as small an image as possible. Because the VMware tools aren’t required to boot an ESXi hosts, and because it accounts for almost half of the image size, one easy way to reduce the size of the image and improve PXE boot performance is to exclude the tools package. Hence why we provide the two separate image profiles.

Excluding the VMware Tools package makes the image smaller and helps improve PXE boot performance, but without the tools package how do you install VMware Tools inside your guest VMs? The answer is that you need to manually setup a shared VMware Tools directory and reconfigure your ESXi hosts to use this shared location. The steps to do this are documented in KB 2004018, and although the KB is pretty straightforward I thought it would be worthwhile to provide an example.

One important note before we begin, there is a bug in the ESXi 5.0 GA release that prevented setting up a shared VMware Tools directory with Auto Deploy, fortunately this bug is fixed in ESXi 5.0 Update 1. So before you begin make sure you have upgraded your hosts to ESXi 5.0 update 1. Also, keep in mind that you will need to boot at least one of your ESXi host using an Image Profile that includes the VMware Tools so you have a source location from which you can copy the files to the shared directory. As the KB article suggest it’s a good idea to keep at least one non-auto deployed host in your environment that is running a full (standard) ESXi image. This way you will always have a source from which you can update your shared tools directory.

Below is an example of how I setup a shared tools directory in my existing Auto Deploy environment.

Step 1. Create a directory on a shared NFS datastore.

From the vSphere client right click on the datastore and select “Browse Datastore…”.

From browse datastore window, click the icon to “Create a new folder”. I named my folder “SharedToolsDir”.


Step 2. Using the ESXi Shell logon to a host that has a copy of VMware tools installed and copy the VMware Tools files into the shared directory. In this example my NFS volume is mounted as “VOL03”. The location for VMware Tools on the source host is the /productLocker directory. You simply need to copy all the files in the /productLocker directory over to the shared NFS directory.

~# cd /vmfs/volumes/VOL03/SharedToolsDir

~# cp –R /productLocker/* .

~# ls


Step 3. Edit your host profile (or create a new host profile) and update the advanced attribute “UserVars.ProductLockerLocation” to point to the shared directory.

From the vSphere client select “Home -> Host Profiles”. Select your host profile and select “Edit Profile”.

Expand “Advanced configuration option -> UserVars.ProductLockerLocation”, and select “Advanced option”.

From the pull down select “Configure a fixed option” and set the attribute to the path of the new location (e.g. “/vmfs/volumes/VOL03/SharedToolsDir”).

Click “OK” to save the host profile changes.


Step 4. This next step is a precautionary step not covered in the KB article.  Now that I’ve created my shared tools directory and edited the host profile it’s a good idea to verify the Auto Deploy rules are properly set to assign the correct cluster, image profile and host profile.

Start a PowerCLI, session and connect to vCenter:

Use the “Get-DeployRuleSet” cmdlet to list the active Auto Deploy rules and verify your rules are correct.  Note that you should be using an  image profile  that doesn’t include VMware Tools.

PowerCLI C: Get-DeployRuleSet


Next, use the “Test-DeployRuleSetCompliance” cmdlet to verify that your Auto Deploy hosts are in compliance with the active ruleset.

PowerCLI C: Get-VMHost <FQHN> | Test-DeployRuleSetCompliance


In the above example the empty “ItemList” reflects a compliant host. If the ItemList shows a host as non-compliant use the “Repair-DeployRuleSetCompliance” cmdlet to bring it into compliance:


Step 5. At this point you are ready to reboot your hosts. Make sure you migrate any VMs off the host prior to rebooting. During the reboot the /productLocker will be re-linked to point to the new shared tools directory.

6. After the host reboot, log back into the ESXi shell and verify the /productLocker is in fact pointing to the shared tools directory.

~# ls –al / | grep productLocker



When using Auto Deploy to PXE boot ESXi you can reduce the amount of data that needs to be copied over the network by excluding VMware Tools package from the Image Profile. When you do this you will need to manually setup a shared VMware Tools location and update the host profile to reconfigure the hosts to use the shared tools directory. Setting up a shared VMware Tools location is a four-step process:

· Create a shard directory

· Copy the VMware Tools ISO images into the shared directory

· Set the “UserVars.ProductLockerLocation” attribute in the Host Profile

· Reboot each ESXi host

After following these steps your ESXi hosts will share a single copy of VMware Tools opposed to each host having it’s own copy.

Remember, setting up a shared tools directory requires ESXi 5.0 Update 1.

Follow me on twitter @VMwareESXi

Related Articles