ICS/Lotus (mostly), Linux, Travel, Skiing, Mixology, and Random Musing of Interest

Managing VMware Tools on Linux, Part I: Working with Ubuntu’s New ’Standard’

Bill Malchisky  July 10 2013 01:39:00 AM
After reading this post, you will know where to go to get the services file, check the status and start/stop/restart the vmware-tools service on Ubuntu systems, and how the process differs on Red Hat. For my guest VMs, as some VMware forum authors also indicated, the VMware Tools program tends to shut itself off quite regularly -- usually after every OS update is applied. Thus, you have to remember to reconfigure or restart VMware Tools every time, or your shared folders will fail to work, for example.

What used to be a simple process is now convoluted as the Linux community is in a state of flux in finding the next great service process manager. Part of the chaos is thanks in-part to Ubuntu's new service management program named, Upstart. As of version 10.04 LTS, Canonical has been moving scripts from the SysVInit style to the Upstart format by default. Despite a bit of controversy in the Linux community over the naming of the new Upstart project's directory, Ubuntu systems now have a /etc/init directory where they place simple configuration files for each service, rather than scripts with pointers. Among other differences, the configuration files contain a more verbose start/stop parameter section (see below).

Example Upstart Configuration File Excerpt

start on runlevel [235] or starting gdm or starting kdm or starting prefdm

stop on runlevel [06]


My question is that for every desktop management program a user can install, are they going to have to verify all of their Upstart configuration scripts are set correctly? Whereas /etc/init.d takes this into account quite well, IMHO.

Despite a lack of an /etc/init.d script on Ubuntu systems, the /etc/init/vmware-tools.conf file which contains the path to the vmware-tools services script, where we can go to run it. Here is how you check the status for VMware Tools, on your Debian and Red Hat derived systems.

Ubuntu

1. $less /etc/init/vmware-tools.conf
2. Observe the path to the vmware-tools services.sh script; depress 'Q' to quit less
3. $sudo /etc/vmware-tools/services.sh status
4. If "vmtoolsd is not running" then, $sudo /etc/vmware-tools/services.sh restart
Note:
You need to recognize that VMware transitioned to Upstart as Canonical is requiring this now from their vendors; if previously unaware, you could be searching a long time to find where the program resides and why.

Red Hat, SUSE, CentOS, Fedora, and Most Non-Debian Variants

1. #service vmware-tools status
2. #service vmware-tools restart

Easy. As there are many forum posts and comments out there on testing for VMware Tools enablement, but lack a decision tree, ultimately creating confusion for some as suggested commands did not always work as advertised. So, I thought I would inject a bit of sanity for Linux users.


VMware Tools Upstart Configuration File

##########################################################################

# Copyright (c) 2010-2013 VMware, Inc.  All rights reserved.

##########################################################################


##########################################################################

# DO NOT modify this file directly as it will be overwritten the next

# time the VMware Tools are installed.

##########################################################################


description     "VMware Tools services"

author          "VMware, Inc."


# Be sure to block the display managers until our job has completed.  This

# is to make sure our kernel services are running before vmware-user

# may launch.

start on runlevel [235] or starting gdm or starting kdm or starting prefdm

stop on runlevel [06]


pre-start exec /etc/vmware-tools/services.sh start

post-stop exec /etc/vmware-tools/services.sh stop



Overall, I find the /etc/init.d setup to be easier to manage, but perhaps over time, Canonical will evolve Upstart and my opinion will change... or they will move to systemd like the rest of the Linux community with each respective successive major release (e.g. RHEL 7).
Comments
No Comments Found

Powered by IBM Lotus Domino 8 | Lotus User Group | Get Firefox! | This blog is listed on Planet Lotus   IBM Certified

© 2010 William Malchisky.