Giter Club home page Giter Club logo

vmtools_win's Introduction

VMware Tools for Windows

Build Status Puppet Forge Puppet Forge Downloads

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 [email protected]

Licensed under the Apache License, Version 2.0.

vmtools_win's People

Stargazers

 avatar

Watchers

 avatar  avatar

vmtools_win's Issues

compare_version.pp - Unable to convert version number to Numeric

Issue

VMWare have done something wonderful with their latest version, as per https://packages.vmware.com/tools/releases/latest/windows/x64 the version number contains a - for some reason.
This is causing the math in compare_version.pp to break.

Error

Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: The value '10-6082533' cannot be converted to Numeric. at /etc/puppetlabs/code/environments/development/modules/vmtools_win/functions/compare_version.pp:36:47 on node SERVVER.DOMAIN

VMtools Compare version.pp issue

Hi,

I am new to puppet and was testing vmtools installation on my pilot environment, I was using this VMtools module quite some time and succesfully able to install/upgrade, however all of sudden i am started seeing the comparision version issue on the module, i downloaded the module 1.1.0 version. Looks like the desired version cannot convert to Numeric, can you help me on this.

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: The value '' cannot be converted to Numeric. (file: /etc/puppetlabs/code/environments/production/modules/vmtools_win/functions/compare_version.pp, line: 40, column: 47)

Remove Windows 2008 R2 support

As of today, 1/14/2020, WS 2008 R2 support has ended. In the next version support should be deprecated and in the next major version, removed. This isn't urgent but could tie in with the next release for #10

Compare_version function fails compilation using simple "include vmtools_win" usage on Windows server 2016

With most basic "include vmtools_win" usage on Windows 2016 server if $facts['vmtools_win_version'] is not defined the init.pp logic still runs this the install_needed function:

if vmtools_win::install_needed($download_from_vmware, $minimum_version_level, $selfprovided_install_version) 

which when interpolated using default hiera values becomes:

if vmtools_win::install_needed(true, 3, 'None')

Somehow the compare_version function is invoked for deployments on windows servers without any previous VMWare tools such that:

$comparison = vmtools_win::compare_version($facts['vmtools_win_version'], $selfprovided_install_version)

is set to:

$comparison = vmtools_win::compare_version(undef, 'None')

Catalog compilation borks when comparison is attempted of the undefined $facts['vmtools_win_version'] to 'None'. When the vmtools_win_version.rb facter script is run there will be nothing listed matching "VMWare Tools" under HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall. :

C:\WINDOWS\system32>puppet agent -t
Notice: Local environment: 'production' doesn't match server specified node environment 'gino', switching agent to 'gino'.
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: The value '' cannot be converted to Numeric. (file: /etc/puppetlabs/code/environments/gino/modules/vmtools_win/functions/compare_version.pp, line: 40, column: 14) on node puppnode-dev-t1.dev
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Support Windows Server 2019

As best I can tell, WS 2019 support is practically the same as WS 2016, and possibly only metadata.json needs updated. However, I do not currently have 2019 available to test with, though my company is looking at using it soon, hence this issue. Please let me know how I can help.

r10k - Forge module copied with bad permissions

Issue:
When using r10k to copy the module from the Forge into Puppet Open Source the module is copied onto the system with only root having access to the files. This prevents the Foreman user from being able to use the files.

Testing:

  • Download vmtools_win module via Forge: Bad Permissions
  • Download vmtools_win module directly from git: Works Fine
  • Download other modules (badgerious-windows_env, martezr-windows_disable_ipv6) via Forge: Works Fine

Misc:
Im pretty green when it comes to Puppet, Foreman, Linux etc. so am entirely stumped by this issue.
But as I can only replicate it with this module and only via Forge I can only assume its an issue with the Forge uploaded copy.

Any further troubleshooting I can do to assist in tracking down the issue let me know.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.