VMWARE 7.14 ON LINUX KERNEL >=2.6.39 安装问题解决

自己编译新的内核后安装完毕vmware 7.1.4后启动编译模块的时候提示如下错误

Logging to /tmp/vmware-root/setup-3155.log
ERROR: modinfo: could not find module vmmon
ERROR: modinfo: could not find module vmnet
ERROR: modinfo: could not find module vmblock
ERROR: modinfo: could not find module vmci
ERROR: modinfo: could not find module vsock
ERROR: modinfo: could not find module vmmon
ERROR: modinfo: could not find module vmnet
ERROR: modinfo: could not find module vmblock
ERROR: modinfo: could not find module vmci
ERROR: modinfo: could not find module vsock
ERROR: modinfo: could not find module vmmon
ERROR: modinfo: could not find module vmnet
ERROR: modinfo: could not find module vmblock
ERROR: modinfo: could not find module vmci
ERROR: modinfo: could not find module vsock
ERROR: modinfo: could not find module vmmon
ERROR: modinfo: could not find module vmnet
ERROR: modinfo: could not find module vmblock
ERROR: modinfo: could not find module vmci
ERROR: modinfo: could not find module vsock
ERROR: modinfo: could not find module vmmon
ERROR: modinfo: could not find module vmnet
ERROR: modinfo: could not find module vmblock
ERROR: modinfo: could not find module vmci
ERROR: modinfo: could not find module vsock
ERROR: modinfo: could not find module vmmon
ERROR: modinfo: could not find module vmnet
ERROR: modinfo: could not find module vmblock
ERROR: modinfo: could not find module vmci
ERROR: modinfo: could not find module vsock
Stopping VMware services:
   VMware USB Arbitrator                                               done
   VM communication interface socket family                            done
   Virtual machine communication interface                             done
   Virtual machine monitor                                             done
   Blocking file system                                                done
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vmmon-only'
make -C /lib/modules/2.6.39/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
 MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-2.6.39'
  CC [M]  /tmp/vmware-root/modules/vmmon-only/linux/driver.o
/tmp/vmware-root/modules/vmmon-only/linux/driver.c:783:59: error: ‘SPIN_LOCK_UNLOCKED’ undeclared here (not in a function)
make[2]: *** [/tmp/vmware-root/modules/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-root/modules/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.39'
make: *** [vmmon.ko] Error 2

解决方法:

Linux Kernel2.6.39正式版已经发布好几天了,翅膀也自己编译了下,在Natty上运行的很好~唯一的问题就是VMware 7.14不能用了,创建模块的时候会提示Unable to build kernel module,由于VMware官方还没有发布新版来解决这个问题,所以我们只能自己动手,从kernel的方面来搞定啦~

下面是补丁的地址,点击这里下载patch

以下是patch的使用方法:
因为之后的操作需要root权限,所以先切到root用户比较方便)

1
sudo -i

1.进入模块源码所在的文件夹,解压所有tar档案

1
2
3
4
5
cd /usr/lib/vmware/modules/source
for file in*
do
tar xvf $file
done

2.应用patch(这里patch_path为patch文件所在的路径)

1
patch -p1 < /patch_path/vmware2.6.39fixed.patch

3.重新打包

1
2
3
4
5
for file in*-only
do
tar cvf `basename$file-only`.tar $file
done
rm -rf *-only

4.重新创建并读取模块

1
vmware-modconfig --console --install-all

好了,问题解决了

输入命令vmware

编译模块,成功。


你可能感兴趣的:(vmware,linux,File,Module,interface,patch)