If you’ve followed my previous virtualization articles you’ve already seen a lot of material related to VMWare and Gentoo as well.
I use Gentoo as my primary desktop distribution and I often use it on servers as well, one of the biggest problems on Gentoo portage is VMWare support for the player, if you’re using an AMD64 release (Gentoo on x86 with 64bit support) you’re stick with v2.x but recent 3.x version has introduced a lot of cool things (VM machine creation and better HW support), if you want to install it you’re on your own.
It’s not a complex installation but on Gentoo there’re few tips to remember for a clean installation/uninstallation. Here’s what I’ve did on my own:
Download and Install
First of all just download the package you’re looking for from VMWare download area, you need to be registered to get something from them but it’s not a problem, at the time of this writing version 3.1.4 it’s the latest one but I don’t think this procedure would not change later on
Now follow few HTML pages (vmware player link, registration area and then you’ll be redirected to the download area) and you’ll see something like this:
You need to download proper binary file according to your architecture (32bit or 64bit), I’ve downloaded for example “Vmware-Player-3.1.4-385536.x86_64.bundle” in my /tmp directory
now add executable bit to it:
chmod +x VMware-Player-3.1.4-385536.x86_64.bundle
So you’ll get something like this:
# ls -la Vmware-Player-3.1.4-385536.x86_64.bundle
-rwxr-xr-x 1 andrea software 103561067 May 18 19:51 Vmware-Player-3.1.4-385536.x86_64.bundle
now just execute the bundle file (as ROOT)
Select NO if you don’t want to check for products updates (like me)
and select NO if you don’t want to send anonymous data to them (like me)
These choices are up to you, but they’re not important for this installation.
Then click INSTALL to install this program, this is a fairly clean installation as in a Windows environment, wait for a while until the installer program will stop with a pop-up like this one:
Don’t worry about that, installer is complaining about a missing vmware service file, maybe because it thinks to be running in a mainstream distribution like Fedora Core or Ubuntu, simply ignore the warning and continue with your own installation. At the end of the process you’ll see a screenshot like this one
Now Some tweaking
Installer ended its job, now it’s time to tweak few things in your system to get everything working
First of all: we need to create a service file and put it under /etc/init.d, I’ve grabbed a good skeleton from /usr/portage/app-emulation/vmware-player/files/vmware-3.0.rc but I’ve adapted it to be fully compliant with the VMWare .bundle file, particularly I’ve payed attention to the uninstallation process. Don’t copy vmware-3.0.rc, take mine because it works:
# Author: Andrea Benini (2011-05-18)
# Distributed under the terms of the GNU General Public License v2
# Original script taken from /usr/portage/app-emulation/vmware-player/files/vmware-3.0.rc
# Slightly modified so I can use it with stock VMWare Player Bundle file from their download area
# This scripts fixes troubles for services installed from scratch as well as vmware manual uninstallation
# Report me problems if they occours (andrea benini GMAIL com. No dots, between name and surname, add @ where needed)
use net }
ebegin Starting VMware USB Arbitrator
#start-stop-daemon --start --exec /usr/bin/vmware-usbarbitrator
/usr/bin/vmware-usbarbitrator eend $?
ebegin Starting VMware services
modprobe -a vmmon vmci vsock vmblock vmnet eend $?
ebegin Stopping VMware USB Arbitrator
start-stop-daemon --stop --exec /usr/bin/vmware-usbarbitrator
/usr/bin/vmware-networks --stop eend $?
ebegin Stopping VMware services
modprobe -r vsock vmci vmmon vmblock vmnet
I’ve just added few things if you compare mine with the original one: usbarbitrator is needed from version v3.x and above (according to vmware docs) and it needs to be run as a service. I’ve also added the stoppable status because if you’d like to have a clean uninstallation you’ll run into troubles without it, I’ve fixed it to avoid troubles and have a nicely installed package (with a nice uninstallation as well…)
Now copy my own vmware service file reported above and name it /etc/init.d/vmware, and place executable bit on it
# chmod +x /etc/init.d/vmware
Now if you run it you’ll see something like this:
Usage: vmware [ flags ] < options >
start stop restart pause zap
Default init.d options.
Extra options supported by this init.d script.
Suppress output to stdout, except if:
1) It is a warning, then output to stdout
2) It is an error, then output to stderr
--verbose Output extra information
--debug Output debug information
--nocolor Suppress the use of colors
For more info, please run '/etc/init.d/vmware help'.
Did you noticed the “Additional Options: stoppable” area above ? It needs to be there if you’d like to have a clean uninstall, if you don’t have it (like original Gentoo script file) or if you don’t understand what I’m writing just drop me a note for it
We’ve done a lot of the job, now it’s time to link vmware modules to your own running kernel, you need to have linux kernel source code and headers (emerge sys-kernel/linux-headers sys-kernel/gentoo-sources) installed in your system. Well if you’re an average Gentoo user you’ll probably have them already installed (if you follow the installation handbook and you compile the kernel by yourself you already have them where needed). By the way just check if you’ve them in your system:
emerge --search sys-kernel/linux-headers
emerge --search sys-kernel/gentoo-sources
Now it’s time to link vmware modules to the kernel, always as root user just run:
You need to wait for a while until modules and sources won’t finish their compilation process, at the end you’ll see this nice window:
And that’s it, you’re set and you don’t need anything else, just add vmplayer command to your favorite menu in your Window Manager (Gnome, KDE, Fluxbox, …)
if you can see this VMWare main window you’ve successfully installed everything fine, if you cannot see it you’re stuck somewhere else, just drop me a note if you need some help
This procedure is tailored on Gentoo but it could be easily ported to other distros as well: Slackware, Arch, LFS and so on
Use my /etc/init.d/vmware service file, this works and it’s fully compatible with Gentoo and VMWare as well, I’ve payed a special attention to the installation/uninstallation process. A lot of people are complaining about troubles when uninstallation process is run, it seems VMWare player uninstaller is looking for a particular feature to stop running services, that’s why I’ve added “stoppable” status
To manually uninstall the VMWare Player just issue this command: vmware-installer –uninstall-product=vmware-player, always inside an XWindow command shell, a graphical installer starts and their procedure is really easy
You may start/stop virtual ethernet cards with the /etc/init.d/vmware file (/etc/init.d/vmware start|stop|restart|status|…), you don’t need to fire up this service when your machine boots, when you run vmplayer networks interfaces are automatically started for you
If you’re using a different distribution please pay attention to the lack of support when you’re using a distro that is not RPM or DEB based, you just need to place a service file for starting up virtual network services (in /etc/rc.d or /etc/init.d or something like that), also add the status “stoppable” to your service file so you may have a nice clean uninstall if needed
I guess I’ve covered everything, please let me know if you need further information
Andrea (Ben) Benini