Ubuntu – Unable to run VMware – Failed to build vmnet

13.1064-bitvmware

I am unable to run vmware and below is the error log as to why.

Any idea, though and suggestions are appreciated. Thank you.

2014-02-03T16:32:00.904+08:00| vthread-3| I120: Log for VMware Workstation pid=5707 version=10.0.1 build=build-1379776 option=Release
2014-02-03T16:32:00.904+08:00| vthread-3| I120: The process is 64-bit.
2014-02-03T16:32:00.904+08:00| vthread-3| I120: Host codepage=UTF-8 encoding=UTF-8
2014-02-03T16:32:00.904+08:00| vthread-3| I120: Host is Linux 3.13.0-031300-generic Ubuntu 13.10
2014-02-03T16:32:00.903+08:00| vthread-3| I120: Msg_Reset:
2014-02-03T16:32:00.903+08:00| vthread-3| I120: [msg.dictionary.load.openFailed] Cannot open file "/usr/lib/vmware/settings": No such file or directory.
2014-02-03T16:32:00.903+08:00| vthread-3| I120: ----------------------------------------
2014-02-03T16:32:00.903+08:00| vthread-3| I120: PREF Optional preferences file not found at /usr/lib/vmware/settings. Using default values.
2014-02-03T16:32:00.904+08:00| vthread-3| I120: Msg_Reset:
2014-02-03T16:32:00.904+08:00| vthread-3| I120: [msg.dictionary.load.openFailed] Cannot open file "/root/.vmware/config": No such file or directory.
2014-02-03T16:32:00.904+08:00| vthread-3| I120: ----------------------------------------
2014-02-03T16:32:00.904+08:00| vthread-3| I120: PREF Optional preferences file not found at /root/.vmware/config. Using default values.
2014-02-03T16:32:00.904+08:00| vthread-3| I120: PREF Unable to check permissions for preferences file.
2014-02-03T16:32:00.904+08:00| vthread-3| I120: Msg_Reset:
2014-02-03T16:32:00.904+08:00| vthread-3| I120: [msg.dictionary.load.openFailed] Cannot open file "/root/.vmware/preferences": No such file or directory.
2014-02-03T16:32:00.904+08:00| vthread-3| I120: ----------------------------------------
2014-02-03T16:32:00.904+08:00| vthread-3| I120: PREF Failed to load user preferences.
2014-02-03T16:32:00.904+08:00| vthread-3| W110: Logging to /tmp/vmware-root/vmware-modconfig-5707.log
2014-02-03T16:32:00.935+08:00| vthread-3| I120: Obtaining info using the running kernel.
2014-02-03T16:32:00.935+08:00| vthread-3| I120: Created new pathsHash.
2014-02-03T16:32:00.935+08:00| vthread-3| I120: Setting header path for 3.13.0-031300-generic to "/lib/modules/3.13.0-031300-generic/build/include".
2014-02-03T16:32:00.935+08:00| vthread-3| I120: Validating path "/lib/modules/3.13.0-031300-generic/build/include" for kernel release "3.13.0-031300-generic".
2014-02-03T16:32:00.935+08:00| vthread-3| I120: using /usr/bin/gcc for preprocess check
2014-02-03T16:32:00.950+08:00| vthread-3| I120: Preprocessed UTS_RELEASE, got value "3.13.0-031300-generic".
2014-02-03T16:32:00.950+08:00| vthread-3| I120: The header path "/lib/modules/3.13.0-031300-generic/build/include" for the kernel "3.13.0-031300-generic" is valid.  Whoohoo!
2014-02-03T16:32:01.198+08:00| vthread-3| I120: Reading in info for the vmmon module.
2014-02-03T16:32:01.198+08:00| vthread-3| I120: Reading in info for the vmnet module.
2014-02-03T16:32:01.198+08:00| vthread-3| I120: Reading in info for the vmblock module.
2014-02-03T16:32:01.198+08:00| vthread-3| I120: Reading in info for the vmci module.
2014-02-03T16:32:01.198+08:00| vthread-3| I120: Reading in info for the vsock module.
2014-02-03T16:32:01.198+08:00| vthread-3| I120: Setting vsock to depend on vmci.
2014-02-03T16:32:01.198+08:00| vthread-3| I120: Invoking modinfo on "vmmon".
2014-02-03T16:32:01.203+08:00| vthread-3| I120: "/sbin/modinfo" exited with status 0.
2014-02-03T16:32:01.203+08:00| vthread-3| I120: Invoking modinfo on "vmnet".
2014-02-03T16:32:01.210+08:00| vthread-3| I120: "/sbin/modinfo" exited with status 256.
2014-02-03T16:32:01.210+08:00| vthread-3| I120: Invoking modinfo on "vmblock".
2014-02-03T16:32:01.214+08:00| vthread-3| I120: "/sbin/modinfo" exited with status 256.
2014-02-03T16:32:01.215+08:00| vthread-3| I120: Invoking modinfo on "vmci".
2014-02-03T16:32:01.220+08:00| vthread-3| I120: "/sbin/modinfo" exited with status 256.
2014-02-03T16:32:01.220+08:00| vthread-3| I120: Invoking modinfo on "vsock".
2014-02-03T16:32:01.225+08:00| vthread-3| I120: "/sbin/modinfo" exited with status 0.
2014-02-03T16:32:01.252+08:00| vthread-3| I120: to be installed: vmnet status: 0
2014-02-03T16:32:01.273+08:00| vthread-3| I120: Obtaining info using the running kernel.
2014-02-03T16:32:01.273+08:00| vthread-3| I120: Setting header path for 3.13.0-031300-generic to "/lib/modules/3.13.0-031300-generic/build/include".
2014-02-03T16:32:01.273+08:00| vthread-3| I120: Validating path "/lib/modules/3.13.0-031300-generic/build/include" for kernel release "3.13.0-031300-generic".
2014-02-03T16:32:01.273+08:00| vthread-3| I120: using /usr/bin/gcc for preprocess check
2014-02-03T16:32:01.289+08:00| vthread-3| I120: Preprocessed UTS_RELEASE, got value "3.13.0-031300-generic".
2014-02-03T16:32:01.289+08:00| vthread-3| I120: The header path "/lib/modules/3.13.0-031300-generic/build/include" for the kernel "3.13.0-031300-generic" is valid.  Whoohoo!
2014-02-03T16:32:01.528+08:00| vthread-3| I120: Kernel header path retrieved from FileEntry: /lib/modules/3.13.0-031300-generic/build/include
2014-02-03T16:32:01.528+08:00| vthread-3| I120: Update kernel header path to /lib/modules/3.13.0-031300-generic/build/include
2014-02-03T16:32:01.528+08:00| vthread-3| I120: Validating path "/lib/modules/3.13.0-031300-generic/build/include" for kernel release "3.13.0-031300-generic".
2014-02-03T16:32:01.528+08:00| vthread-3| I120: using /usr/bin/gcc for preprocess check
2014-02-03T16:32:01.542+08:00| vthread-3| I120: Preprocessed UTS_RELEASE, got value "3.13.0-031300-generic".
2014-02-03T16:32:01.542+08:00| vthread-3| I120: The header path "/lib/modules/3.13.0-031300-generic/build/include" for the kernel "3.13.0-031300-generic" is valid.  Whoohoo!
2014-02-03T16:32:01.546+08:00| vthread-3| I120: Found compiler at "/usr/bin/gcc"
2014-02-03T16:32:01.553+08:00| vthread-3| I120: Got gcc version "4.8".
2014-02-03T16:32:01.553+08:00| vthread-3| I120: GCC minor version 4 does not match Kernel GCC minor version 4.  But that is ok.
2014-02-03T16:32:01.553+08:00| vthread-3| I120: Using user supplied compiler "/usr/bin/gcc".
2014-02-03T16:32:01.562+08:00| vthread-3| I120: Got gcc version "4.8".
2014-02-03T16:32:01.563+08:00| vthread-3| I120: GCC minor version 4 does not match Kernel GCC minor version 4.  But that is ok.
2014-02-03T16:32:01.572+08:00| vthread-3| I120: Trying to find a suitable PBM set for kernel "3.13.0-031300-generic".
2014-02-03T16:32:01.572+08:00| vthread-3| I120: No matching PBM set was found for kernel "3.13.0-031300-generic".
2014-02-03T16:32:01.573+08:00| vthread-3| I120: GCC minor version 4 does not match Kernel GCC minor version 4.  But that is ok.
2014-02-03T16:32:01.573+08:00| vthread-3| I120: Validating path "/lib/modules/3.13.0-031300-generic/build/include" for kernel release "3.13.0-031300-generic".
2014-02-03T16:32:01.573+08:00| vthread-3| I120: using /usr/bin/gcc for preprocess check
2014-02-03T16:32:01.587+08:00| vthread-3| I120: Preprocessed UTS_RELEASE, got value "3.13.0-031300-generic".
2014-02-03T16:32:01.588+08:00| vthread-3| I120: The header path "/lib/modules/3.13.0-031300-generic/build/include" for the kernel "3.13.0-031300-generic" is valid.  Whoohoo!
2014-02-03T16:32:02.909+08:00| vthread-3| I120: GCC minor version 4 does not match Kernel GCC minor version 4.  But that is ok.
2014-02-03T16:32:02.910+08:00| vthread-3| I120: Validating path "/lib/modules/3.13.0-031300-generic/build/include" for kernel release "3.13.0-031300-generic".
2014-02-03T16:32:02.910+08:00| vthread-3| I120: using /usr/bin/gcc for preprocess check
2014-02-03T16:32:02.929+08:00| vthread-3| I120: Preprocessed UTS_RELEASE, got value "3.13.0-031300-generic".
2014-02-03T16:32:02.929+08:00| vthread-3| I120: The header path "/lib/modules/3.13.0-031300-generic/build/include" for the kernel "3.13.0-031300-generic" is valid.  Whoohoo!
2014-02-03T16:32:02.929+08:00| vthread-3| I120: Using temp dir "/tmp".
2014-02-03T16:32:02.974+08:00| vthread-3| I120: Obtaining info using the running kernel.
2014-02-03T16:32:02.974+08:00| vthread-3| I120: Setting header path for 3.13.0-031300-generic to "/lib/modules/3.13.0-031300-generic/build/include".
2014-02-03T16:32:02.974+08:00| vthread-3| I120: Validating path "/lib/modules/3.13.0-031300-generic/build/include" for kernel release "3.13.0-031300-generic".
2014-02-03T16:32:02.974+08:00| vthread-3| I120: using /usr/bin/gcc for preprocess check
2014-02-03T16:32:02.995+08:00| vthread-3| I120: Preprocessed UTS_RELEASE, got value "3.13.0-031300-generic".
2014-02-03T16:32:02.995+08:00| vthread-3| I120: The header path "/lib/modules/3.13.0-031300-generic/build/include" for the kernel "3.13.0-031300-generic" is valid.  Whoohoo!
2014-02-03T16:32:03.237+08:00| vthread-3| I120: Invoking modinfo on "vmnet".
2014-02-03T16:32:03.245+08:00| vthread-3| I120: "/sbin/modinfo" exited with status 256.
2014-02-03T16:32:06.212+08:00| vthread-3| I120: Setting destination path for vmnet to "/lib/modules/3.13.0-031300-generic/misc/vmnet.ko".
2014-02-03T16:32:06.241+08:00| vthread-3| I120: Extracting the vmnet source from "/usr/lib/vmware/modules/source/vmnet.tar".
2014-02-03T16:32:06.370+08:00| vthread-3| I120: Successfully extracted the vmnet source.
2014-02-03T16:32:06.370+08:00| vthread-3| I120: Building module with command "/usr/bin/make -j2 -C /tmp/modconfig-mjoI0c/vmnet-only auto-build HEADER_DIR=/lib/modules/3.13.0-031300-generic/build/include CC=/usr/bin/gcc IS_GCC_3=no"
2014-02-03T16:32:19.531+08:00| vthread-3| W110: Failed to build vmnet.  Failed to execute the build command.

Best Answer

I was able to fix the issue for 3.13 kernel using this solution.

Author advises to patch vmnet sources:

Create file vmnet313.patch in your home directory with the following content:

205a206
> #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
206a208,210
> #else
> VNetFilterHookFn(const struct nf_hook_ops *ops,        // IN:
> #endif
255c259,263
<    transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
---
>    #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
>       transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
>    #else
>       transmit = (ops->hooknum == VMW_NF_INET_POST_ROUTING);
>    #endif

Alternatively download this patch to your home directory and rename it to vmnet313.patch. For example:

wget "http://pastebin.com/raw.php?i=p3bkbAMu" -O vmnet313.patch

Next, execute following commands:

# Change directory into the vmware module source directory
cd /usr/lib/vmware/modules/source
# untar the vmnet modules
tar -xvf vmnet.tar
# run a the patch you should have just saved earlier
patch vmnet-only/filter.c < ~/vmnet313.patch
# re-tar the modules
tar -uvf vmnet.tar vmnet-only
# delete the previous working directory
rm -r vmnet-only
# run the vmware module build program. (alternatively just run the GUI app)
/usr/lib/vmware/bin/vmware-modconfig --console --install-all

The last command (or vmplayer) should now run successfully.