bkpmind Just some notes

17Sep/110

vmware and the “several modules must be compiled…”

Sometimes vmware needs to compile some modules showing you a message "Before you can run vmware several modules must be compiled and loaded into the running kernel". This could happen just after you have installed it or after a kernel upgrade.

So, vmware try to build these modules automatically, but sometimes it can't.
(Of course, life isn't easy)

To solve this problem, I found the below script that must be executed by root user.

#!/bin/bash
cd
cp -prn /usr/lib/vmware/modules/source /usr/lib/vmware/modules/source-backup
mkdir fixed
cd fixed
find /usr/lib/vmware/modules/source -name "*.tar" -exec tar xf '{}' \;

## add missing header on kernels
sed -i '/#include "compat_wait.h"/a\#include "compat_sched.h"' vmnet-only/vnetUserListener.c
sed -i '/#include "compat_page.h"/a\#include "compat_sched.h"' vmci-only/include/pgtbl.h
## comment out an invalid definition
sed -i 's|\(extern void poll_initwait(compat_poll_wqueues \*);\)|//\1|' *-only/include/compat_wait.h

tar cf vmblock.tar vmblock-only
tar cf vmci.tar vmci-only
tar cf vmmon.tar vmmon-only
tar cf vmnet.tar vmnet-only
tar cf vmppuser.tar vmppuser-only
tar cf vsock.tar vsock-only

cp -p *.tar /usr/lib/vmware/modules/source

cd /lib/modules/`uname -r`/build/include/linux
ln -s ../generated/autoconf.h
ln -s ../generated/utsrelease.h
cd

vmware-modconfig --console --install-all

# clean up
cd
rm -rf fixed
cd /lib/modules/`uname -r`/build/include/linux
rm autoconf.h utsrelease.h
cd /usr/lib/vmware/modules/
rm -rf source-backup
cd

This was successfully executed in openSUSE 11.4 and the script's author was the malcolmlewis user from forums.opensuse.org. Thanks Malcolm!

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.