简体   繁体   English

在Centos 7上安装vmware工作站10.0.1

[英]installation of vmware workstation 10.0.1 on Centos 7

I am attempting to install VMware workstation 10.0.1 on a new installation of CEntOS version 7 (kernel version 3.10.0). 我正在尝试在新安装的CEntOS版本7(内核版本3.10.0)上安装VMware工作站10.0.1。

I have copied the vmnet.tar file from /lib/vmware/modules/source to my home directory for debugging. 我已将vmnet.tar文件从/ lib / vmware / modules / source复制到我的主目录以进行调试。 The building of the vmnet module fails with the following error message: vmnet模块的构建失败,并显示以下错误消息:

/bin/make -j12 auto-build HEADER_DIR=/lib/modules/3.10.0-123.el7.x86_64/build/include CC=/bin/gcc IS_GCC_3=no
Using 2.6.x kernel build system.
/bin/make -C /lib/modules/3.10.0-123.el7.x86_64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/kernels/3.10.0-123.el7.x86_64'
  CC [M]  /home/******/junk/vmnet-only/filter.o
/home/******/junk/vmnet-only/filter.c:206:1: error: conflicting types for ‘VNetFilterHookFn’
VNetFilterHookFn (unsigned int hooknum,                 // IN:
^
/home/******/junk/vmnet-only/filter.c:64:18: note: previous declaration of ‘VNetFilterHookFn’ was here
static nf_hookfn VNetFilterHookFn;
                 ^
/home/******/junk/vmnet-only/filter.c:64:18: warning: ‘VNetFilterHookFn’ used but never defined [enabled by default]
/home/******/junk/vmnet-only/filter.c:206:1: warning: ‘VNetFilterHookFn’ defined but not used [-Wunused-function]
VNetFilterHookFn (unsigned int hooknum,                 // IN:
^ 
make[2]: *** [/home/******/junk/vmnet-only/filter.o] Error 1
make[1]: *** [_module_/home/******/junk/vmnet-only] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.10.0-123.el7.x86_64'
make: *** [vmnet.ko] Error 2

I've googled a bit, but I didn't find anything specific to WS 10.0.1, although I did find some patches for the installation of WS 10.0.3 but it appears that these patches would be ineffective for WS 10.0.1. 我已经用Google搜索了一下,但是我没有找到特定于WS 10.0.1的任何东西,尽管我确实找到了安装WS 10.0.3的一些补丁,但是这些补丁似乎对WS 10.0.1无效。 I believe this because the macro that they are modifying in the patch (KERNEL_VERSION) is no in the offending file, filter.c. 我相信这是因为他们正在补丁(KERNEL_VERSION)中修改的宏在有问题的文件filter.c中没有。

Anyone have a link to a solution to this problem. 任何人都有指向该问题的解决方案的链接。

Thanks! 谢谢!

I had a similar problem. 我有一个类似的问题。 Found this solution and worked: 找到此解决方案并工作:

cd /usr/lib/vmware/modules/source
tar -xvf vmnet.tar
cd vmnet-only
vi filter.c

Go to lines 206 and 259 and replace the string 转到第206和259行并替换字符串

#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)

By 通过

#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0)

Then: 然后:

cd ..
tar -uvf vmnet.tar vmnet-only
rm -rf vmnet-only

Then run vmware workstation again and it should be able to install the kernel modules. 然后再次运行vmware工作站,它应该能够安装内核模块。 Good luck! 祝好运!

user3910091 has the right answer. user3910091有正确的答案。 This also works on 10.0.3 on RHEL7. 这也适用于RHEL7上的10.0.3。 The strange thing is that it appears they patched this in 10.0.3, but their patch uses >= and the filter options are in the opposite order, but the same minor kernel version changes appear to fix it. 奇怪的是,他们似乎在10.0.3中对此进行了修补,但其修补程序使用的是> =,并且过滤器选项的顺序相反,但是似乎进行了相同的较小内核版本更改以解决此问题。

cd /usr/lib/vmware/modules/source
tar -xvf vmnet.tar
cd vmnet-only
vi filter.c

Go to around lines 206 and 259 and replace the string 转到第206和259行并替换字符串

#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)

By 通过

#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0)

Then: 然后:

cd ..
tar -uvf vmnet.tar vmnet-only
rm -rf vmnet-only

Then run /usr/bin/vmware again and it should be able to install the kernel modules. 然后再次运行/ usr / bin / vmware,它应该能够安装内核模块。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM