Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Bassobr opened this issue Oct 6, 2015 · 21 comments
Open

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

Bassobr opened this issue Oct 6, 2015 · 21 comments
Labels
bug Something isn't working

Comments

@Bassobr
Copy link

Bassobr commented Oct 6, 2015

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

@crapnicki
Copy link

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.

@Bassobr
Copy link
Author

Bassobr commented Oct 7, 2015

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

@razorsedge razorsedge added the bug Something isn't working label Oct 14, 2015
@razorsedge razorsedge self-assigned this Oct 14, 2015
@aholen
Copy link

aholen commented Oct 27, 2015

+1

@razorsedge
Copy link
Contributor

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.

@crapnicki
Copy link

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.

@razorsedge
Copy link
Contributor

@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.

@crapnicki
Copy link

@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

@razorsedge
Copy link
Contributor

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.

@crapnicki
Copy link

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.

@razorsedge
Copy link
Contributor

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

@aholen
Copy link

aholen commented Mar 10, 2016

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

@razorsedge
Copy link
Contributor

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

@aholen
Copy link

aholen commented Mar 11, 2016

@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
Copy link

aholen commented Mar 11, 2016

@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.

@razorsedge
Copy link
Contributor

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
Copy link
Contributor

Can anyone confirm whether I am off my rocker here?

@esarakaitis
Copy link

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.

@divad
Copy link

divad commented Jul 19, 2016

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
Copy link

divad commented Jul 19, 2016

Oh, actually @razorsedge the problem is caused by this bug #49

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

@claytonpeters
Copy link

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.

divad added a commit to divad/puppet-vmwaretools that referenced this issue Jul 19, 2016
VMware have changed the layout of packages.vmware.com necessitating a change to this module to use the new location for the latest package releases. This PR could however break users who are specifying releases before version 10, so you might want to build a more complicated change which checks the specified version if there is one and selects either esx/$version or releases/$version...
@jcitarello-ercot
Copy link

"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.

@razorsedge razorsedge removed their assignment Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants