~
~
:wq

Saturday, 17 April 2010

Installing vmware-server-2.0.2 in Ubuntu Lucid Lynx 10.04 LTS

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:

  1. install vmware-server
  2. 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...

  1. 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 guests

And 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.

Hacer que funcione vmware-server-2.0.2 en ubuntu 10.04 LTS lucid lynx

english version - all spanish posts

Pasos para la instalación de wmware-server-2.0.2 en Ubuntu 10.04 LTS lucid lynx

Hace ya un mes que uso la beta de lucid. Hoy he recordado que todavía no había probado vmware-server en este servidor así que vamos a ver que problemas encontramos.

Básicamente vamos a hacer lo mismo que para karmic:

  1. instalar vmware-server
  2. aplicar el parche de ubuntugeek

Pero además para conseguir que todo compile en un kernel 2.6.32 necesitaremos...

  1. modificar manualmente un par de ficheros más:

    vmnet-only/vnetUserListener.c
    vmci-only/linux/vmciKernelIf.c
    

Nota: al final de este post he añadido un comentario sobre las vmware-tools en máquinas virtuales Ubuntu Lucid 10.04 LTS

Os resumo el proceso paso a paso:

Necesitaremos un entorno de compilación básico para poder compilar los módulos de vmware; con el siguiente comando instalaremos todo los programas que vamos a necesitar así como sus dependencias:

~# aptitude update
~# aptitude -y install build-essential linux-headers-$(uname -r) psmisc

Descomprimimos el paquete de vmware-server para la instalación:

~# tar xvf VMware-server-2.0.2-203138.i386.tar.gz

Procedemos a realizar la instalación:

~# cd /tmp/vmware-server-distrib/
~# ./vmware-install.pl

Al llegar a la compilación de los módulos de vmware vemos que se produce el error de las últimas distribuciones:

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: se ingresa al directorio `/tmp/vmware-config0/vmmon-only'
make -C /lib/modules/2.6.32-21-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: se ingresa al directorio `/usr/src/linux-headers-2.6.32-21-generic'
  CC [M]  /tmp/vmware-config0/vmmon-only/linux/driver.o
In file included from /tmp/vmware-config0/vmmon-only/linux/driver.c:31:
/tmp/vmware-config0/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-config0/vmmon-only/./include/vmware.h:38,
                 from /tmp/vmware-config0/vmmon-only/linux/driver.c:99:
/tmp/vmware-config0/vmmon-only/./include/vm_basic_types.h:108:7: warning: "__FreeBSD__" is not defined
In file included from /tmp/vmware-config0/vmmon-only/./common/vmx86.h:32,
                 from /tmp/vmware-config0/vmmon-only/linux/driver.h:29,
                 from /tmp/vmware-config0/vmmon-only/linux/driver.c:101:
/tmp/vmware-config0/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-config0/vmmon-only/./include/compat_module.h:27,
                 from /tmp/vmware-config0/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-config0/vmmon-only/./include/vcpuset.h:103,
                 from /tmp/vmware-config0/vmmon-only/./include/modulecall.h:37,
                 from /tmp/vmware-config0/vmmon-only/./common/vmx86.h:33,
                 from /tmp/vmware-config0/vmmon-only/linux/driver.h:29,
                 from /tmp/vmware-config0/vmmon-only/linux/driver.c:101:
/tmp/vmware-config0/vmmon-only/./include/vm_atomic.h:329:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_atomic.h:333:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_atomic.h:401:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_atomic.h:407:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_atomic.h:506:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_atomic.h:595:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_atomic.h:684:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_atomic.h:773:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_atomic.h:775:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_atomic.h:860:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_atomic.h:862:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_atomic.h:945:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_atomic.h:947:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_atomic.h:1028:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_atomic.h:1030:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_atomic.h:1223:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_atomic.h:1227:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_atomic.h:1536:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_atomic.h:1663:7: warning: "_MSC_VER" is not defined
In file included from /tmp/vmware-config0/vmmon-only/./include/vm_basic_asm.h:46,
                 from /tmp/vmware-config0/vmmon-only/./include/rateconv.h:45,
                 from /tmp/vmware-config0/vmmon-only/./include/modulecall.h:40,
                 from /tmp/vmware-config0/vmmon-only/./common/vmx86.h:33,
                 from /tmp/vmware-config0/vmmon-only/linux/driver.h:29,
                 from /tmp/vmware-config0/vmmon-only/linux/driver.c:101:
/tmp/vmware-config0/vmmon-only/./include/vm_basic_asm_x86.h:62:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_basic_asm_x86.h:177:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_basic_asm_x86.h:346:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_basic_asm_x86.h:453:7: warning: "_MSC_VER" is not defined
In file included from /tmp/vmware-config0/vmmon-only/./include/vm_asm.h:43,
                 from /tmp/vmware-config0/vmmon-only/linux/driver.c:103:
/tmp/vmware-config0/vmmon-only/./include/vm_asm_x86.h:486:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_asm_x86.h:779:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_asm_x86.h:820:7: warning: "_MSC_VER" is not defined
/tmp/vmware-config0/vmmon-only/./include/vm_asm_x86.h:922:7: warning: "_MSC_VER" is not defined
In file included from /tmp/vmware-config0/vmmon-only/linux/driver.c:119:
/tmp/vmware-config0/vmmon-only/./common/hostif.h:53:7: warning: "WINNT_DDK" is not defined
/tmp/vmware-config0/vmmon-only/linux/driver.c: In function ‘LinuxDriverSyncCallOnEachCPU’:
/tmp/vmware-config0/vmmon-only/linux/driver.c:1423: error: too many arguments to function ‘smp_call_function’
/tmp/vmware-config0/vmmon-only/linux/driver.c: In function ‘LinuxDriver_Ioctl’:
/tmp/vmware-config0/vmmon-only/linux/driver.c:1987: error: ‘struct task_struct’ has no member named ‘euid’
/tmp/vmware-config0/vmmon-only/linux/driver.c:1987: error: ‘struct task_struct’ has no member named ‘uid’
/tmp/vmware-config0/vmmon-only/linux/driver.c:1988: error: ‘struct task_struct’ has no member named ‘fsuid’
/tmp/vmware-config0/vmmon-only/linux/driver.c:1988: error: ‘struct task_struct’ has no member named ‘uid’
/tmp/vmware-config0/vmmon-only/linux/driver.c:1989: error: ‘struct task_struct’ has no member named ‘egid’
/tmp/vmware-config0/vmmon-only/linux/driver.c:1989: error: ‘struct task_struct’ has no member named ‘gid’
/tmp/vmware-config0/vmmon-only/linux/driver.c:1990: error: ‘struct task_struct’ has no member named ‘fsgid’
/tmp/vmware-config0/vmmon-only/linux/driver.c:1990: error: ‘struct task_struct’ has no member named ‘gid’
/tmp/vmware-config0/vmmon-only/linux/driver.c:2007: error: too many arguments to function ‘smp_call_function’
make[2]: *** [/tmp/vmware-config0/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-config0/vmmon-only] Error 2
make[1]: se sale del directorio `/usr/src/linux-headers-2.6.32-21-generic'
make: *** [vmmon.ko] Error 2
make: se sale del directorio `/tmp/vmware-config0/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, esto nos suena bastante así que manos a la obra, descargamos e instalamos los parches de ubuntugeek:

~# cd /tmp/
~# 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

Pero sorpresa, acaba con errores:

[...]
/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

No nos desanimemos. Busquemos más información... Según Noel de vmware communities hay que parchear los ficheros:

vmnet-only/vnetUserListener.c
vmci-only/linux/vmciKernelIf.c

añadiendo un «#include "compat_sched.h"» en cada uno de ellos.

Como ya hemos enredado mucho restauramos los fuentes según nos indicaba la salida del primer intento:

~# cd /usr/lib/vmware/modules
~# rm -r source
~# mv source-backup source

ahora modificamos los ficheros de la siguiente forma (podríamos rehacer el parche pero es mas trabajo); empezamos con vnetUserListener.c:

~# cd source/
~# tar xvf vmnet.tar
~# vim vmnet-only/vnetUserListener.c

Entre el listado de includes añadimos «#include "compat_sched.h"» y volvemos a empaquetar el tar:

~# tar cvf vmnet.tar vmnet-only
~# rm -r vmnet-only

Ahora hacemos lo mismo con vmciKernelIf.c:

~# tar xvf vmci.tar
~# vim vmci-only/linux/vmciKernelIf.c

Volvemos a añadir un «#include "compat_sched.h"» entre el resto de includes y reempaquetamos el fichero tar:

~# tar cvf vmci.tar vmci-only/
~# rm -r vmci-only

Con esos cambios volvemos a ejecutar el parche descargado de ubuntugeek:

~# 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

Pues ya está casi; terminamos instalando los módulos:

~# /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.

Ya disponemos de nuevo de nuestro servidor vmware-server-2.0.2 en nuestro novísimo Ubuntu 10.04 Lucid Lynx

vmware-tools para máquinas virtuales ubuntu 10.04

¿Y que pasa con las vmware-tools en máquinas virtuales Ubuntu 10.04?

Seguramente la pregunta necesite un post nuevo; pero como seguro que tarde o temprano todos los que estáis interesados en este tema tendréis que abordarlo, lo añado aquí.

He tratado de instalar las vmware-tools en máquinas virtuales Ubuntu 10.04 pero me ha resultado imposible hacer que funcionen todos los módulos.

No perdáis el tiempo con las vmware tools oficiales. Hay un desfase enorme entre ellas y los kernels más nuevos.

En lugar de perder el tiempo con las vmware tools nativias utilizar la versión opensource. Podéis realizar la instalación como sigue:

~# apt-get update
~# apt-get install --no-install-recommends open-vm-tools open-vm-dkms

El --no-install-recommends es para evitar que se nos instalen librerías X11 en nuestras VMs tipo server (sin gui).

En caso de que vuestras VMs sean escritorios ejecutad:

~# apt-get update
~# apt-get install open-vm-tools open-vm-dkms

En vmware-server veréis que manteneis toda la funcionalidad que pudieráis tener con las vmware-tools nativas.