I have an Ubuntu 9.10 Server running as guest from VMware Fusion. How can I check if it's running VMware tools from the command line?
This works in SLES:
ps ax|grep vmware 8885 ? Ss 8:05 /usr/lib/vmware-tools/sbin64/vmware-guestd --background /var/run/vmware-guestd.pid /etc/init.d/vmware-tools status vmware-guestd is running
You can also check if the vm kernel modules are running
lsmod ... vmw_pvscsi 22359 0 vmxnet3 44475 0 vmwgfx 114733 3 vm...
You could use
initctl to request a list of the known jobs and instances and output the status of each to standard output:
#sudo initctl list
Note: It's important to prefix the command with
sudo (or be logged in as
root). If you don't have root privilages, you could get an error like "
unable to connect to system bus: failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory." Which is very confusing.
Filtering the results
initctl command might produce a large list of results that flow over many screens.
So, it might be better to pipe the standard output to a paginator program like
However, I prefer to pipe the output to a filter program like
grep like so:
# sudo initctl list | grep vmware
initctl but filters its results to exclude all lines of output unless they contain the phrase vmware.
Understanding the output
I ran the, grep-filtered, command (
sudo initctl list | grep vmware) and got the following output:
vmware-tools start/running vmware-tools-thinprint start/running
The first line confirmed, to me, that vmware-tools was running.
If there was no output at all, I'd deduce that vmware-tools was not running.
initctl manual page says, each line of output reflects a job's status in the format:
The job name is given first followed by the current goal and state of the selected instance. The goal is either start or stop, the status may be one of waiting, starting, pre-start, spawned, post-start, running, pre-stop, stopping, killed or post-stop.
For your information, my machine was
Ubuntu 13.10 Saucy Salamander Final Beta.
initctlman page's section on
statusfor more info.
For the best introduction to Linux pipes etc. it's worth reading those 26, short, pages of that seminal article: The Unix Time-Sharing System, by D. M. Ritchie and K. Thompson
Here you have a little help, with images: http://testools.blogspot.com/2013/01/install-vmware-tools-in-ubuntu-easy-way.html Look at the end of the article.