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?
5 Answers
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...
- 143
- 1
- 9
- 624
- 5
- 9
-
3The answer is slightly different if you're using `open-vm-tools` instead. lsmod shows up the same modules. For the running process, you would do `ps ax | grep vmtoolsd` instead. – Ehtesh Choudhury Jan 08 '14 at 03:56
Tested on Ubuntu 12.xx
$ sudo service vmware-tools status
It works on my machines (from 12.04 to 14.04)
- 726
- 6
- 15
- 81
- 1
- 1
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
The 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 less
or more
.
However, I prefer to pipe the output to a filter program like grep
like so:
# sudo initctl list | grep vmware
This runs 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.
As the initctl
manual page says, each line of output reflects a job's status in the format:
job-name goal/state
Quote:
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.
Notes
For your information, my machine was
Ubuntu 13.10 Saucy Salamander Final Beta
.View the
initctl
man page's section onlist
andstatus
for 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
- 131
- 7
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.
- 21
- 1
-
Please insert the most important parts as text in your comment when linking to external articles. – Izzy Oct 07 '15 at 06:23