VMWare Server 2.0.2 on Ubuntu 10.04 LTS

Asked by Jason Cwik on 2011-07-15

I'm trying to install VMware Server 2.0.2 on Ubuntu 10.04 LTS x86_64, Kernel 2.6.32-32.

I followed the guide: https://help.ubuntu.com/community/VMware/Server

But compiling the kernel modules still fails:

jason@butters:~/raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce$ sudo ./vmware-server-2.0.x-kernel-2.6.3x-install.sh
You have VMware Server archive:
 VMware-server-2.0.2-203138.x86_64.tar.gz
Checking for needed packages on Ubuntu
You do have the linux-headers-2.6.32-32-server package...
You do have the build-essential package...
You do have the patch package...
Extracting the contents of VMware-server-2.0.2-203138.x86_64.tar.gz
Found .tar file for vmnet module
Found .tar file for vmci module
Found .tar file for vmmon module
Found .tar file for vsock module
Extracting .tar files in order to apply the patch...
Untarring /home/jason/raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce/vmware-server-distrib/lib/modules/source/vmnet.tar
Untarring /home/jason/raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce/vmware-server-distrib/lib/modules/source/vmci.tar
Untarring /home/jason/raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce/vmware-server-distrib/lib/modules/source/vmmon.tar
Untarring /home/jason/raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce/vmware-server-distrib/lib/modules/source/vsock.tar
Testing patch...
Creating some simlinks for the newer kernels...
ln: creating symbolic link `/usr/src/linux-headers-2.6.32-32-server/include/linux/autoconf.h': File exists
ln: creating symbolic link `/usr/src/linux-headers-2.6.32-32-server/include/linux/utsrelease.h': File exists
Applying patch...
Preparing new tar file for vmnet module
Preparing new tar file for vmci module
Preparing new tar file for vmmon module
Preparing new tar file for vsock module
Checking that the compiling will succeed...
Trying to compile vmnet module to see if it works
Performing make in /home/jason/raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce/vmware-server-distrib/lib/modules/source/vmnet-only
Using 2.6.x kernel build system.
/home/jason/raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce/vmware-server-distrib/lib/modules/source/vmnet-only/driver.c:121: warning: data definition has no type or storage class
/home/jason/raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce/vmware-server-distrib/lib/modules/source/vmnet-only/driver.c:121: warning: type defaults to ‘int’ in declaration of ‘DEFINE_SEMAPHORE’
/home/jason/raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce/vmware-server-distrib/lib/modules/source/vmnet-only/driver.c:121: warning: parameter names (without types) in function declaration
/home/jason/raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce/vmware-server-distrib/lib/modules/source/vmnet-only/filter.c:82: warning: type defaults to ‘int’ in declaration of ‘DEFINE_SEMAPHORE’
/home/jason/raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce/vmware-server-distrib/lib/modules/source/vmnet-only/filter.c:82: warning: parameter names (without types) in function declaration
/home/jason/raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce/vmware-server-distrib/lib/modules/source/vmnet-only/filter.c: In function ‘VNetFilter_HandleUserCall’:
/home/jason/raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce/vmware-server-distrib/lib/modules/source/vmnet-only/filter.c:1089: error: ‘filterIoctlSem’ undeclared (first use in this function)
/home/jason/raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce/vmware-server-distrib/lib/modules/source/vmnet-only/filter.c:1089: error: (Each undeclared identifier is reported only once
/home/jason/raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce/vmware-server-distrib/lib/modules/source/vmnet-only/filter.c:1089: error: for each function it appears in.)
make[2]: *** [/home/jason/raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce/vmware-server-distrib/lib/modules/source/vmnet-only/filter.o] Error 1
make[1]: *** [_module_/home/jason/raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce/vmware-server-distrib/lib/modules/source/vmnet-only] Error 2
make: *** [vmnet.ko] Error 2
There is a problem compiling the vmnet module after it was patched. :(

filter.c:82 is:
static DEFINE_SEMAPHORE(filterIoctlSem); /* serialize ioctl()s from user space

and filter.c:1089 is:
   retval = down_interruptible(&filterIoctlSem);

So it looks OK, but I don't know why the compile is failing. The DEFINE_SEMAPHORE looks like it was added by the ubuntu patch to the code.

jason@butters:~/raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce$ find . | xargs grep DEFINE_SEMAPHORE
./vmware-server-distrib/lib/modules/source/vsock-only/linux/af_vsock.c:static DEFINE_SEMAPHORE(registrationMutex);
Binary file ./vmware-server-distrib/lib/modules/source/vmnet-temp.tar matches
./vmware-server-distrib/lib/modules/source/vmnet-only/filter.c:static DEFINE_SEMAPHORE(filterIoctlSem); /* serialize ioctl()s from user space. */
./vmware-server-distrib/lib/modules/source/vmnet-only/driver.c:DEFINE_SEMAPHORE(vnetStructureSemaphore);
Binary file ./vmware-server-distrib/lib/modules/source/vmci-temp.tar matches
Binary file ./vmware-server-distrib/lib/modules/source/vsock-temp.tar matches
./vmware-server-distrib/lib/modules/source/vmci-only/include/compat_semaphore.h: #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
./vmware-server-2.0.2-203138-update.patch:+ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
./vmware-server-2.0.2-203138-update.patch:+DEFINE_SEMAPHORE(vnetStructureSemaphore);
./vmware-server-2.0.2-203138-update.patch:+static DEFINE_SEMAPHORE(filterIoctlSem); /* serialize ioctl()s from user space. */
./vmware-server-2.0.2-203138-update.patch:+static DEFINE_SEMAPHORE(registrationMutex);

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu linux-meta Edit question
Assignee:
No assignee Edit question
Solved by:
Jason Cwik
Solved:
2011-07-15
Last query:
2011-07-15
Last reply:
2011-07-15

You could extract the VMware-server-2.0.2-203138.x86_64.tar.gz file manually then run:

sudo ./vmware-install.pl

With the pwd being the folder containing vmware-install.pl. may help

Jason Cwik (13-jcsoz-k4) said : #2

No, using the default installer is even worse.

However, it has to do with the lack of DEFINE_SEMAPHORE in /usr/src/linux-headers*/include/linux/semaphore.h. Not sure when this was added/removed from the kernel headers, but if you add:

#define DEFINE_SEMAPHORE(name) \
        struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1)

to that header, it compiles and runs with the ubuntu patch.