---
title: "CentOS 7 安装 VMware 10"
author: "MrLee23"
date: "2014-10-06T23:31:48Z"
tags: []
categories: ["操作系统"]
slug: "centos-7-vmware-10"
draft: false
lastmod: "2014-10-06T23:31:48Z"
id: 2124924
url: "https://mrlee23.iteye.com/blog/2124924"
---

在 CentOS 7 中安装 VMware 10.0.3之后无法正常工作，其实这主要是因为 CentOS 7 中的kernel为较低版本的kernel 3.10。

 

想运行vm需要有gcc ，kernel ，kernel-devel ，kernel-headers 这几个组件。

用仓库在线安装就可以yum install -y。

 

要想在 CentOS 7 中正常安装和运行 VMware 10.0.3必需执行如下步骤：

1.进行到/usr/lib/vmware/modules/source目录

```
cd /usr/lib/vmware/modules/source
```

2.解压vmnet.tar

```
tar -xvf vmnet.tar
```

3.进入到vmnet-only目录

```
cd vmnet-only
```

4.编辑filter.c文件

```
vi filter.c
```

将206行和259行的

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

替换为

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

5.回到上级目录

```
cd ../
```

6.重新压缩文件夹

```
tar -uvf vmnet.tar vmnet-only
```

7.移除旧目录

```
rm -fr vmnet-only
```

8.重新打开 VMware 即可