vmtools_win
Version information
This version is compatible with:
- Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x
- Puppet >=5.5.0 <8.0.0
Start using this module
Add this module to your Puppetfile:
mod 'kreeuwijk-vmtools_win', '1.1.2'
Learn more about managing modules with a PuppetfileDocumentation
VMware Tools for Windows
Table of Contents
- VMware Tools for Windows
- [Table of Contents](#table-of-contents)
Overview
This Puppet module manages the installation, configuration and removal of the Windows Operating System Specific Packages for VMware Tools. This allows you to use Windows' native tools to install, update and uninstall the VMware Tools for Windows.
Module Description
This Puppet module manages the installation, configuration and removal of the Windows Operating System Specific Packages for VMware Tools. The OSP is still the recommended package to install for Windows (vs. open-vm-tools now being recommended for most non-Windows OS'es).
The module supports both installing the latest version from packages.vmware.com and installing any version you have downloaded yourself and made available (either on the Puppet server or somewhere else on the network).
The latest version also supports uninstalling the currently installed version of the VMware Tools.
Setup
What this module affects
- Downloads the latest version from packages.vmware.com if you allow it (this is the default)
- Upgrades existing versions of the VMware Tools if a lower version is found (you can configure how much lower)
- Installs the OSP VMware Tools.
- Can allow or prevent automatic reboots after installation.
- Allows you to specify which components of the VMware Tools to install
- Can be used to uninstall VMware Tools (uses msiexec /X)
Requirements
You need to be running a Windows virtual machine on the VMware platform for this module to do anything.
Beginning with this module
It is safe for all nodes to use this declaration. Any non-VMware or unsupported system will skip installation of the package.
include vmtools_win
Using a simple include statement will cause the defaults to be used:
- Downloads the latest version from packages.vmware.com
- Upgrades existing versions of the VMware Tools if a lower x.y.z version is found
- Installs the OSP VMware Tools with all components, prevents reboots after installation
Upgrading
Usage
All interaction with the vmtools_win module can be done through the main vmtools_win class. This means you can simply toggle the options in ::vmtools_win to have full functionality of the module.
To allow the latest x.y.z version (e.g. 10.1.10 regardless of specific build number) on packages.vmware.com to be installed, while preventing any automatic reboots, simply include or instantiate the class:
class { 'vmtools_win': }
To set the specific level at which version checking is performed, set the following parameter:
class { 'vmtools_win':
minimum_version_level => 2,
}
The levels have the following effect:
- level 1 -> only looks at the major version (e.g. 10)
- level 2 -> looks at the major and minor version (e.g. 10.1)
- level 3 -> looks at the major, minor and micro version (e.g. 10.1.10)
- level 4 -> looks at the major, minor, micro and build version (e.g. 10.1.10.6082533)
To allow reboots when required after installation:
class { 'vmtools_win':
prevent_reboot => false,
}
To use a self-provided version of VMware Tools that you've made available on the Puppet Master:
class { 'vmtools_win':
selfprovided_install_file => 'VMware-tools-10.1.7-5541682-x86_64.exe',
selfprovided_install_version => '10.1.7.5541682',
selfprovided_file_source => 'puppet:///yourcustomrepository',
}
Uninstalling VMware Tools
To use the module to uninstall the VMware Tools, set the ensure
parameter to absent
:
class { 'vmtools_win':
ensure => absent
}
Limitations
OS Support:
Windows x64 Operating Systems. Tested on:
- Windows Server 2012
- Windows Server 2012 R2
- Windows Server 2016
- Windows Server 2019
- Windows Server Core (SAC)
- Windows 10
Notes:
Issues:
Development
Copyright (C) 2020 Kevin Reeuwijk kevinr@puppet.com
Licensed under the Apache License, Version 2.0.
Reference
Table of Contents
Classes
vmtools_win
: Installs the VMware Tools for Windows.
Class: vmtools_win
Main class.
Parameters
ensure
: Determines if VMware Tools get installed/upgraded ('present') or uninstalled ('absent'). Default: 'present'download_from_vmware
: Get latest version directly from http://packages.vmware.com. Default: truelocal_temp_folder
: Specifies the local folder to use for temporary placement of the installation file. Default: 'C:/Windows/Temp'selfprovided_install_file
: Name of the .exe file when you provide your own installation file. Must be an original VMware Tools package and normally looks like 'VMware-tools-10.1.7-5541682-x86_64.exe'. Default: not set (undef)selfprovided_install_version
: The version of the VMware Tools belonging to the .exe when you provide your own installation file. Must use an fully dot'ed format, so no dashes (for example: 10.1.7.5541682). Default: not set (undef)selfprovided_install_source
: Where to get the .exe when you provide your own installation file. Supports the same sources as the File{} resource in Puppet (because it will use the File resource to fetch it). Default: not set (undef)minimum_version_level
: sets the specific level at which version checking is performed. The value must be an integer bigger than 0. A level is defined as the . in the full version. For example 10.1.7.5541682 would have 4 levels, with level 1 being the major version (10) and level 4 being the buildnumber (5541682). Default: 3prevent_reboot
: controls if reboots are suppressed or not. When set to true, no reboots will happen even if they are necessary. When set to false, a reboot may occur if the installation of the VMware Tools determines that a reboot is needed. Default: truelogfile_location
: enables verbose logging to a logfile. Specify the path and name of the logfile to enable this (for example '%TEMP%\vmmsi.log'. Otherwise no logging is performed. Default: not set (undef)components_to_install
: comma-separated list of VMware Tools components to install. Please use the component names as listed by vmware (https://docs.vmware.com/en/VMware-vSphere/5.5/com.vmware.vmtools.install.doc/GUID-E45C572D-6448-410F-BFA2-F729F2CDA8AC.html). In most cases it's easier to leave this value at it's default and specifycomponents_to_remove
instead. Default: 'ALL'components_to_remove
: comma-separated list of VMware Tools components to not install. This overrides components that would otherwise be installed via thecomponents_to_install
parameter. Please use the component names as listed by vmware (https://docs.vmware.com/en/VMware-vSphere/5.5/com.vmware.vmtools.install.doc/GUID-E45C572D-6448-410F-BFA2-F729F2CDA8AC.html). A common component that you may want to remove is 'Hgfs', otherwise known as VMware Shared Folders. Default: not set (undef)
Changelog
All notable changes to this project will be documented in this file.
Release 1.1.2
Features
- Update changelog and readme
Release 1.1.1
Features
- Switches to using HTTPS download locations and enables TLSv1.2 support in Powershell for the content checks
- Updates PDK to 2.0.0
Release 1.1.0
Features
- Added official support for Windows 2019 and Windows 10
- Removed official support for Windows 2008R2
- Added support for uninstallation of VMware Tools (
ensure => absent
) - Validated on Windows 2019 and Windows Server Core (SAC)
- Added PDK unit tests
- PDK 1.17 update
Bugfixes
Known Issues
Release 1.0.7
Features PDK 1.12 update
Bugfixes ensure correct parsing of variable for reported issue #7
Known Issues
Release 1.0.6
Features PDK 1.8.0 update
Bugfixes Fact constraints
Known Issues
Release 1.0.5
Features Updated to PDK-based module
Bugfixes
Known Issues
Release 1.0.4
Features Updated functions to work with PE 4.7
- removed return type definition (>>) for functions, which is PE 4.8 and above
- removed usage of 'return' function, which is PE 4.8 and above Added testing for Puppet 5.0
Bugfixes
Known Issues
Release 1.0.3
Features
- Moved validation logic to separate functions
- Moved class parameter defaults to Hiera 5 at data/common.yaml
Changed compatibility to Puppet 4.8.0 and higher, as Puppet 4.7.0 and lower do not support specifying the output datatype of a function.
Bugfixes
Known Issues
Release 1.0.2
Features Updated metadata.json to 1.0.2
Bugfixes
Known Issues
Release 1.0.1
Features This release adds support for Windows 2008 R2, which didn't fully work in 1.0.0 due to Powershell 2.0 not supporting the Invoke-WebRequest cmdlet. This is now fixed by using a different command when Invoke-WebRequest is not available.
Testing has now been performed for Windows 2008 R2, 2012, 2012 R2 and 2016.
Bugfixes A bugfix was added to account for the situation where internet connectivity is not working and there is no existing version of the VMware Tools installed.
Known Issues
Release 1.0.0
Features Initial Release of VMware Tools for Windows puppet module.
Bugfixes
Known Issues
Dependencies
- puppetlabs-stdlib (>= 4.19.0 < 8.0.0)