spanish version - all english posts
Howto make work wmware-server-2.0.2 in Ubuntu 10.04 LTS lucid lynx
I'm using lucid's beta for a month. Today I remembered that I had not yet tested vmware-server on 10.04 lucid; so we will see how to solve the problems that may appear.
Basically we will do the same we did for karmic:
- install vmware-server
- apply the ubuntugeek's patch
But since the kernel version in lucid is 2.6.32 to get the vmware modules compile we will need to...
manualy edit a couple of files:
vmnet-only/vnetUserListener.c vmci-only/linux/vmciKernelIf.c
Note: at the end of this post there is a remark about vmware-tools in Ubuntu lucid 10.04 LTS guests
Lets summarize the process step by step:
First of all we need a basic build environment to compile the vmware modules; with the following commands we will install all the programs we'll need and its dependencies:
~# aptitude update ~# aptitude -y install build-essential linux-headers-$(uname -r) psmisc
Untar the vmware-server tarball that you have already download from vmware's site:
~# tar xvf VMware-server-2.0.2-203138.i386.tar.gz
We proceed to perform the installation:
~# cd /tmp/vmware-server-distrib/ ~# ./vmware-install.pl
When the process arrives to the modules compilation step, we see the same error that happens in all the last ubuntu releases:
None of the pre-built vmmon modules for VMware Server is suitable for your running kernel. Do you want this program to try to build the vmmon module for your system (you need to have a C compiler installed on your system)? [yes] Using compiler "/usr/bin/gcc". Use environment variable CC to override. What is the location of the directory of C header files that match your running kernel? [/lib/modules/2.6.32-21-generic/build/include] Extracting the sources of the vmmon module. Building the vmmon module. Using 2.6.x kernel build system. make: Entering directory `/tmp/vmware-config1/vmmon-only' make -C /lib/modules/2.6.32-21-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules make[1]: Entering directory `/usr/src/linux-headers-2.6.32-21-generic' CC [M] /tmp/vmware-config1/vmmon-only/linux/driver.o In file included from /tmp/vmware-config1/vmmon-only/linux/driver.c:31: /tmp/vmware-config1/vmmon-only/./include/compat_wait.h:78: error: conflicting types for 'poll_initwait' include/linux/poll.h:70: note: previous declaration of 'poll_initwait' was here In file included from /tmp/vmware-config1/vmmon-only/./include/vmware.h:38, from /tmp/vmware-config1/vmmon-only/linux/driver.c:99: /tmp/vmware-config1/vmmon-only/./include/vm_basic_types.h:108:7: warning: "__FreeBSD__" is not defined In file included from /tmp/vmware-config1/vmmon-only/./common/vmx86.h:32, from /tmp/vmware-config1/vmmon-only/linux/driver.h:29, from /tmp/vmware-config1/vmmon-only/linux/driver.c:101: /tmp/vmware-config1/vmmon-only/./include/x86msr.h:164:1: warning: "MSR_THERM2_CTL" redefined In file included from /usr/src/linux-headers-2.6.32-21-generic/arch/x86/include/asm/msr.h:4, from /usr/src/linux-headers-2.6.32-21-generic/arch/x86/include/asm/processor.h:21, from include/linux/prefetch.h:14, from include/linux/list.h:6, from include/linux/module.h:9, from /tmp/vmware-config1/vmmon-only/./include/compat_module.h:27, from /tmp/vmware-config1/vmmon-only/linux/driver.c:26: /usr/src/linux-headers-2.6.32-21-generic/arch/x86/include/asm/msr-index.h:227:1: warning: this is the location of the previous definition In file included from /tmp/vmware-config1/vmmon-only/./include/vcpuset.h:103, from /tmp/vmware-config1/vmmon-only/./include/modulecall.h:37, from /tmp/vmware-config1/vmmon-only/./common/vmx86.h:33, from /tmp/vmware-config1/vmmon-only/linux/driver.h:29, from /tmp/vmware-config1/vmmon-only/linux/driver.c:101: /tmp/vmware-config1/vmmon-only/./include/vm_atomic.h:329:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_atomic.h:333:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_atomic.h:401:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_atomic.h:407:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_atomic.h:506:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_atomic.h:595:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_atomic.h:684:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_atomic.h:773:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_atomic.h:775:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_atomic.h:860:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_atomic.h:862:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_atomic.h:945:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_atomic.h:947:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_atomic.h:1028:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_atomic.h:1030:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_atomic.h:1223:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_atomic.h:1227:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_atomic.h:1536:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_atomic.h:1663:7: warning: "_MSC_VER" is not defined In file included from /tmp/vmware-config1/vmmon-only/./include/vm_basic_asm.h:46, from /tmp/vmware-config1/vmmon-only/./include/rateconv.h:45, from /tmp/vmware-config1/vmmon-only/./include/modulecall.h:40, from /tmp/vmware-config1/vmmon-only/./common/vmx86.h:33, from /tmp/vmware-config1/vmmon-only/linux/driver.h:29, from /tmp/vmware-config1/vmmon-only/linux/driver.c:101: /tmp/vmware-config1/vmmon-only/./include/vm_basic_asm_x86.h:62:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_basic_asm_x86.h:177:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_basic_asm_x86.h:346:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_basic_asm_x86.h:453:7: warning: "_MSC_VER" is not defined In file included from /tmp/vmware-config1/vmmon-only/./include/vm_asm.h:43, from /tmp/vmware-config1/vmmon-only/linux/driver.c:103: /tmp/vmware-config1/vmmon-only/./include/vm_asm_x86.h:486:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_asm_x86.h:779:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_asm_x86.h:820:7: warning: "_MSC_VER" is not defined /tmp/vmware-config1/vmmon-only/./include/vm_asm_x86.h:922:7: warning: "_MSC_VER" is not defined In file included from /tmp/vmware-config1/vmmon-only/linux/driver.c:119: /tmp/vmware-config1/vmmon-only/./common/hostif.h:53:7: warning: "WINNT_DDK" is not defined /tmp/vmware-config1/vmmon-only/linux/driver.c: In function 'LinuxDriverSyncCallOnEachCPU': /tmp/vmware-config1/vmmon-only/linux/driver.c:1423: error: too many arguments to function 'smp_call_function' /tmp/vmware-config1/vmmon-only/linux/driver.c: In function 'LinuxDriver_Ioctl': /tmp/vmware-config1/vmmon-only/linux/driver.c:1987: error: 'struct task_struct' has no member named 'euid' /tmp/vmware-config1/vmmon-only/linux/driver.c:1987: error: 'struct task_struct' has no member named 'uid' /tmp/vmware-config1/vmmon-only/linux/driver.c:1988: error: 'struct task_struct' has no member named 'fsuid' /tmp/vmware-config1/vmmon-only/linux/driver.c:1988: error: 'struct task_struct' has no member named 'uid' /tmp/vmware-config1/vmmon-only/linux/driver.c:1989: error: 'struct task_struct' has no member named 'egid' /tmp/vmware-config1/vmmon-only/linux/driver.c:1989: error: 'struct task_struct' has no member named 'gid' /tmp/vmware-config1/vmmon-only/linux/driver.c:1990: error: 'struct task_struct' has no member named 'fsgid' /tmp/vmware-config1/vmmon-only/linux/driver.c:1990: error: 'struct task_struct' has no member named 'gid' /tmp/vmware-config1/vmmon-only/linux/driver.c:2007: error: too many arguments to function 'smp_call_function' make[2]: *** [/tmp/vmware-config1/vmmon-only/linux/driver.o] Error 1 make[1]: *** [_module_/tmp/vmware-config1/vmmon-only] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-21-generic' make: *** [vmmon.ko] Error 2 make: Leaving directory `/tmp/vmware-config1/vmmon-only' Unable to build the vmmon module. For more information on how to troubleshoot module-related problems, please visit our Web site at "http://www.vmware.com/go/unsup-linux-products" and "http://www.vmware.com/go/unsup-linux-tools". Execution aborted.
Hmm, this sounds familiar; so hands-on. Download and install the ubuntugeek's patches:
~# wget -O - http://www.ubuntugeek.com/images/vmware-server.2.0.1_x64-modules-2.6.30.4-fix.tgz | tar xvfz - ~# ./vmware-server.2.0.1_x64-modules-2.6.30.4-fix.sh
But surprise, it ends up with errors:
[...] /usr/lib/vmware/modules/source/vmnet-only/vm_basic_asm_x86.h:62:7: warning: "_MSC_VER" is not defined /usr/lib/vmware/modules/source/vmnet-only/vm_basic_asm_x86.h:177:7: warning: "_MSC_VER" is not defined /usr/lib/vmware/modules/source/vmnet-only/vm_basic_asm_x86.h:346:7: warning: "_MSC_VER" is not defined /usr/lib/vmware/modules/source/vmnet-only/vm_basic_asm_x86.h:453:7: warning: "_MSC_VER" is not defined /usr/lib/vmware/modules/source/vmnet-only/vnetUserListener.c: In function ‘VNetUserListenerEventHandler’: /usr/lib/vmware/modules/source/vmnet-only/vnetUserListener.c:240: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function) /usr/lib/vmware/modules/source/vmnet-only/vnetUserListener.c:240: error: (Each undeclared identifier is reported only once /usr/lib/vmware/modules/source/vmnet-only/vnetUserListener.c:240: error: for each function it appears in.) /usr/lib/vmware/modules/source/vmnet-only/vnetUserListener.c: In function ‘VNetUserListenerRead’: /usr/lib/vmware/modules/source/vmnet-only/vnetUserListener.c:282: error: ‘TASK_INTERRUPTIBLE’ undeclared (first use in this function) /usr/lib/vmware/modules/source/vmnet-only/vnetUserListener.c:282: error: implicit declaration of function ‘signal_pending’ /usr/lib/vmware/modules/source/vmnet-only/vnetUserListener.c:282: error: implicit declaration of function ‘schedule’ make[2]: *** [/usr/lib/vmware/modules/source/vmnet-only/vnetUserListener.o] Error 1 make[1]: *** [_module_/usr/lib/vmware/modules/source/vmnet-only] Error 2 make[1]: se sale del directorio `/usr/src/linux-headers-2.6.32-21-generic' make: *** [vmnet.ko] Error 2 Sorry, problem compiling the vmnet module after it was patched You must restore from this backup directory: /usr/lib/vmware/modules/source-backup
Do not give up! Let's look for more information...
According to Noel at vmware communities we need to patch the following files:
vmnet-only/vnetUserListener.c vmci-only/linux/vmciKernelIf.c
adding a «#include "compat_sched.h"» in each of them.
First of all lets restore the sources that we wrapped in our first attempt:
~# cd /usr/lib/vmware/modules ~# rm -r source ~# mv source-backup source
now modify the files the following way (I could have redo the ubuntugeek's patch adding these little modifications, but it's more work); so lets KISS.
First vnetUserListener.c:
~# cd source/ ~# tar xvf vmnet.tar ~# vim vmnet-only/vnetUserListener.c
Among the #includes in that file add «#include "compat_sched.h"»; once done, re-pack the tar:
~# tar cvf vmnet.tar vmnet-only ~# rm -r vmnet-only
Now do the same with vmciKernelIf.c:
~# tar xvf vmci.tar ~# vim vmci-only/linux/vmciKernelIf.c
We again will add an «#include "compat_sched.h"» among the other includes. Finally re-pack the tar file:
~# tar cvf vmci.tar vmci-only/ ~# rm -r vmci-only
After those little changes, run again the ubuntugeek's patch:
~# cd /tmp/ ~# ./vmware-server.2.0.1_x64-modules-2.6.30.4-fix.sh [...] /usr/lib/vmware/modules/source/vmnet-only/vm_atomic.h:945:7: warning: "_MSC_VER" is not defined /usr/lib/vmware/modules/source/vmnet-only/vm_atomic.h:947:7: warning: "_MSC_VER" is not defined /usr/lib/vmware/modules/source/vmnet-only/vm_atomic.h:1028:7: warning: "_MSC_VER" is not defined /usr/lib/vmware/modules/source/vmnet-only/vm_atomic.h:1030:7: warning: "_MSC_VER" is not defined /usr/lib/vmware/modules/source/vmnet-only/vm_atomic.h:1223:7: warning: "_MSC_VER" is not defined /usr/lib/vmware/modules/source/vmnet-only/vm_atomic.h:1227:7: warning: "_MSC_VER" is not defined /usr/lib/vmware/modules/source/vmnet-only/vm_atomic.h:1536:7: warning: "_MSC_VER" is not defined /usr/lib/vmware/modules/source/vmnet-only/vm_atomic.h:1663:7: warning: "_MSC_VER" is not defined In file included from /usr/lib/vmware/modules/source/vmnet-only/vm_basic_asm.h:46, from /usr/lib/vmware/modules/source/vmnet-only/vm_oui.h:28, from /usr/lib/vmware/modules/source/vmnet-only/vnetInt.h:25, from /usr/lib/vmware/modules/source/vmnet-only/vnetUserListener.c:36: /usr/lib/vmware/modules/source/vmnet-only/vm_basic_asm_x86.h:62:7: warning: "_MSC_VER" is not defined /usr/lib/vmware/modules/source/vmnet-only/vm_basic_asm_x86.h:177:7: warning: "_MSC_VER" is not defined /usr/lib/vmware/modules/source/vmnet-only/vm_basic_asm_x86.h:346:7: warning: "_MSC_VER" is not defined /usr/lib/vmware/modules/source/vmnet-only/vm_basic_asm_x86.h:453:7: warning: "_MSC_VER" is not defined LD [M] /usr/lib/vmware/modules/source/vmnet-only/vmnet.o Building modules, stage 2. MODPOST 1 modules CC /usr/lib/vmware/modules/source/vmnet-only/vmnet.mod.o LD [M] /usr/lib/vmware/modules/source/vmnet-only/vmnet.ko make[1]: se sale del directorio `/usr/src/linux-headers-2.6.32-21-generic' cp -f vmnet.ko ./../vmnet.o Replacing original file vsock.tar with patched file Replacing original file vmci.tar with patched file Replacing original file vmmon.tar with patched file Replacing original file vmnet.tar with patched file Done! I have changed the files in here: /usr/lib/vmware/modules/source I have placed a backup of the original files in here: /usr/lib/vmware/modules/source-backup The original VMware modules directory is still in the way. Please move this directory somewhere else, because it confuses VMware: /usr/lib/vmware/modules/binary This command should work now, to install the modules: vmware-config.pl -d
We are almost done!
Install the modules (notice the '-d' flag; don't use it if you need to define non default settings or accept the license):
~# /usr/bin/vmware-config.pl -d [...] The installation of VMware VIX API 1.6.2 build-203138 for Linux completed successfully. You can decide to remove this software from your system at any time by invoking the following command: "/usr/bin/vmware-uninstall-vix.pl". Enjoy, --the VMware team Starting VMware services: Virtual machine monitor done Virtual machine communication interface done Virtual ethernet done Bridged networking on /dev/vmnet0 done Host-only networking on /dev/vmnet1 (background) done DHCP server on /dev/vmnet1 done Host-only networking on /dev/vmnet8 (background) done DHCP server on /dev/vmnet8 done NAT service on /dev/vmnet8 done VMware Server Authentication Daemon (background) done Shared Memory Available done Starting VMware management services: VMware Server Host Agent (background) done VMware Virtual Infrastructure Web Access Starting VMware autostart virtual machines: Virtual machines done The configuration of VMware Server 2.0.2 build-203138 for Linux for this running kernel completed successfully.
Finally we have our new vmware 2.0.2 server working in our brand new Ubuntu Lucid Lynx 10.04
vmware-tools for ubuntu 10.04 guestsAnd what about vmware-tools in ubuntu 10.04 guests?
This issue may deserve it's own post, but as many of you will face this problem sooner or later; I've added this note about it at the end of this post.
I've tried to install the native vmware-tools in ubuntu 10.04 guests with no succeed.
Do not waste your time on it. There is a big lag between vmware and the new kernels
Instead of the vmware native tools install the opensource version in your guests as follows:
~# apt-get update ~# apt-get install --no-install-recommends open-vm-tools open-vm-dkms
The --no-install-recommends is to avoid the installation of X11 related packages as most of my gests have no gui.
So if your guest is a desktop leave off that flag and run:
~# apt-get update ~# apt-get install open-vm-tools open-vm-dkms
You'll see that with the opensource tools, you'll get most, if not all, the functionality you should have had with the native vmware-tools.