StatPress

Visits today: 157 | Visitors online: 4

Featured Link

ss_blog_claim=ec152a44465d66eceae54bf761587c4c ss_blog_claim=ec152a44465d66eceae54bf761587c4c

SEO Rank

VMWare Server 2: Unable to build the vsock module



If you encounter the following error after installing VMWare Server 2.0 RCx to Ubuntu:

Using 2.6.x kernel build system.
make: Entering directory `/root/tmp/vmware-config0/vsock-only'
make -C /lib/modules/2.6.24.4-desktop-1mnb/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-2.6.24.4-desktop-1mnb'
CC [M] /root/tmp/vmware-config0/vsock-only/linux/af_vsock.o
In file included from /root/tmp/vmware-config0/vsock-only/linux/af_vsock.c:92:
/root/tmp/vmware-config0/vsock-only/./include/compat_wait.h:64: error: conflicting types for ‘poll_initwait’
include/linux/poll.h:65: error: previous declaration of ‘poll_initwait’ was here
/root/tmp/vmware-config0/vsock-only/linux/af_vsock.c:260: warning: initialization from incompatible pointer type
/root/tmp/vmware-config0/vsock-only/linux/af_vsock.c: In function ‘__VSockVmciCreate’:
/root/tmp/vmware-config0/vsock-only/linux/af_vsock.c:1789: warning: passing argument 1 of ‘sk_alloc’ makes pointer from integer without a cast
/root/tmp/vmware-config0/vsock-only/linux/af_vsock.c:1789: warning: passing argument 3 of ‘sk_alloc’ makes integer from pointer without a cast
/root/tmp/vmware-config0/vsock-only/linux/af_vsock.c:1789: warning: passing argument 4 of ‘sk_alloc’ makes pointer from integer without a cast
make[2]: *** [/root/tmp/vmware-config0/vsock-only/linux/af_vsock.o] Error 1
make[1]: *** --_module_/root/tmp/vmware-config0/vsock-only-- Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.24.4-desktop-1mnb'
make: *** http://vsock.ko Error 2
make: Leaving directory `/root/tmp/vmware-config0/vsock-only'
Unable to build the vsock module.

fret not since there is a workaround to this. Although this is just a minor inconvenience and your VM will still run fine, you’ll better off fixing it. Read on

The problem is that the 2.6.24 kernel as packaged by Ubuntu 8.04 “hardy” changed how its source code provides certain information. This can be fixed by modifying the vsock module’s source code.

vsock = VM communication interface socket

  1. The first thing to do is to unpack the vsock source:
    $ tar xvf /usr/lib/vmware/modules/source/vsock.tar
  2. Change some of its auto-configuration.
    $ cd vsock-only
    $ sed -i 's/^\#include <linux\/autoconf\.h>//' autoconf/*.c
  3. The command above will traverse the autoconf folder and go through all the files that matches *.c and remove all lines that looks like:
    #include <linux/autoconf.h>
    these are part of the test file that the build system uses to figure out what features are available:
  4. Build the code:
    $ make
  5. Copy the driver over where VMware’s startup scripts can find it:
    $ sudo cp vsock.o /lib/modules/$(uname -r)/misc
    $ sudo ln -s vsock.o /lib/modules/$(uname -r)/misc/vsock.ko
  6. Create the dependency module so that the correct module dependencies will be available after booting the system
    $ sudo depmod -a
  7. Now shut down all your running VMs and restart VMware’s services:
    For Ubuntu/Debian
    $ sudo invoke-rc.d vmware restart
    or
    For Fedora/RedHat (or derivatives)
    $ sudo /sbin/service vmware restart
  8. Now the vsock driver should load up properly. Try entering http://localhost/ui/ in your favorite browser (I supposed it’s Firefox). Tested on Ubuntu 8.04 (Hardy Heron). Now get that virtual server running……

Related to This Post



Originally posted 2008-07-13 22:42:29.

Related posts:

  1. VMware ESXi: Free Hypervisor for everyone
  2. Linux Starter Pack: The Beginners Guide to All Things Open Source
  3. Singapore Ubuntu mirror
  4. How to play .asx file or stream mms in ubuntu
  5. rsync error: server sent "SSH-2.0-OpenSSH_4.3" rather than greeting
  6. Monitoring UNIX Application Performance

Related posts brought to you by Yet Another Related Posts Plugin.



15 comments to VMWare Server 2: Unable to build the vsock module

  • gary t.

    thank you for the fix, works flawless on my ubuntu hardy install….

    note: make sure you install the ubuntu dev tools to compile… i guess everybody knows this already

  • Sendhil

    Hi,
    Can you mention the actual build version of vmware on which this command worked? Mine isnt working still..I had vmware 2 build 84186. I’m downloading the latest version to see if that fixes the problem.
    Thanks
    Sendhil

  • the editor

    Hi Sendhil,

    I just upgraded to the latest version and this workaround fixed it.

    Try the latest version and let me know if you still have issues….

  • Gord J.

    Hallelujah!

    Thank you, sir. This got me up and running after a combined Ubuntu Desktop 8.10 / VMware Server 2.0 upgrade.

    Cheers!

    –Gord

  • TomB

    I’m using the newly-released Ubuntu 8.10, along with build 122956 of Vmware Server2, and these instructions worked. Eventually. I probably did something wrong, but I had to reboot the computer to get it to work (Windows habits die hard). Restarting the Vmware services didn’t do it for me.

    Others in the same situation might try that, too, and see if it works.

    For those who don’t already know, the vsock module is what allows your browser to access the vmware console. Without it, you can still use a VM if you’ve made a shortcut to it (on your desktop or whatever), but you can’t change any of the settings exposed by the console.

  • brendan

    YOU ROCK. Worked perfectly. I fat-fingered the “sed” command by hand and had issues compiling, but it worked fine when I started over and copy/pasted the sed command as you have it above.

    Thank you so much for posting this!

    -B

  • thierrybo

    Did not work for me (2.26.27-7 and 2.0.0-116503). As before trying this workaround, I can open http://localhost:8222/ui/ display the web interface but no content. The message bar display “loading” a long time, then all panes are empty.

    http://img373.imageshack.us/my.php?image=vmwareyl5.png

  • thierrybo

    Well, I just see the errors on vsock ware not the same as yours. It should explain whay it does not work :

    Using 2.6.x kernel build system.
    make: entrant dans le répertoire « /tmp/vmware-config0/vsock-only »
    make -C /lib/modules/2.6.27-7-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
    make[1]: entrant dans le répertoire « /usr/src/linux-headers-2.6.27-7-generic »
    CC [M] /tmp/vmware-config0/vsock-only/linux/af_vsock.o
    CC [M] /tmp/vmware-config0/vsock-only/linux/driverLog.o
    CC [M] /tmp/vmware-config0/vsock-only/linux/util.o
    /tmp/vmware-config0/vsock-only/linux/util.c: In function ‘VSockVmciLogPkt’:
    /tmp/vmware-config0/vsock-only/linux/util.c:157: attention : le format n’est pas une chaîne littérale et pas d’argument de format
    CC [M] /tmp/vmware-config0/vsock-only/linux/vsockAddr.o
    LD [M] /tmp/vmware-config0/vsock-only/vsock.o
    Building modules, stage 2.
    MODPOST 1 modules
    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!
    CC /tmp/vmware-config0/vsock-only/vsock.mod.o
    LD [M] /tmp/vmware-config0/vsock-only/vsock.ko
    make[1]: quittant le répertoire « /usr/src/linux-headers-2.6.27-7-generic »
    cp -f vsock.ko ./../vsock.o
    make: quittant le répertoire « /tmp/vmware-config0/vsock-only »
    Unable to make a vsock module that can be loaded in the running kernel:
    insmod: error inserting ‘/tmp/vmware-config0/vsock.o’: -1 Unknown symbol in module
    There is probably a slight difference in the kernel configuration between the
    set of C header files you specified and your running kernel. You may want to
    rebuild a kernel based on that directory, or specify another directory.

  • [...] fand auch eine Lösung für mein Problem: VMWare Server 2: Unable to build the vsock module : cd /usr/src/ tar xvf /usr/lib/vmware/modules/source/vsock.tar cd vsock-only sed -i ’s/^#include [...]

  • Toshiro

    Thanks a lot.
    I have changed:
    $ sudo ln -s vsock.o /lib/modules/$(uname -r)/misc/vsock.ko
    with:
    $ sudo ln -s /lib/modules/$(uname -r)/misc/vsock.o /lib/modules/$(uname -r)/misc/vsock.ko
    It’s a link and you may whant to remove the hold vsock-only directory.
    Bye

  • Brian

    Thanks, that fixed the problem on my Ubuntu Intrepid Ibex system.

  • pdwalker

    That fixed it for me.

    Thanks!

    If you update the vsock.tar file with your fixes, you can place the vsock.tar in /usr/lib/vmware-tools/modules/source so the vmware-config-tools.pl script can find it.

  • /*
    INSTALL:

    Put the patch named vsock-debian.patch in the directory where
    the VMWare file is and you can just paste this straight in a
    bash shell or into a file.

    #!/bin/bash
    tar -xzf VMware-server-2.0.1-156745.x86_64.tar.gz && \
    cd vmware-server-distrib/lib/modules/source && \
    tar -xf vsock.tar && patch -p1 < $OLDPWD/vsock-debian.patch && \
    tar -cf vsock.tar vsock-only && rm -rf vsock-only && \
    cd ../../ && sudo ./vmware-install.pl

    # End of script

    Have fun!

    Marcus Berglof <marcus ulug.org)

    */

    — ./vsock-only.orig/autoconf/cachecreate.c 2009-03-27 08:17:12.000000000 +0100
    +++ ./vsock-only/autoconf/cachecreate.c 2009-05-17 19:20:55.000000000 +0200
    @@ -16,7 +16,7 @@
    *
    *********************************************************/

    -#include
    +
    #include

    /*
    — ./vsock-only.orig/autoconf/epoll.c 2009-03-27 08:17:12.000000000 +0100
    +++ ./vsock-only/autoconf/epoll.c 2009-05-17 19:20:55.000000000 +0200
    @@ -22,7 +22,7 @@
    * never had it, but some distros backported epoll patch.
    */

    -#include
    +
    #include

    #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
    — ./vsock-only.orig/autoconf/filldir1.c 2009-03-27 08:17:12.000000000 +0100
    +++ ./vsock-only/autoconf/filldir1.c 2009-05-17 19:20:55.000000000 +0200
    @@ -16,7 +16,7 @@
    *
    *********************************************************/

    -#include
    +
    #include

    #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
    — ./vsock-only.orig/autoconf/geninclude.c 2009-03-27 08:17:12.000000000 +0100
    +++ ./vsock-only/autoconf/geninclude.c 2009-05-17 19:20:55.000000000 +0200
    @@ -16,7 +16,7 @@
    *
    *********************************************************/

    -#include
    +

    #ifdef CONFIG_X86_VOYAGER
    APATH/mach-voyager
    — ./vsock-only.orig/autoconf/getsb1.c 2009-03-27 08:17:12.000000000 +0100
    +++ ./vsock-only/autoconf/getsb1.c 2009-05-17 19:20:55.000000000 +0200
    @@ -16,7 +16,7 @@
    *
    *********************************************************/

    -#include
    +
    #include

    #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
    — ./vsock-only.orig/autoconf/setnice.c 2009-03-27 08:17:12.000000000 +0100
    +++ ./vsock-only/autoconf/setnice.c 2009-05-17 19:20:55.000000000 +0200
    @@ -20,7 +20,7 @@
    * set_user_nice appeared in 2.4.21. But some distros
    * backported it to older kernels.
    */
    -#include
    +
    #include

    #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 21)
    — ./vsock-only.orig/autoconf/sk_filter.c 2009-03-27 08:17:12.000000000 +0100
    +++ ./vsock-only/autoconf/sk_filter.c 2009-05-17 19:20:55.000000000 +0200
    @@ -23,7 +23,7 @@
    * This test will fail to build on kernels with the new interface.
    */

    -#include
    +
    #include

    /*
    — ./vsock-only.orig/autoconf/statfs1.c 2009-03-27 08:17:12.000000000 +0100
    +++ ./vsock-only/autoconf/statfs1.c 2009-05-17 19:20:55.000000000 +0200
    @@ -16,7 +16,7 @@
    *
    *********************************************************/

    -#include
    +
    #include

    #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)

  • Marcus Berglof

    Argh.. copy-n-paste from the web never works as intended.
    The patch is available at http://mina.fulhack.se/vsock-debian.patch

    /Marcus

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution.