How to install VMware Server on 2.6.31 kernels

Posted on January 19th, 2010 at 1:20, in How To, Linux, VMware, Virtualization.

UPDATE: The script should also work with 2.6.32 kernels from version 1.2.

Seeing the success I have encountered with the blog post about installing VMware Server on Ubuntu Karmic Koala and helped by Ramon de Carvalho Valle with a better patch regarding the installation of the virtualization server on the newer kernels found in three of the most popular Linux distributions – Ubuntu, Fedora and openSUSE – I’ve managed to provide a script which should be able to install the server on all of these distros. Furthermore, by placing some trivial checks in a function of the script one may enlarge the applicability to a lot more distributions with common roots (Debian and all Debian-based distributions, Red Hat and all of its derivatives).

I have managed to test the script on both the 2.6.31-14 and 2.6.31-17 kernels which can be found in Ubuntu 9.10 and on the 2.6.31.9-174.fc12 kernel found in Fedora 12. Since I didn’t have an openSUSE machine I am not sure of what is the outcome on this distribution (regarding the kernel sources; people who commented previously on my blog had no problems installing VMware Server using the previous script) but the script is made so that it automatically determines on what kind of distribution is run and according to this information it automatically installs the needed packages. Careful though, as this requires Internet access for the specific machines.

The good news regarding Ramon’s patch is the fact that now VMware Server seems stable. No more warnings appear when compiling modules, except for vsock, which – miraculously – builds on Fedora.

Regarding the installation of VMware Server on Fedora, I have encountered some difficulties after the installation completed successfully. Basically I wasn’t able to log into the web administration interface because of multiple factors. The steps which should be followed will be reminded to the Fedora users after the script completes but I’m gonna mention them here too:

  1. edit /etc/services and replace the entry located on TCP/902 port with vmware-authd
  2. set SELinux to permissive or even disable it by editing the /etc/selinux/config file
  3. reboot your system

The general instructions are the same as the ones for the previous version of the script.

How to

  1. Download VMware Server (2.0.1 or 2.0.2) – gz format, not rpm. Whichever version you choose, keep the license key near.
  2. Download my script from here (right click, save as).
  3. Run the script with super user rights either in the same folder where you have downloaded the server archive, either by providing it the path to that folder. The script will download the needed patch from my server. Make sure the folder where you have downloaded the server’s archive doesn’t contain spaces in its path name or the script will exit (giving you this reason as an error message). If the script exists, it will give you a decent warning from which you should be able to tell what’s wrong. On Ubuntu at least, the VSOCK module will not work (will fail to compile), giving you a hint that your kernel sources might not be the ones for your running kernel. This is not true, as the script takes care of this before doing the hard work. Anyway, VMware Server will work without it. Example:
    chmod +x vmware-server-2.0.x-kernel-2.6.3x-install.sh
    sudo ./vmware-server-2.0.x-kernel-2.6.3x-install.sh [PATH _TO_VMWARE_ARCHIVE]
  4. When you are asked about adding users to the server, if you do not provide your own account, the user used for login in the web console of the server will be root (maybe you should add yourself there).
  5. Provide the license key when asked about it.
  6. For the ones installing Windows guests in VMware Server, you must pick one of the following two solutions to avoid having problems with the mouse in the console:
    • you run this script in the terminal every time you want to launch a VMware Server console, but after you have installed the VMware plug-in for Firefox
    • you export this variable in the environment right after login such that it will be set before starting Firefox:
      VMWARE_USE_SHIPPED_GTK=yes
  7. If the solution worked well for you please share this info wherever you can. :D

I am looking forward for your feedback because running the script and the server under multiple kernel versions and distributions will provide the real way to see if this latest patch really handles all the flaws in VMware Server or not. And if it does, this means that Ramon and I (but mostly Ramon) can shout a big “In your face, VMware!”.

P.S. All my open-source work can also be found on GitHUB. This is useful if you think that you have some other non up to date versions of my scripts. Anyway, the scripts which can be found on my server represent the latest version.

Similar Posts:


54 Comments

[...] made by Ramon de Carvalho Valle which provides a more stable experience. More details can be read here although the instructions presented on this page are still [...]

Ramon de Carvalho Valle said

on January 19th, 2010,

at 03:00 hours

Thanks Radu! Now, let’s wait for feedback from users. And if any problems arise, we can correct them.

RISE Security » VMware Server 2.0.2 Update Patch said

on January 19th, 2010,

at 03:31 hours

[...] January 18, 2009: Radu Cotescu integrated this patch to the latest version of his script, that now applies the patch automatically in Ubuntu, Fedora and openSUSE. The script is available here. [...]

[...] This post was mentioned on Twitter by RISE Security, Radu Cotescu. Radu Cotescu said: How to install VMware Server on 2.6.31 kernels – http://bit.ly/6aGBVs [...]

OpenSuse 11.2 and VMware Server - Page 4 - openSUSE Forums said

on January 19th, 2010,

at 13:04 hours

[...] the right packages) could you please test it and tell me how it worked? The script is located here. Please post your comments on my post, since it will be easier for me to track them and offer a [...]

[...] problem, and fixes are all about Ubuntu.  Do not fear.  (Post-publish update, 20100119:  See http://radu.cotescu.com/2010/01/19/how-to-install-vmware-server-ubuntu-fedora-opensuse/ for a new version that I have not tested [...]

Bill Carroll said

on January 21st, 2010,

at 03:01 hours

Thanks for this. Worked for me on 32-bit Fedora 12 — but, if I go to rerun vmware-config.pl to reconfigure the networking, it immediately complains with:

“The following VMware kernel modules have been found on your system that were not installed by the VMware Installer. Please remove them and run this installer again.

vmci
vmnet
vmmon

Execution aborted!”

Not sure what to do – remove the modules as suggested and have them recompiled again?

Radu said

on January 21st, 2010,

at 14:52 hours

Bill, I’ve tried this on my Fedora VM and it happened to me too. I don’t know how VMware checks the “authenticity” of the kernel modules but it’s safe to remove the old ones and let the script recompile them because by using my script you have the patched sources in the /lib folder. I really don’t know why is this happening.

Franck said

on January 21st, 2010,

at 14:59 hours

It works fine on OpenSuse 11.2 x64 !!! Thanks a lot!!

Eric said

on January 21st, 2010,

at 18:18 hours

Ok ! the VMWARE console work ! Very good procedure ! Thank you !
the console asked a login. I tryed root without password => bad user name and password (I don’t provide a user name during procedure) Is it possible to provide a user name and password or do you know the default password of root ?

My linux is UBUNTU 9.10

Thank you very much for your help

Radu said

on January 21st, 2010,

at 21:03 hours

Eric, you have two solutions:

run sudo vmware-config.pl and put your user as an administrator for VMware (recommended)
set a password for root because Ubuntu by default disables this (not recommended because your root account becomes more vulnerable)

Dako said

on January 22nd, 2010,

at 17:10 hours

Not working :(

[removed error messages]
There is a problem compiling the vmci module after it was patched. :(

Radu said

on January 22nd, 2010,

at 17:18 hours

Dako, you seem to use an old version of the script. Please download the script again and clean your system before running it so that you don’t have traces from a previous VMware installation.

Maurice Fonhof said

on January 25th, 2010,

at 12:32 hours

I tried your script, and yes!!! in vmwares face!!!
Thanks!

Now i only have to solve the login problem

Its_me said

on January 26th, 2010,

at 01:15 hours

Worked great for me on OpenSuse 11.2 only vsock didn’t compile, but that doesn’t matter.

Found one “bug” in the script though, if you provide a path for the VMware server archive while executing the script from the directory containing the archive, the script will tell you that the provided file does not contain VMware server.

If you just run the script without providing the archive path it works like a charm… THANKS!

Radu said

on January 26th, 2010,

at 01:18 hours

If you provided the .tar.gz file in the path it’s normal to tell you that it cannot find the archive because that’s the way I built it: offer the PATH (not the file) so that the script will set a workspace. Anyways, I am glad that it worked.

mihai said

on January 29th, 2010,

at 10:45 hours

Hi, the script installed the vmware just fine on my Fedora 12, but how do I launch it (localhost:8222 in firefox doesn’t load vmware login page)?
Thanks

Radu said

on January 29th, 2010,

at 11:50 hours

You have your answer in the post where I describe the additional steps Fedora users must follow. Also, the same steps were displayed in your terminal after you had installed VMware Server.

mihai said

on January 29th, 2010,

at 15:34 hours

this is my /etc/services:

vmware-authd    902/tcp                 # self documenting Telnet Door

and Selinux is disabled:
SELINUX=disabled
SELINUXTYPE=targeted

Restarted, but can’t access http://localhost:8222 nor https://localhost:8333
but, after

nmap -sT -O localhost I get : 902/tcp  open  iss-realsecure

and no open port for 8222/ 8333.
Is it ok?

Radu said

on January 29th, 2010,

at 16:58 hours

Mihai, it happened to me too once I’ve updated the kernel. If you run sudo vmware-config.pl everything should be okay. Before running this configuration wizard, to be sure that it’s about the kernel modules which have to be recompiled, try restarting VMware with sudo /etc/init.d/vmware restart. If you get an error message about VMware’s kernel modules, then it’s clear what you have to do.

mihai said

on February 1st, 2010,

at 11:07 hours

Yes sir! works just fine after restarting vmware and issuing sudo vmware-config.pl
Anyway, I got:

The following VMware kernel modules have been found on your system that were 
not installed by the VMware Installer.  Please remove them then run this 
installer again.
 
vmci
vmnet
vmmon
 
I.e. - 'rm 
/lib/modules/2.6.31.12-174.2.3.fc12.i686.PAE/misc/.{o,ko}'
 
Execution aborted.

after sudo vmware-config.pl execution, so I think just restarting the vmware was enough.
Thanks again, keep up the good work!

Jim said

on February 1st, 2010,

at 14:18 hours

I’m having trouble with the vsock module. It compiles with a few warnings, but compiles. But when you try to load it, you get this error:

insmod: error inserting 'vsock.ko': -1 Unknown symbol in module
Ubuntu 9.10
Linux r51jimb 2.6.31-17-generic #54-Ubuntu SMP Thu Dec 10 16:20:31 UTC 2009 i686 GNU/Linux
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.1-4ubuntu9' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9) 
GNU ld (GNU Binutils for Ubuntu) 2.20

Not sure what’s going on here, but seems like the linker is producing a bad module.

Jim said

on February 1st, 2010,

at 15:42 hours

Updating my previous comment, this insmod error is due to unresolved symbols:

[ 8199.818878] vsock: no symbol version for VMCIDatagram_Send
[ 8199.818891] vsock: Unknown symbol VMCIDatagram_Send
[ 8199.819234] vsock: no symbol version for VMCI_GetContextID
[ 8199.819241] vsock: Unknown symbol VMCI_GetContextID
[ 8199.823465] vsock: no symbol version for VMCIDatagram_DestroyHnd
[ 8199.823472] vsock: Unknown symbol VMCIDatagram_DestroyHnd
[ 8199.823813] vsock: no symbol version for VMCIDatagram_CreateHnd
[ 8199.823821] vsock: Unknown symbol VMCIDatagram_CreateHnd

This is related to the linker (ld) warnings seen during the make:

WARNING: "VMCIDatagram_CreateHnd" [/tmp/vmware-config0/vsock-only/vsock.ko] undefined!
WARNING: "VMCIDatagram_DestroyHnd" [/tmp/vmware-config0/vsock-only/vsock.ko] undefined!
WARNING: "VMCI_GetContextID" [/tmp/vmware-config0/vsock-only/vsock.ko] undefined!
WARNING: "VMCIDatagram_Send" [/tmp/vmware-config0/vsock-only/vsock.ko] undefined!

It seems that somewhere in the source or Makefile, the linker needs to be told where to find those symbols (they’re routines in vmci). It’s probably just some simple LDFLAG or something, but I have no idea how to do this. :-)

Radu said

on February 1st, 2010,

at 16:39 hours

@Jim: Yeah, on Ubuntu the vsock module still doesn’t work. Ramon has promised that if he has some free time he will try to handle that module in a future patch. Still, some people told me that the previous patch of VMware (for Ubuntu 9.04 and before) handles this just well, in which case I can fix those problems just by applying that patch too. I’ll figure it out these days.

brad clements said

on February 7th, 2010,

at 05:49 hours

I used vmware-server-2.0.x-kernel-2.6.31-14-install.sh to install VMware-server-2.0.2-203138.x86_64.tar.gz on ubuntu 9.10 running 2.6.31-19-server X86_64

All vmware modules compiled except for vsock and VIX.

Unfortunately NAT and host-only network are not working quite right. I cannot reach the guest from the host. The only way to get to the guest is to go through a forwarded nat connection (specified in nat.conf).

Before upgrading to 9.10 (from 8.04), this used to work. The host could ping the guest using either the guests’ NAT ip address or host-only ip.

Now ping does not work. Also the guest can no longer ping the host.

I’m open to suggestions.. qemu? :-(

Radu said

on February 7th, 2010,

at 17:01 hours

I’d go for VirtualBox.

Drew said

on February 16th, 2010,

at 08:09 hours

Radu,

Trying to use this patch to compile VMware server 2.02 under a 2.6.32-trunk kernel. Running Debian Squeeze.

The script exits trying to compile the vmnet module. Has any one fixed this problem it’s driving me MAD! I’ve tried the Ubuntu patches with no-luck and several others.

-Drew

Radu said

on February 16th, 2010,

at 11:29 hours

Drew, the patch I am using in the script is for kernel 2.6.31. I thought that was clear. Anyway, a guy who commented in here tried to “fix” the script and the patch in an ugly way which I don’t approve. I will integrate the new patch for 2.6.32 in the existing script. Just give me some time.

Nathan said

on February 16th, 2010,

at 18:39 hours

Well I’m having some issues.. But thanks so much for your patch because its definitely working better… I am installing and it’s telling me GCC version installed (4.4.2) doesn’t match the one the kernel was compiled with (4.4.2) I continue the install but only the web interface loads but it doesn’t let me log into anythign it jsut times out.. Is this possibly teh cause?

I’m running Fedora 12, 2.6.31-12 andVmware Server 2.0.2… It appears to install and be able to run the services but nothing seems to run, and the odd time it will just hang when I attempt to service vmware shutdown…. Any ideas????

Radu said

on February 18th, 2010,

at 10:16 hours

Nathan, you should try to use the same compiler used for compiling your kernel when you try to install VMware Server.

Warren said

on February 19th, 2010,

at 06:06 hours

My vmware machine can reach the network through the vmware NAT network, but I cannot ssh/telnet/http into the machine through the host.

[...] compiles and loads perfectly into the running kernel. All the needed instructions can be found here. For comments related to the way VMware works on the 2.6.32 kernels please use the comment form [...]

Karl said

on February 21st, 2010,

at 18:38 hours

@Radu and Ramon,

thank You very much – it worked at first attempt.
To be honest, I’ve tried to move to VirtualBox, but the migration of my guest-vm left me without a working network-adapter. Now I am very happy, that you have updated your script – thanks again!
Karl

mike said

on February 22nd, 2010,

at 20:20 hours

I ran into some issues stating the there were modules already loaded that were not installed by VMWare. I deleted the contents of /lib/modules/2.6.31-20-generic/misc/. It still gave me the error and complained about the vmnet module. I had to add it to the /etc/modprobe.d/blacklist (Ubuntu), reboot, lsmod | grep vmnet to make sure it wasnt loaded and then reran vmware-configure.pl. Everything work well. All modules compiled and loaded correctly. Just make sure to remove the blacklist line, and reboot again. I now have my system working wtih VMWare Server 2.0.2 and kernel 2.6.31-20

Matthew said

on February 23rd, 2010,

at 06:50 hours

With regards to the problem people are having rerunning vmware-config.pl: “The following VMware kernel modules have been found on your system that were not installed by the VMware Installer.”

This is an annoying problem since you sometimes need to reconfig e.g. to change ethernet settings.

The simplest way to is modify vmware-config.pl itself so that it will ignore the module check. This may have some downsides but personally I’d rather have vmware-config working rather than removing the kernel modules and then rerunning vmware-config.

The required changes are around line 11231. There are multiple ways to do it but I did it by changing:

if (scalar(@modules) > 0) {

TO

if (scalar(@modules) > 9) {

Nathan said

on February 23rd, 2010,

at 06:59 hours

For some reason, after the install is complete, I followed your directions completely and I am Fedora 12 2.6.31-12… I can access the server login page, but when I log in it says Server not responding, and even though processes are running…. I try to stop and restart the services and it fails to stop Virtual Machines, Host Agent, and Virtual Ethernet… I go to kill the processes stop and start it again and it asks to reconfigure because its not running right for the kernel…. Is it because I’m on .31-12?

Niels said

on February 24th, 2010,

at 00:15 hours

I am using Ubuntu 9.10 with the new script (21-feb-10).
It seems that the file vmci-temp.tar contains a sub folder named vmci-only, this results as far as I can see in the following error:
vmci-temp.tar tarball failed to extract in the directory vmci-temp-only. :(

Can you please verify this.
Thanks Niels

Radu said

on February 24th, 2010,

at 00:51 hours

@Nathan: I experienced that too once on Fedora. But afterwards I could just run sudo vmware-config.pl to recompile the modules.
@Niels: Clean the workspace and rerun the script. It shouldn’t stop because of that (I’ve thoroughly tested the script’s behaviour).

maldex said

on February 25th, 2010,

at 08:59 hours

fedora core 12, x64, vmserver 2.0.2:
worked perfectly! thanks a lot for your work!

Niels said

on February 26th, 2010,

at 20:00 hours

thanks a billion.
i copied the files to a new directory, and it worked like a charm.
i’m running the pae-kernel, and initially i thought that was the problem.

John said

on February 26th, 2010,

at 23:34 hours

https://help.ubuntu.com/community/VMware/Server
worked perfectly for me.
Ubuntu 9.10.
Thank you for an excellent script that made it brain-dead simple.

aloysius said

on February 27th, 2010,

at 11:09 hours

i still have the same problem: i unpacked the file to stan@stan-Desktop: ~/Downloads/vmware-server-distrib$
but when i try to run chmod +x vmware-server-2.0.x-kernel-2.6.3x-install.sh I get cannot access ‘vmware-server-2.0.x-kernel-2.6.3x-install.sh’ no such file or directory found. When i try to run sudo ./sudo ./vmware-server-2.0.x-kernel-2.6.3x-install.sh. i get command not found. Can you please advised im new to this and need help

aloysius said

on February 27th, 2010,

at 11:38 hours

Thank you radu i installed vmware sucessfully

Dave said

on March 1st, 2010,

at 07:19 hours

Thanks very much! This worked almost flawlessly.

The only thing I had to do differently on my Fedora 12 install was change the start runlevel in /etc/rc.d/init.d/vmware from 19 to 89 (and then issue “chkconfig vmware resetpriorities”) — otherwise the admin interface wouldn’t initially listen on port 8222 and 8333 after a reboot.

(I suspect vmware was starting before the network was ready — but didn’t spend a lot of time digging into it. Actually, I’m a little puzzled how it got configured with a start priority value of 24, since, as I mentioned above, /etc/rc.d/init.d/vmware had an original chkconfig: start value of 19).

Thanks again!

Stefano said

on March 3rd, 2010,

at 17:06 hours

Same problema as Warren:
“My vmware machine can reach the network through the vmware NAT network, but I cannot ssh/telnet/http into the machine through the host.”

Any ideas? I’m running an ubuntu 9.10 64 bit with kernel 2.6.31-20-generic #57-Ubuntu and the last version of the script.
Thanks in advance.

Radu said

on March 3rd, 2010,

at 17:13 hours

Stefano, apparently this is a known problem for which currently I don’t have a solution (other than suggesting you to use bridged networking).

Sayre Swarztrauber said

on March 3rd, 2010,

at 22:23 hours

Thank you for your script. It allowed me to install on 2.6.31 Fedora 11. Unfortunately I have exactly the same problem as Brad Clements, similar to the problem of Stefano.

Before the kernel was upgraded to 2.6.31 host only networking worked (I could ping both ways from the guest to the host and vice versa). I used samba on the Fedora host to a share on an XP guest. Now I cannot see the guest from the host or the host from the guest. Bridged networking is only a solution when I am online with an Ethernet connection. If I unplug the Ethernet Windows flags the adapter as unplugged. This is not always good as this computer is a laptop. I need host only networking to work in order to work offline. Any help would be greatly appreciated.

Warren said

on March 4th, 2010,

at 01:08 hours

I can’t network directly into the machines but port forwarding works OK. Set up forwards in /etc/vmware/vmnet8/nat/nat.conf:
[incomingtcp]
# Use these with care – anyone can enter into your VM through these…
2222 = 192.168.5.128:22

Then ssh to your localhost on the port:

ssh -p 2222 myuser@localhost

Stefano said

on March 4th, 2010,

at 10:45 hours

Thanks Warren for the solution. Port forwarding works well! Even the solution of the bridge works, but I prefer to use the machine behind a NAT.

valentina said

on March 4th, 2010,

at 12:40 hours

Hi Radu,thanks for your script.
I want to report that I’ve the same Sayre’s problem, host only network configuration doens’t work.
I’ve installed two new servers with Ubuntu 9.10-64bit with vmware 2.0.2, kernel 2.6.31-19.
I cannot reach the virtual machine from the host (ping or ssh), I cannot ping the gateway from the virtual machine.
I’ve configured ip_forward active and iptables mascherade,
Bridge network works properly.

thanks
valentina

Radu said

on March 4th, 2010,

at 12:48 hours

@valentina: I know but unfortunately I couldn’t find a better patch to do the job. Try to follow Warren’s solution to address the problem.

Sayre Swarztrauber said

on March 4th, 2010,

at 19:14 hours

@valentina: I switched last night to Sun’s VirtualBox and solved all of my problems. I am using Fedora 11 x86_64 with 2.6.31 as the host and XP as the guest. Vbox installed without a patch or a hitch. Host only, bridged and NAT all worked as desired. After putting in their “guest additions” the mouse worked better than VMware. The shared folders worked great! I got it all done with one hour last night and this morning in 3 hours. Note: I did NOT try to import my old VM. I created a new one and reinstalled the apps. I cannot vouch for the import feature.

valentina said

on March 5th, 2010,

at 15:32 hours

@Sayre:Thanks Sayre. I just reinstall the two servers using the ubuntu 9.04 iso with kernel 2.6.28.11 and after update kernel 2.6.28.18 (i’ve got the same configuration in production environment and it works properly).I’ll be careful in case of kernel headers update. I’ve got to many production servers with vmware server to switch to Virtual Box now, but i think we have to switch to virtual box or kvm or qemu,we don’t have any other choice.thanks

[...] discussionなどを除いていたらubuntuで動かしている人がいたのでこれを試してみてようやく [...]

Think you've got something to say?

Subscribe without commenting