Git Product home page Git Product logo

voxpupuli / puppet-vmwaretools Goto Github PK

View Code? Open in Web Editor NEW
34.0 48.0 44.0 216 KB

Puppet module to manage VMware Operating System Specific Packages for VMware tools installation.

Home Page: http://forge.puppetlabs.com/razorsedge/vmwaretools

License: Apache License 2.0

Ruby 45.21% Puppet 53.98% HTML 0.81%
linux-puppet-module puppet hacktoberfest centos-puppet-module oraclelinux-puppet-module redhat-puppet-module sles-puppet-module ubuntu-puppet-module

puppet-vmwaretools's Introduction

VMware Tools Operating System Specific Packages

Build Status

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with this module
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

This Puppet module manages the installation and configuration of the Operating System Specific Packages for VMware Tools. This allows you to use your operating system's native tools to install and update the VMware Tools.

Module Description

This Puppet module manages the installation and configuration of the Operating System Specific Packages for VMware Tools. OSPs are an alternative to the existing mechanism used to install VMware Tools through the VMware vSphere™ Client. With OSPs you can use the native update mechanisms of your operating system to download, install, and manage VMware Tools. With OSPs you can manage VMware Tools from the virtual machine as you would other standard software. VMware Tools OSPs occupy a smaller amount of disk space than the tar installer used with vSphere Client, which makes package installation or uninstallation fast.

Setup

What this module affects

  • Removes old VMwareTools package or runs vmware-uninstall-tools.pl if found.
  • Installs a VMware package repository (defaults to the 'latest' package repository).
  • Installs the OSP VMware Tools.
  • Starts the vmware-tools service.

Requirements

You need to be running a virtual machine on the VMware platform and on an operating system supported by VMware's OSPs 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 installtion of the tools.

include ::vmwaretools

Upgrading

Deprecation Warning

  • Due to the switch to the dependent puppetlabs-apt version 2.x in version 6.0.0 of this module, Puppet 2.7 will no longer be supported.

  • The parameters yum_server, yum_path, and just_prepend_yum_path will be renamed to be reposerver, repopath, and just_prepend_repopath respectively in version 5.0.0 of this module. Please be aware that your manifests may need to change to account for the new syntax.

This:

class { '::vmwaretools':
  yum_server            => 'http://server.example.lan',
  yum_path              => '/dir/v2.3.0',
  just_prepend_yum_path => true,
}

would become this:

class { '::vmwaretools':
  reposerver            => 'http://server.example.lan',
  repopath              => '/dir/v2.3.0',
  just_prepend_repopath => true,
}

Usage

All interaction with the vmwaretools module can be done through the main vmwaretools class. This means you can simply toggle the options in ::vmwaretools to have full functionality of the module.

To set the version to install, set the following parameter:

class { '::vmwaretools':
  tools_version => '4.0u3',
}

Mirror packages.vmware.com to a local host and point the vmwaretools class at it.

class { '::vmwaretools':
  reposerver            => 'http://server.example.lan',
  repopath              => '/dir/v2.3.0',
  just_prepend_repopath => true,
}

Turn off configuration of the software repository so that some other tool (ie RHN Satellite) or class can take care of it.

class { '::vmwaretools':
  manage_repository => false,
}

Reference

Classes

Public Classes

  • vmwaretools: Installs the VMware Tools Operating System Specific Packages.
  • vmwaretools::ntp: Turns off syncTime via the vmware-tools API and should be accompanied by a running NTP client on the guest.

Private Classes

  • vmwaretools::repo: Installs the VMware Tools software repository.

Class: vmwaretools

Main class, includes all other classes.

Parameters
  • ensure: Ensure if present or absent. Default: present

  • autoupgrade: Upgrade package automatically, if there is a newer version. Default: false

  • package: Name of the package. Only set this if your platform is not supported or you know what you are doing. Default: auto-set, platform specific

  • service_ensure: Ensure if service is running or stopped. Default: running

  • service_name: Name of openvmtools service. Only set this if your platform is not supported or you know what you are doing. Default: auto-set, platform specific

  • service_enable: Start service at boot. Default: true

  • service_hasstatus: Service has status command. Only set this if your platform is not supported or you know what you are doing. Default: auto-set, platform specific

  • service_hasrestart: Service has restart command. Default: true

  • tools_version: The version of VMware Tools to install. Possible values can be found here: http://packages.vmware.com/tools/esx/index.html Default: latest

  • disable_tools_version: Whether to report the version of the tools back to vCenter/ESX. Default: true (ie do not report)

  • manage_repository: Whether to allow the repo to be manged by the module or out of band (ie RHN Satellite). Default: true (ie let the module manage it)

  • reposerver: The server which holds the YUM repository. Customize this if you mirror public YUM repos to your internal network. Default: http://packages.vmware.com

  • repopath: The path on reposerver where the repository can be found. Customize this if you mirror public YUM repos to your internal network. Default: /tools

  • just_prepend_repopath: Whether to prepend the overridden repopath onto the default repopath or completely replace it. Only works if repopath is specified. Default: 0 (false)

  • gpgkey_url: The URL where the public GPG key resides for the repository NOT including the GPG public key file itself (ending with a trailing /). Default: ${reposerver}${repopath}/

  • priority: Give packages in this YUM repository a different weight. Requires yum-plugin-priorities to be installed. Default: 50

  • protect: Protect packages in this YUM repository from being overridden by packages in non-protected repositories. Default: 0 (false)

  • proxy: The URL to the proxy server for this repository. Default: absent

  • proxy_username: The username for the proxy. Default: absent

  • proxy_password: The password for the proxy. Default: absent

  • scsi_timeout: This will adjust the scsi timout value set in udev rules. This file is created by the VMWare Tools installer. Defualt: 180

Class: vmwaretools::ntp

This class handles turning off syncTime via the vmware-tools API and should be accompanied by a running NTP daemon on the guest.

Parameters

None

Limitations

OS Support:

VMware Tools Operating System Specific Packages official supported guest operating systems are available for these operating systems:

  • Community ENTerprise Operating System (CentOS)
    • 4.0 through 6.x
  • Red Hat Enterprise Linux
    • 3.0 through 6.x
  • SUSE Linux Enterprise Server
    • 9 through 11
  • SUSE Linux Enterprise Desktop
    • 10 through 11
  • Ubuntu Linux
    • 8.04 through 12.04

Notes:

  • Only tested on CentOS 5.5+ and CentOS 6.2+ x86_64 with 4.0latest.
  • Not supported on Fedora or Debian as these distros are not supported by the OSP.
  • Not supported on RHEL/CentOS/OEL 7+ or SLES 12 as VMware is recommending open-vm-tools instead. Use razorsedge/openvmtools instead.
  • Supports repo proxy, proxy_username, proxy_password, priorities, yum repo protection, and using a local mirror for the reposerver and repopath.
  • Supports not managing the repo configuration via manage_repository => false.
  • No other VM tools (ie Open Virtual Machine Tools) will be supported.

Issues:

  • Does not install Desktop (X Window) components.
  • Does not handle RHEL5 i386 PAE kernel on OSP 5.0+.

Development

Please see CONTRIBUTING.md for information on how to contribute.

Copyright (C) 2012 Mike Arnold [email protected]

Licensed under the Apache License, Version 2.0.

razorsedge/puppet-vmwaretools on GitHub

razorsedge/vmwaretools on Puppet Forge

puppet-vmwaretools's People

Contributors

acjohnson avatar bastelfreak avatar brandonweeks avatar geoffdavis avatar razorsedge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-vmwaretools's Issues

Fixes needed for STRICT_VARIABLES

The latest version of puppetlabs_spec_helper defaults STRICT_VARIABLES=yes. (I'm not too sure why, but perhaps this will be the default or only setting when puppet 5 is released??)

params.pp references lots of top scope variables with the design being they might have come from an ENC. With strict variables, if they're not set, catalog compilation will fail. The solution is to use getvar from stdlib. See https://blog.yo61.com/test-for-undefined-fact-in-puppet-with-strict_variables/

@razorsedge Is there also a typo here https://github.com/razorsedge/puppet-vmwaretools/blob/6.0.0/manifests/params.pp#L95 ?

File_line[disable-tools-version]: Could not evaluate: can't convert Hash into String

I recently upgraded my stdlib module to puppetlabs-stdlib (v4.16.0) from (v4.6.0). As a consequence, vmwaretools no longer works. I reverted back to 4.6.0 and there is no error.

My guess is that Package[$package_real] seems to be the issue, since that's the only relevant Hash. Note that in the output, Puppet may be choosing not to add the Package to the catalog.

  • CentOS 6
  • Puppet 3.8.7
  • puppetlabs-stdlib (v4.16.0)
  • razorsedge-vmwaretools (v6.0.0)

Usage:

class{ "vmwaretools": ensure => 'absent' }

Error:

Debug: Executing '/bin/rpm -q vmware-tools-esx-nox --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n'
Debug: /Stage[main]/Vmwaretools/Package[vmware-tools-esx-nox]: Nothing to manage: no ensure and the resource doesn't exist
Debug: Executing '/bin/rpm -q vmware-tools-esx-kmods --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n'
Debug: /Stage[main]/Vmwaretools/Package[vmware-tools-esx-kmods]: Nothing to manage: no ensure and the resource doesn't exist
Error: /Stage[main]/Vmwaretools/File_line[disable-tools-version]: Could not evaluate: can't convert Hash into String
Notice: /Stage[main]/Vmwaretools/Service[vmware-tools-services]: Dependency File_line[disable-tools-version] has failures: true
Warning: /Stage[main]/Vmwaretools/Service[vmware-tools-services]: Skipping because of failed dependencies
Debug: Class[Vmwaretools]: The container Stage[main] will propagate my refresh event

I attempted to verify that ensure is set to a value for the Package[$package_real] resource by adding this to init.pp:

notify{"Package ensure is ${package_ensure}":}

And the printout confirms that the value is "absent" and not undef.

autoupgrade requires dependencies to be passed using $package parameter...

I'm attempting to update our VMWare Tools OSP RPMs using autoupgrade => true but have found that I have to list all packages including dependencies like this.

Is this how you intended the autoupgrade to work?

    if ($facts['osfamily'] == 'RedHat') and ($facts['os']['release']['major'] == '5') {
      class { '::vmwaretools':
        manage_repository => false,
        autoupgrade       => true,
        tools_version     => $tools_version,
        scsi_timeout      => $scsi_timeout,
        package           => ['vmware-tools-esx-nox',
                              'vmware-tools-esx-kmods',
                              'kmod-vmware-tools-pvscsi',
                              'kmod-vmware-tools-vmci',
                              'kmod-vmware-tools-vmmemctl',
                              'kmod-vmware-tools-vmxnet',
                              'kmod-vmware-tools-vmxnet3',
                              'kmod-vmware-tools-vsock',
                              'vmware-tools-pvscsi-common',
                              'vmware-tools-vmci-common',
                              'vmware-tools-vmmemctl-common',
                              'vmware-tools-vmxnet-common',
                              'vmware-tools-vmxnet3-common',
                              'vmware-tools-vsock-common']
      }
    }

    if ($facts['osfamily'] == 'RedHat') and ($facts['os']['release']['major'] == '6') {
      class { '::vmwaretools':
        manage_repository => false,
        autoupgrade       => true,
        tools_version     => $tools_version,
        scsi_timeout      => $scsi_timeout,
        package           => ['vmware-tools-esx-nox',
                              'vmware-tools-esx-kmods',
                              'kmod-vmware-tools-vmci',
                              'kmod-vmware-tools-vmxnet',
                              'kmod-vmware-tools-vsock',
                              'vmware-tools-vmci-common',
                              'vmware-tools-vmxnet-common',
                              'vmware-tools-vsock-common']
      }
    }

NTP woes

Hi,

As it stands, it looks like the $vmwaretools::service_pattern selector match may not have up-to-date values. Do you know of any reference to the service name for each version of the tools?

Also, why include the vmwaretools class from inside ntp? This prevents users from declaring the vmwaretools class with the specific parameters they might want to tweak (like autoupgrade). It seems more flexible to remove that include and either make the exec subscribe to the vmwaretools class or make that activity a resource type that we can use in an idempotent fashion.

What do you think?

OEL 5.11, init.pp calls udevadm instead of udevcontrol

The logic in the init.pp causes udevadm (which doesn't exist) to be called instead of udevcontrol on OEL 5.11 because you check for "operatingsystem == 'RedHat'" instead of perhaps a better option of "osfamily == 'RedHat'".

Issues using this with hiera

I cant seem to get this module to play nice with hiera,

I can get it to work via the PE node classifier without any issues but with hiera code it just ignores anything I put in and puts in the default values of vmware as defined in the params

I have tried the following

vmwaretools::repopath: /my/path
vmwaretools::reposerver: http://my.server
vmwaretools::gpgkey_url: my key

and
vmwaretools::repopath: '/my/path'
vmwaretools::reposerver: 'http://my.server'
vmwaretools::gpgkey_url: 'my key'

and
vmwaretools::repopath: "/my/path"
vmwaretools::reposerver: "http://my.server"
vmwaretools::gpgkey_url: "my key"

Could not find init script for 'vmware-tools-services'

on Ubuntu 12.04.5 LTS:

err: /Stage[main]/Vmwaretools/Service[vmware-tools-services]: Could not evaluate: Could not find init script for 'vmware-tools-services'

looks like vmware-tools v5 on 12.04 is now using Upstart.

adding 'provider' => 'upstart' to the service stanza fixes it, but this needs to be implemented properly.

bdwyertech

Not really an issue but a suggestion. I modified this to change disable-tools-version=true to false. This allows the vmware tools to report the version of the tools to vCenter.

I simply integrated this.

sed -i 's/disable-tools-version=true/disable-tools-version=false/g' /etc/vmware-tools/tools.conf

Add support for RHEL 7 and CentOS 7

This is the error I get.

Notice: Scope(Class[Vmwaretools::Params]): Your operating system CentOS is unsupported and will not have the VMware Tools OSP installed.

Downgrading tools does not happen

I want to downgrade from 'latest' to '5.5latest'. This does not seem to happen when I change tools_version => '5.5latest' and autoupgrade => 'false', instead the latest RPM files are still found on the system.

Is it supposed to be possible to downgrade tools version?

reason for downgrading is that we seem to be hitting a bug with latest tools that causes VM's to crash when quiescing filesystem for backup.

Requires update for Puppet 6/7 Support

The requirements for this project are getting stale, and require updating.

At the very least update the supported puppet versions. Also update the stdlib version requirement.

RHEL6 complaints about service startup when using esx 5.0

When running on RHEL6 and esx5.0
...
err: /Stage[main]/Vmwaretools/Service[vmware-tools-services]/ensure: change from stopped to running failed: Could not start Service[vmware-tools-services]: Execution of '/sbin/start vmware-tools-services' returned 1: at /etc/puppetlabs/puppet/modules/vmwaretools/manifests/init.pp:287
...
It is trying to use /sbin/start instead of /sbin/service /vmware-tools-services start

The problem is in the regex, it is using one or more instead of zero or more, the fix is to change + to *:

  $rhel_upstart = $tools_version ? {
    /3\..+/   => false,
    /4\..+/   => false,
   ### /(5.0).+/ => false,
    /(5.0).*/ => false,
    default   => true,
  }

RHEL/CENT 7

Is it possible to add rhel7/centos7 support?

Get rid of the warning

Hi

Is there a clean way to get rid of those warning ?

[root@ppbgows01 ~]# puppet apply --environment preproduction /etc/puppetlabs/code/environments/preproduction/manifests/
Warning: Unknown variable: '::vmwaretools_reposerver'. at /etc/puppetlabs/code/environments/preproduction/modules/vmwaretools/manifests/params.pp:21:17
Warning: Unknown variable: '::vmwaretools_repopath'. at /etc/puppetlabs/code/environments/preproduction/modules/vmwaretools/manifests/params.pp:26:15
Warning: Unknown variable: '::vmwaretools_repopriority'. at /etc/puppetlabs/code/environments/preproduction/modules/vmwaretools/manifests/params.pp:31:19
Warning: Unknown variable: '::vmwaretools_repoprotect'. at /etc/puppetlabs/code/environments/preproduction/modules/vmwaretools/manifests/params.pp:36:18
Warning: Unknown variable: '::vmwaretools_gpgkey_url'. at /etc/puppetlabs/code/environments/preproduction/modules/vmwaretools/manifests/params.pp:41:17
Warning: Unknown variable: '::vmwaretools_proxy'. at /etc/puppetlabs/code/environments/preproduction/modules/vmwaretools/manifests/params.pp:46:12
Warning: Unknown variable: '::vmwaretools_proxy_username'. at /etc/puppetlabs/code/environments/preproduction/modules/vmwaretools/manifests/params.pp:51:21
Warning: Unknown variable: '::vmwaretools_proxy_password'. at /etc/puppetlabs/code/environments/preproduction/modules/vmwaretools/manifests/params.pp:56:21
Warning: Unknown variable: '::vmwaretools_tools_version'. at /etc/puppetlabs/code/environments/preproduction/modules/vmwaretools/manifests/params.pp:61:20
Warning: Unknown variable: '::vmwaretools_ensure'. at /etc/puppetlabs/code/environments/preproduction/modules/vmwaretools/manifests/params.pp:68:13
Warning: Unknown variable: '::vmwaretools_package'. at /etc/puppetlabs/code/environments/preproduction/modules/vmwaretools/manifests/params.pp:73:14

Regards,

puppet-vmwaretools creates blank file at /etc/yum.repos.d/vmware-tools.repo, and everything afterwards fails

I just installed and used this module for the first time. However, it fails immediately after Puppet modifies /etc/yum.repos.d/vmware-tools.repo for the first time.

We're using Puppet OSS 3.8 on Scientific Linux release 6.6 (A clone of RHEL/CentOS 6).

My class calls this module with a very basic include:

include ::vmwaretools

However, in the end, this module creates a blank file for the VMware Tools repository, and thus every command afterwards fails:

[root@dev1 ~]# ll /etc/yum.repos.d/vmware*
-rw-r--r-- 1 root root 317 Aug  3 10:51 /etc/yum.repos.d/vmware.repo
-rw-r--r-- 1 root root   0 Aug  3 10:51 /etc/yum.repos.d/vmware-tools.repo
[root@dev1 ~]# 

The command fails immediately after Notice: /Stage[main]/Vmwaretools::Repo/Yumrepo[vmware-tools]/protect: defined 'protect' as '0'.

Here's a log showing the command execution:

[root@dev1 ~]# puppet agent --test
Info: Retrieving pluginfacts
Info: Retrieving plugin
Notice: /File[/var/lib/puppet/lib/facter/vmware.rb]/ensure: defined content as '{md5}fdf0c987ebc1d390d4e2da3d914469a3'
Notice: /File[/var/lib/puppet/lib/puppet/type/zypprepo.rb]/ensure: defined content as '{md5}81f249c4403b0bc1228896da6041eabc'
Info: Loading facts
Info: Loading facts
Info: Caching catalog for dev1.example.org
Info: Applying configuration version '1470246658'
admin'
Notice: /Stage[main]/Vmwaretools::Repo/Yumrepo[vmware-tools]/descr: descr changed 'VMware Tools for Red Hat Enterprise Linux $releasever - $basearch' to 'VMw
are Tools latest - rhel6 x86_64'
Notice: /Stage[main]/Vmwaretools::Repo/Yumrepo[vmware-tools]/baseurl: baseurl changed 'http://packages.vmware.com/tools/esx/latest/rhel6/$basearch' to 'http:
//packages.vmware.com/tools/esx/latest/rhel6/x86_64/'
Notice: /Stage[main]/Vmwaretools::Repo/Yumrepo[vmware-tools]/gpgkey: gpgkey changed 'http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub'
to 'http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub
    http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub'
Notice: /Stage[main]/Vmwaretools::Repo/Yumrepo[vmware-tools]/protect: defined 'protect' as '0'
Notice: /Stage[main]/Vmwaretools::Repo/Yumrepo[vmware-tools]/priority: defined 'priority' as '50'
Notice: /Stage[main]/Vmwaretools::Repo/File[/etc/yum.repos.d/vmware-tools.repo]/ensure: created

Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install vmware-tools-esx-kmods' returned 1: Error Downloading Packages:
  vmware-tools-esx-kmods-9.0.17-1.el6.x86_64: failure: vmware-tools-esx-kmods-9.0.17-1.el6.x86_64.rpm from vmware-tools: [Errno 256] No more mirrors to try.
  vmware-tools-vmxnet-common-9.0.17-5.el6.x86_64: failure: vmware-tools-vmxnet-common-9.0.17-5.el6.x86_64.rpm from vmware-tools: [Errno 256] No more mirrors to try.
  kmod-vmware-tools-vmxnet-2.0.14.0-2.6.32.71.el6.x86_64.5.el6.x86_64: failure: kmod-vmware-tools-vmxnet-2.0.14.0-2.6.32.71.el6.x86_64.5.el6.x86_64.rpm from vmware-tools: [Errno 256] No more mirrors to try.
  vmware-tools-vmci-common-9.0.17-5.el6.x86_64: failure: vmware-tools-vmci-common-9.0.17-5.el6.x86_64.rpm from vmware-tools: [Errno 256] No more mirrors to try.
  kmod-vmware-tools-vsock-9.3.4.0-2.6.32.71.el6.x86_64.5.el6.x86_64: failure: kmod-vmware-tools-vsock-9.3.4.0-2.6.32.71.el6.x86_64.5.el6.x86_64.rpm from vmware-tools: [Errno 256] No more mirrors to try.
  vmware-tools-vsock-common-9.0.17-5.el6.x86_64: failure: vmware-tools-vsock-common-9.0.17-5.el6.x86_64.rpm from vmware-tools: [Errno 256] No more mirrors to try.
  kmod-vmware-tools-vmci-9.3.20.0-2.6.32.71.el6.x86_64.5.el6.x86_64: failure: kmod-vmware-tools-vmci-9.3.20.0-2.6.32.71.el6.x86_64.5.el6.x86_64.rpm from vmware-tools: [Errno 256] No more mirrors to try.
Error: /Stage[main]/Vmwaretools/Package[vmware-tools-esx-kmods]/ensure: change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install vmware-tools-esx-kmods' returned 1: Error Downloading Packages:
  vmware-tools-esx-kmods-9.0.17-1.el6.x86_64: failure: vmware-tools-esx-kmods-9.0.17-1.el6.x86_64.rpm from vmware-tools: [Errno 256] No more mirrors to try.
  vmware-tools-vmxnet-common-9.0.17-5.el6.x86_64: failure: vmware-tools-vmxnet-common-9.0.17-5.el6.x86_64.rpm from vmware-tools: [Errno 256] No more mirrors to try.
  kmod-vmware-tools-vmxnet-2.0.14.0-2.6.32.71.el6.x86_64.5.el6.x86_64: failure: kmod-vmware-tools-vmxnet-2.0.14.0-2.6.32.71.el6.x86_64.5.el6.x86_64.rpm from vmware-tools: [Errno 256] No more mirrors to try.
  vmware-tools-vmci-common-9.0.17-5.el6.x86_64: failure: vmware-tools-vmci-common-9.0.17-5.el6.x86_64.rpm from vmware-tools: [Errno 256] No more mirrors to try.
  kmod-vmware-tools-vsock-9.3.4.0-2.6.32.71.el6.x86_64.5.el6.x86_64: failure: kmod-vmware-tools-vsock-9.3.4.0-2.6.32.71.el6.x86_64.5.el6.x86_64.rpm from vmware-tools: [Errno 256] No more mirrors to try.
  vmware-tools-vsock-common-9.0.17-5.el6.x86_64: failure: vmware-tools-vsock-common-9.0.17-5.el6.x86_64.rpm from vmware-tools: [Errno 256] No more mirrors to try.
  kmod-vmware-tools-vmci-9.3.20.0-2.6.32.71.el6.x86_64.5.el6.x86_64: failure: kmod-vmware-tools-vmci-9.3.20.0-2.6.32.71.el6.x86_64.5.el6.x86_64.rpm from vmware-tools: [Errno 256] No more mirrors to try.
Notice: /Stage[main]/Vmwaretools/File_line[disable-tools-version]: Dependency Package[vmware-tools-esx-kmods] has failures: true
Warning: /Stage[main]/Vmwaretools/File_line[disable-tools-version]: Skipping because of failed dependencies
Notice: /Stage[main]/Vmwaretools/Service[vmware-tools-services]: Dependency Package[vmware-tools-esx-kmods] has failures: true
Warning: /Stage[main]/Vmwaretools/Service[vmware-tools-services]: Skipping because of failed dependencies
Notice: /Stage[main]/Vmwaretools/File[/etc/udev/rules.d/99-vmware-scsi-udev.rules]: Dependency Package[vmware-tools-esx-kmods] has failures: true
Warning: /Stage[main]/Vmwaretools/File[/etc/udev/rules.d/99-vmware-scsi-udev.rules]: Skipping because of failed dependencies
Notice: /Stage[main]/Vmwaretools/Exec[udevrefresh]: Dependency Package[vmware-tools-esx-kmods] has failures: true
Warning: /Stage[main]/Vmwaretools/Exec[udevrefresh]: Skipping because of failed dependencies
Notice: Finished catalog run in 69.06 seconds
[root@dev1 ~]#

rhel_upstart incorrectly set by tools_version "5.5p02"

With tools_version set to "5.5p02", the regex on line https://github.com/razorsedge/puppet-vmwaretools/blob/master/manifests/init.pp#L192 that is intended to match tools version 5.0 will match "5p0" and incorrectly set rhel_upstart to false. This could be fixed by either escaping the period in 5.0 (so it matches the period character) or by prefixing the regex with the ^ character such that the match can only happen at the beginning of the string. Lost a few hairs to this one before I realized what was happening!

ntp needs disable

This should be set to ensure time sync is enabled when vmwaretools::ntp isn't enabled. Currently it does not.

Service error on Ubuntu 14.04

I receive this error every time I run "puppet agent --test" and the open-vm-tools service is running already.

Error: Could not start Service[open-vm-tools]: Execution of '/etc/init.d/open-vm-tools start' returned 1: * Starting open-vm daemon vmtoolsd
Error: /Stage[main]/Openvmtools/Service[open-vm-tools]/ensure: change from stopped to running failed: Could not start Service[open-vm-tools]: Execution of '/etc/init.d/open-vm-tools start' returned 1: * Starting open-vm daemon vmtoolsd

vmware source having issues again?

Err http://packages.vmware.com precise/main amd64 Packages
Undetermined Error
Err http://packages.vmware.com precise/main i386 Packages
Undetermined Error
Ign http://packages.vmware.com precise/main Translation-en_US
Ign http://packages.vmware.com precise/main Translation-en
Fetched 5,116 kB in 18min 3s (4,724 B/s)
W: Failed to fetch http://packages.vmware.com/tools/esx/5.5latest/ubuntu/dists/precise/main/binary-amd64/Packages Undetermined Error

W: Failed to fetch http://packages.vmware.com/tools/esx/5.5latest/ubuntu/dists/precise/main/binary-i386/Packages Undetermined Error

SLES Support

Hi there,

I would like to extend the code for some SLES specific stuff, as we use a lot of SLES server VMs.

As on SLES there is "zypper" as the default and only supported tool, I would like to extend the code to use the zypprepo type created by Darin (https://forge.puppetlabs.com/darin/zypprepo), which was not included into core puppet but published as a module (see Feature #11864 http://projects.puppetlabs.com/issues/11864).
Of course this adds a dependency to this module, but it would be really nice to have a real zypper repo.

Kind regards, Poikilotherm

vmware-tools-services is removed from 5.1-latest

The update for 9th of september removed /etc/init.d/vmware-tools-services which makes the module fail the service test.

They seem to have moved the init script to /etc/vmware-tools/init/vmware-tools-services for reasons way beyond me.

5.0latest tree for rhel5 & rhel6 yanked by vmware

On my CentOS 5 system (Puppet Learning VM), using the following declaration:

class { 'vmwaretools':
autoupgrade => true,
}
include vmwaretools::ntp

The following repository is generated:

[vmware-tools]
name=VMware Tools 5.0latest - rhel5 i686
baseurl=http://packages.vmware.com/tools/esx/5.0latest/rhel5/i686/
enabled=1
gpgcheck=1
gpgkey=http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub
http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub
protect=0
priority=50

The problem is, VMWare has killed the links for rhel5 & rhel6 in the *latest tree, suggesting the use of direct releases until they've fixed an upgrade issue. See http://packages.vmware.com/tools/esx/5.0latest/rhel5 for example.

I guess the question is, should one wait it out or should the module change to use absolute releases instead of *latest?

RHEL6: Execution of '/sbin/start vmware-tools-services' returned 1

Running RHEL 6.7 on ESXi 6.0, using this module in version 5.0.1 throws the following error:

change from stopped to running failed: Could not start Service[vmware-tools-services]: Execution of '/sbin/start vmware-tools-services' returned 1: at /etc/puppet/environments/production/modules/vmwaretools/manifests/init.pp:324

The VM is deployed and managed by Foreman 1.8.4

Module always thinks vmware-tools service service is stopped

Every time I run puppet agent --test I get a meesage Service[vmware-tools]/ensure: ensure changed 'stopped' to 'running'. It appears that at least on SL 6.2 the vmware--guestd deamon is not run. I solved this locally by changing the service pattern to "vmtoolsd".

RHEL/Centos 7 Support

Do you have plans to add support for RHEL/Centos 7?

I might be interested in providing a PR in the near future if you'd be willing to accept such an addition

Apt dependency Update

Current release of apt is 4.1.0 and dependency is locked to < 3.0.0
Please update to 5.0.0

Rpm install fails

The vmware-uninstall-tools.pl script (at least in the version we were running) leaves behind the directory /usr/lib/vmware-tools. This causes the rpm install of vmware-tools to fail. This directory needs to be removed before attempting to install the vmware-tools package. For our installation, I modified the vmware-unistall-tools exec command as follows to resolve the issue:

command => '/usr/bin/vmware-uninstall-tools.pl ; /bin/rm -rf /usr/lib/vmware-tools',

This is the error message returned by puppet:

Error unpacking rpm package vmware-open-vm-tools-common-8.3.12-559003.el5.x86_64
error: unpacking of archive failed on file /usr/lib/vmware-tools/lib64: cpio: rename failed - Is a directory
at /etc/puppet/modules/vmwaretools/manifests/init.pp:89

vmwaretools v4.4.1 fails to compute "majdistrelease" if "manage_repository" is false

vmwaretools v4.4.1 fails to start the vmware tools service on RHEL6 if "manage_repository" is false because it does not compute "majdistrelease"

naive patch below:

--- modules/vmwaretools/manifests/init.pp
+++ modules/vmwaretools/manifests/init.pp
@@ -220,23 +220,23 @@
       $yum_basearch = $tools_version ? {
         /3\..+/ => $vmwaretools::params::yum_basearch_4x,
         /4\..+/ => $vmwaretools::params::yum_basearch_4x,
         default => $vmwaretools::params::yum_basearch_5x,
       }
+
+      $majdistrelease = $::lsbmajdistrelease ? {
+            ''      => regsubst($::operatingsystemrelease,'^(\d+)\.(\d+)','\1'),
+            default => $::lsbmajdistrelease,
+      }

       if $manage_repository {
         # We use $::operatingsystem and not $::osfamily because certain things
         # (like Fedora) need to be excluded.
         case $::operatingsystem {
           'RedHat', 'CentOS', 'Scientific', 'SLC', 'Ascendos', 'PSBM',
           'OracleLinux', 'OVS', 'OEL', 'SLES', 'SLED', 'OpenSuSE',
           'SuSE': {
-            $majdistrelease = $::lsbmajdistrelease ? {
-              ''      => regsubst($::operatingsystemrelease,'^(\d+)\.(\d+)','\1'),
-              default => $::lsbmajdistrelease,
-            }
-
             if ( $yum_path == $vmwaretools::params::yum_path ) or ( $just_prepend_yum_path == true ) {
               $gpgkey_url  = "${yum_server}${yum_path}/keys/"
               $baseurl_url = "${yum_server}${yum_path}/esx/${tools_version}/${vmwaretools::params::baseurl_string}${majdistrelease}/${yum_basearch}/"
             } else {
               $gpgkey_url  = "${yum_server}${yum_path}/"

Handle CentOS / RHEL 7 gracefully

Currently VMware haven't released a repo for RHEL 7 - http://packages.vmware.com/tools/esx/latest/index.html

This module either needs to take no action on RHEL 7, or it needs to set up the RHEL 6 repo and hope for the best.

Currently it sets up a repo with the URL set for RHEL 7 and breaks the yum configuration on the box.

[root@centos7 ~]# yum update
Loaded plugins: fastestmirror, langpacks
http://packages.vmware.com/tools/esx/latest/rhel7/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found

Support satellite repo

If the packages are already synchronized by a satellite server to a custom channel, the module should not manage the yum repo.

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.