Tuesday, 3 June 2014

Unable to run VMware - Failed to build vmnet

Unable to run VMware - Failed to build vmnet 
(Modules Compile Error)

I updated my Ubuntu-based Laptop today to 14.04 (Trusty Tahr , Kernel version 3.13.0-27-generic).
and for some reason, my VMware Workstation 9.0.3 decided to drop me an error "Failed to build vmnet.  Failed to execute the build command."

Digging a bit on the net and with the help of THIS BLOG, it seemed the cause of this error was a failure in building a particular kernel module called "vmnet".

These modules are placed in the /usr/lib/vmware/modules/source/ directory. You need to extract the vmnet source file (vmnet.tar) and follow the steps described below:

Create a patch file named new_vmnet.patch in your home directory with the following content:

# vi new_vmnet.patch

> #else
> VNetFilterHookFn(const struct nf_hook_ops *ops,        // IN:
> #endif
<    transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
>       transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
>    #else
>       transmit = (ops->hooknum == VMW_NF_INET_POST_ROUTING);
>    #endif

Save the file and exit the editor.

Next, browse to the Modules folder:
# cd /usr/lib/vmware/modules/source

Untar the vmnet source module
# tar -xvf vmnet.tar
# cd vmnet-only

Run a patch to the file that we created in the earlier steps:
# patch vmnet-only/filter.c < ~/new_vmnet.patch

If you receive no errors during the patching process, then you can move on to the finishing steps:

Re-tar the modules
# tar -uvf vmnet.tar vmnet-only

Clean up the vmnet-only directory. We wont be needing this anymore. Just make sure you delete the
directory only; not the tar that we just created from the earlier step.
# rm -f vmnet-only

You can now give VMware Workstation a go and hopefully, it will start up just fine..

Download THIS FREE WHITE PAPER to Learn about VMware Virtual SAN (VSAN), its basic requirements, and how it works.. FOR FREE !!

Sponsored by: Global Knowledge®