puppet-vmwaretools icon indicating copy to clipboard operation
puppet-vmwaretools copied to clipboard

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

Open ghost opened this issue 10 years ago • 21 comments

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

ghost avatar Oct 06 '15 06:10 ghost

I was having the same issue. I changed lines 319-322 in vmwaretools\manifests\init.pp from:

            start      => "/sbin/start ${service_name_real}",
            stop       => "/sbin/stop ${service_name_real}",
            status     => "/sbin/status ${service_name_real} | grep -q 'start/'",
            restart    => "/sbin/restart ${service_name_real}",

to:

            start      => "service ${service_name_real} start",
            stop       => "service ${service_name_real} stop",
            status     => "service ${service_name_real} status",
            restart    => "service ${service_name_real} restart",

It now works properly.

crapnicki avatar Oct 06 '15 20:10 crapnicki

Thank you for your advice. It now works like a charm.

ghost avatar Oct 07 '15 04:10 ghost

+1

aholen avatar Oct 27 '15 11:10 aholen

I am having trouble replicating this on my test system. I am running CentOS 6.6 x86_64 in VMware Player 6.0.6 using razorsedge/vmwaretools module version 5.1.0 against 5.0, 5.1, 5.5, 6.0, and latest versions of the vmwaretools repository. All give the desired effect of using SysV init with 5.0 tools and Upstart with 5.1 and newer tools.

razorsedge avatar Feb 02 '16 06:02 razorsedge

My system is a CentOS 6.7 x86_64 minimal server, upgraded from the 6.5 minimal ISO, running on ESXi 6.0. It is running Foreman 1.9.3, I believe. We are actually migrating to a new infrastructure at work right now, so I don't even have my VM reconfigured/upgraded it yet. I can power it on and give you any additional information you need.

crapnicki avatar Feb 02 '16 07:02 crapnicki

@crapnicki : What razorsedge/vmwaretools module version and what parameters are you passing to that module? Output of "rpm -qa|grep vmware|sort" will be helpful.

razorsedge avatar Feb 03 '16 06:02 razorsedge

@razorsedge From the CHANGELOG file, I'm running 5.0.1.

Relevant info from the site.pp file:

class { '::vmwaretools':
    tools_version       =>  'latest',
    ensure          =>  'preset',
    service_ensure      =>  running,
    service_enable      =>  true,
    autoupgrade     =>  true,
    disable_tools_version   =>  false,
    proxy           =>  'http://a.b.c.d:1234'
}

rpm -qa|grep vmware|sort
kmod-vmware-tools-vmci-9.8.1.0-2.6.32.71.el6.x86_64.5.el6.x86_64
kmod-vmware-tools-vmxnet-2.1.0.0-2.6.32.71.el6.x86_64.5.el6.x86_64
kmod-vmware-tools-vsock-9.8.1.0-2.6.32.71.el6.x86_64.5.el6.x86_64
vmware-tools-core-10.0.0-1.el6.x86_64
vmware-tools-esx-kmods-10.0.0-1.el6.x86_64
vmware-tools-esx-nox-10.0.0-1.el6.x86_64
vmware-tools-foundation-10.0.0-1.el6.x86_64
vmware-tools-guestlib-10.0.0-1.el6.x86_64
vmware-tools-libraries-nox-10.0.0-1.el6.x86_64
vmware-tools-plugins-autoUpgrade-10.0.0-1.el6.x86_64
vmware-tools-plugins-deployPkg-10.0.0-1.el6.x86_64
vmware-tools-plugins-grabbitmqProxy-10.0.0-1.el6.x86_64
vmware-tools-plugins-guestInfo-10.0.0-1.el6.x86_64
vmware-tools-plugins-hgfsServer-10.0.0-1.el6.x86_64
vmware-tools-plugins-powerOps-10.0.0-1.el6.x86_64
vmware-tools-plugins-timeSync-10.0.0-1.el6.x86_64
vmware-tools-plugins-vix-10.0.0-1.el6.x86_64
vmware-tools-plugins-vmbackup-10.0.0-1.el6.x86_64
vmware-tools-services-10.0.0-1.el6.x86_64
vmware-tools-vgauth-10.0.0-1.el6.x86_64
vmware-tools-vmci-common-10.0.0-5.el6.x86_64
vmware-tools-vmxnet-common-10.0.0-5.el6.x86_64
vmware-tools-vsock-common-10.0.0-5.el6.x86_64

crapnicki avatar Feb 05 '16 15:02 crapnicki

Sorry for the delayed response. Life keeps interfering with code.

I have tried upgrading to CentOS 6.7 and tested with Puppet 2.7.26 and Puppet-agent 1.2.2. I am unable to reproduce the error with Service[vmware-tools-services]. I am starting to wonder if this is specific to ESXi 6.0 or if deployment via the Foreman has an effect.

razorsedge avatar Mar 09 '16 06:03 razorsedge

Life happens. :)

Might want to see if one of the others that were having this issue will respond with their infrastructure to see if there is a common denominator.

crapnicki avatar Mar 10 '16 00:03 crapnicki

The only other thing I can think of is whether the output of "ls -l /etc/init*/vmware*" can tell us anything.

razorsedge avatar Mar 10 '16 05:03 razorsedge

Hi, upgrading from 5.0.1 to 6.0.0 fixed the issue for me on the following system. No changes on this system other than the upgrade from 5.0.1 to 6.0.0.

CentOS 6.6 x86_64 (CentOS 6.7 also works) Not using foreman, but r10k/hiera-setup. vSphere Client reports VMware Tools: "Running (Current)"

puppet-code from base profile: (using defaults only) include vmwaretools

puppet --version
3.8.4
rpm -qa|grep vmware|sort
kmod-vmware-tools-vmci-9.7.1.0-2.6.32.71.el6.x86_64.5.el6.x86_64
kmod-vmware-tools-vmxnet-2.1.0.0-2.6.32.71.el6.x86_64.5.el6.x86_64
kmod-vmware-tools-vsock-9.7.2.0-2.6.32.71.el6.x86_64.5.el6.x86_64
vmware-tools-core-9.10.5-1.el6.x86_64
vmware-tools-esx-kmods-9.10.5-1.el6.x86_64
vmware-tools-esx-nox-9.10.5-1.el6.x86_64
vmware-tools-foundation-9.10.5-1.el6.x86_64
vmware-tools-guestlib-9.10.5-1.el6.x86_64
vmware-tools-libraries-nox-9.10.5-1.el6.x86_64
vmware-tools-plugins-autoUpgrade-9.10.5-1.el6.x86_64
vmware-tools-plugins-deployPkg-9.10.5-1.el6.x86_64
vmware-tools-plugins-grabbitmqProxy-9.10.5-1.el6.x86_64
vmware-tools-plugins-guestInfo-9.10.5-1.el6.x86_64
vmware-tools-plugins-hgfsServer-9.10.5-1.el6.x86_64
vmware-tools-plugins-powerOps-9.10.5-1.el6.x86_64
vmware-tools-plugins-timeSync-9.10.5-1.el6.x86_64
vmware-tools-plugins-vix-9.10.5-1.el6.x86_64
vmware-tools-plugins-vmbackup-9.10.5-1.el6.x86_64
vmware-tools-services-9.10.5-1.el6.x86_64
vmware-tools-vgauth-9.10.5-1.el6.x86_64
vmware-tools-vmci-common-9.10.5-5.el6.x86_64
vmware-tools-vmxnet-common-9.10.5-5.el6.x86_64
vmware-tools-vsock-common-9.10.5-5.el6.x86_64
ls -l /etc/init*/vmware*
-rw-r--r--. 1 root root 390 Aug 13  2015 /etc/init/vmware-tools-services.conf
-rw-r--r--. 1 root root 332 Aug 13  2015 /etc/init/vmware-tools-vgauth.conf

aholen avatar Mar 10 '16 10:03 aholen

@aholen And before the upgrade, you were getting the change from stopped to running failed... error on each Pupet run?

razorsedge avatar Mar 11 '16 05:03 razorsedge

@razorsedge That's correct - but the picture doesn't seem so simple as in my previous post. I have a another system that failed, despite new module version:

before update: CentOS 6.6 x86_64

rpm -qa|grep vmware|sort

kmod-vmware-tools-vmci-9.0.4.0-2.6.32.71.el6.x86_64.4.el6.x86_64
kmod-vmware-tools-vmxnet-2.0.9.3-2.6.32.71.el6.x86_64.4.el6.x86_64
kmod-vmware-tools-vsock-1.0.0.0-2.6.32.71.el6.x86_64.4.el6.x86_64
vmware-tools-core-8.6.16-1.el6.x86_64
vmware-tools-esx-kmods-8.6.16-1.el6.x86_64
vmware-tools-esx-nox-8.6.16-1.el6.x86_64
vmware-tools-foundation-8.6.16-1.el6.x86_64
vmware-tools-guestlib-8.6.16-1.el6.x86_64
vmware-tools-help-8.6.16-1.el6.x86_64
vmware-tools-libraries-nox-8.6.16-1.el6.x86_64
vmware-tools-plugins-autoUpgrade-8.6.16-1.el6.x86_64
vmware-tools-plugins-deployPkg-8.6.16-1.el6.x86_64
vmware-tools-plugins-guestInfo-8.6.16-1.el6.x86_64
vmware-tools-plugins-hgfsServer-8.6.16-1.el6.x86_64
vmware-tools-plugins-powerOps-8.6.16-1.el6.x86_64
vmware-tools-plugins-timeSync-8.6.16-1.el6.x86_64
vmware-tools-plugins-vix-8.6.16-1.el6.x86_64
vmware-tools-plugins-vmbackup-8.6.16-1.el6.x86_64
vmware-tools-services-8.6.16-1.el6.x86_64
vmware-tools-vmci-common-8.6.16-4.el6.x86_64
vmware-tools-vmxnet-common-8.6.16-4.el6.x86_64
vmware-tools-vsock-common-8.6.16-4.el6.x86_64

puppet agent -t:

Error: Could not start Service[vmware-tools-services]: Execution of '/sbin/start vmware-tools-services' returned 1: start: Unknown job: vmware-tools-services
Error: /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: start: Unknown job: vmware-tools-services

after update of all vmware-packages it started working: yum update *vmware* -y

rpm -qa|grep vmware|sort
kmod-vmware-tools-vmci-9.8.1.0-2.6.32.71.el6.x86_64.5.el6.x86_64
kmod-vmware-tools-vmxnet-2.1.0.0-2.6.32.71.el6.x86_64.5.el6.x86_64
kmod-vmware-tools-vsock-9.8.1.0-2.6.32.71.el6.x86_64.5.el6.x86_64
vmware-tools-core-10.0.0-1.el6.x86_64
vmware-tools-esx-kmods-10.0.0-1.el6.x86_64
vmware-tools-esx-nox-10.0.0-1.el6.x86_64
vmware-tools-foundation-10.0.0-1.el6.x86_64
vmware-tools-guestlib-10.0.0-1.el6.x86_64
vmware-tools-libraries-nox-10.0.0-1.el6.x86_64
vmware-tools-plugins-autoUpgrade-10.0.0-1.el6.x86_64
vmware-tools-plugins-deployPkg-10.0.0-1.el6.x86_64
vmware-tools-plugins-grabbitmqProxy-10.0.0-1.el6.x86_64
vmware-tools-plugins-guestInfo-10.0.0-1.el6.x86_64
vmware-tools-plugins-hgfsServer-10.0.0-1.el6.x86_64
vmware-tools-plugins-powerOps-10.0.0-1.el6.x86_64
vmware-tools-plugins-timeSync-10.0.0-1.el6.x86_64
vmware-tools-plugins-vix-10.0.0-1.el6.x86_64
vmware-tools-plugins-vmbackup-10.0.0-1.el6.x86_64
vmware-tools-services-10.0.0-1.el6.x86_64
vmware-tools-vgauth-10.0.0-1.el6.x86_64
vmware-tools-vmci-common-10.0.0-5.el6.x86_64
vmware-tools-vmxnet-common-10.0.0-5.el6.x86_64
vmware-tools-vsock-common-10.0.0-5.el6.x86_64

After the update the puppet agent ran successfully (didn't have to reboot). The vSphere client reports: "Running (3rd-party/Independent)

cat /etc/yum.repos.d/vmware-tools.repo
[vmware-tools]
protect=0
name=VMware Tools latest - rhel6 x86_64
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
enabled=1
baseurl=http://packages.vmware.com/tools/esx/latest/rhel6/x86_64/
gpgcheck=1
priority=50
ps aux | grep vmware
root      1082  0.0  0.0  53088   908 ?        S    15:54   0:00 /usr/lib/vmware-vgauth/VGAuthService -s

aholen avatar Mar 11 '16 15:03 aholen

@razorsedge One a third system:

rpm -qa|grep vmware|sort
kmod-vmware-tools-vmci-9.0.4.0-2.6.32.71.el6.x86_64.4.el6.x86_64
kmod-vmware-tools-vmxnet-2.0.9.3-2.6.32.71.el6.x86_64.4.el6.x86_64
kmod-vmware-tools-vsock-1.0.0.0-2.6.32.71.el6.x86_64.4.el6.x86_64
vmware-tools-core-8.6.16-1.el6.x86_64
vmware-tools-esx-kmods-8.6.16-1.el6.x86_64
vmware-tools-esx-nox-8.6.16-1.el6.x86_64
vmware-tools-foundation-8.6.16-1.el6.x86_64
vmware-tools-guestlib-8.6.16-1.el6.x86_64
vmware-tools-help-8.6.16-1.el6.x86_64
vmware-tools-libraries-nox-8.6.16-1.el6.x86_64
vmware-tools-plugins-autoUpgrade-8.6.16-1.el6.x86_64
vmware-tools-plugins-deployPkg-8.6.16-1.el6.x86_64
vmware-tools-plugins-guestInfo-8.6.16-1.el6.x86_64
vmware-tools-plugins-hgfsServer-8.6.16-1.el6.x86_64
vmware-tools-plugins-powerOps-8.6.16-1.el6.x86_64
vmware-tools-plugins-timeSync-8.6.16-1.el6.x86_64
vmware-tools-plugins-vix-8.6.16-1.el6.x86_64
vmware-tools-plugins-vmbackup-8.6.16-1.el6.x86_64
vmware-tools-services-8.6.16-1.el6.x86_64
vmware-tools-vmci-common-8.6.16-4.el6.x86_64
vmware-tools-vmxnet-common-8.6.16-4.el6.x86_64
vmware-tools-vsock-common-8.6.16-4.el6.x86_64
xorg-x11-drv-vmware-13.0.1-9.el6.x86_64

yum update vmware-tools-services -y

rpm -qa|grep vmware|sort
kmod-vmware-tools-vmci-9.0.4.0-2.6.32.71.el6.x86_64.4.el6.x86_64
kmod-vmware-tools-vmxnet-2.0.9.3-2.6.32.71.el6.x86_64.4.el6.x86_64
kmod-vmware-tools-vsock-1.0.0.0-2.6.32.71.el6.x86_64.4.el6.x86_64
vmware-tools-core-10.0.0-1.el6.x86_64
vmware-tools-esx-kmods-8.6.16-1.el6.x86_64
vmware-tools-esx-nox-10.0.0-1.el6.x86_64
vmware-tools-foundation-10.0.0-1.el6.x86_64
vmware-tools-guestlib-10.0.0-1.el6.x86_64
vmware-tools-libraries-nox-10.0.0-1.el6.x86_64
vmware-tools-plugins-autoUpgrade-10.0.0-1.el6.x86_64
vmware-tools-plugins-deployPkg-10.0.0-1.el6.x86_64
vmware-tools-plugins-grabbitmqProxy-10.0.0-1.el6.x86_64
vmware-tools-plugins-guestInfo-10.0.0-1.el6.x86_64
vmware-tools-plugins-hgfsServer-10.0.0-1.el6.x86_64
vmware-tools-plugins-powerOps-10.0.0-1.el6.x86_64
vmware-tools-plugins-timeSync-10.0.0-1.el6.x86_64
vmware-tools-plugins-vix-10.0.0-1.el6.x86_64
vmware-tools-plugins-vmbackup-10.0.0-1.el6.x86_64
vmware-tools-services-10.0.0-1.el6.x86_64
vmware-tools-vgauth-10.0.0-1.el6.x86_64
vmware-tools-vmci-common-8.6.16-4.el6.x86_64
vmware-tools-vmxnet-common-8.6.16-4.el6.x86_64
vmware-tools-vsock-common-8.6.16-4.el6.x86_64
xorg-x11-drv-vmware-13.0.1-9.el6.x86_64

Puppet agent now runs fine.

Whole update-process: http://pastebin.com/nd7ahSxy

Looks like a combination of yum update vmware-tools-services and using module version 6.0.0 is the fix.

aholen avatar Mar 11 '16 15:03 aholen

OK. I am starting to see the problem more clearly.

razorsedge/vmwaretools (and I, since Foreman was mentioned) assumes a new install and determines whether to use upstart based on the URL in the YUM repository. In the case of this issue, Tools are already installed and are of a version (vmware-tools-esx-nox < 9.0.0) that still uses SysV Init and autoupgrade => true is not set in razorsedge/vmwaretools. Thus the error.

razorsedge avatar Mar 11 '16 16:03 razorsedge

Can anyone confirm whether I am off my rocker here?

razorsedge avatar Mar 15 '16 06:03 razorsedge

Fresh RHEL 6.8 install:

I was having the same issue. I changed lines 319-322 in vmwaretools\manifests\init.pp from:

        start      => "/sbin/start ${service_name_real}",
        stop       => "/sbin/stop ${service_name_real}",
        status     => "/sbin/status ${service_name_real} | grep -q 'start/'",
        restart    => "/sbin/restart ${service_name_real}",

to:

        start      => "service ${service_name_real} start",
        stop       => "service ${service_name_real} stop",
        status     => "service ${service_name_real} status",
        restart    => "service ${service_name_real} restart",

It now works properly.

esarakaitis avatar Jul 08 '16 14:07 esarakaitis

I'm having the same problem on a fresh install as well.

@razorsedge this is because VMware in the latest versions have reverted back to using /etc/init.d/vmware-tools-services rather than an upstart init script :( Not sure exactly how you're gonna fix this, but...right now your module is broken on RHEL6.

divad avatar Jul 19 '16 14:07 divad

Oh, actually @razorsedge the problem is caused by this bug https://github.com/razorsedge/puppet-vmwaretools/issues/49

Its because the URL is now installing an /old/ package version (8.7) rather than 10.x...

divad avatar Jul 19 '16 14:07 divad

It looks like VMware has changed the URL of their packages for the latest VMware Tools: https://packages.vmware.com/tools/releases/latest/rhel6/x86_64/index.html for RHEL 6 for example.

claytonpeters avatar Jul 19 '16 14:07 claytonpeters

"Start", "Stop" and "Status" are generally Ubuntu commands, but adding provider => 'upstart' to the service resource on RHEL6 systems corrects the issue. I have a support case in with Puppet for further explanation.

jcitarello-ercot avatar Jan 29 '19 21:01 jcitarello-ercot