Install VMware Station 12.5 on Linux CentOS 7.4

I remember a long time ago, I like to buy all kinds of computer books, want to learn a good skill. But just can't understand. For example, when I saw someone writing an article about installing VMware, I couldn't help but ask: Why do you want to install that thing? However, when many people write these contents, they do not think about what to write at all. Why? To be forced.

But I want to talk about it here, why I want to install this thing. I took Danet's Linux RHCE Red Hat Engineer Certification exam prep class. The test environment is a real computer + two simulated servers. If you don't simulate two servers, each person will take up three computers to take the exam, and the exam fee will definitely be more expensive. It is very expensive now.

So, in order to save money, I used a program to simulate the other two servers (you can also think of it as a "computer", in fact, it is a little bit of a computer).

Then why do you have to have three servers (one true and two false) to take the test? Because the content we want to test is the knowledge that a network engineer must master, it must be tested in a network environment. Otherwise, wouldn't it be cheaper for us to take a stand-alone exam? Just like the driver's license test before, you can get a driver's license with only one ignition test and parking at a fixed point. too easy. will kill people.

After talking for a long time, I haven't said why I want to install this thing. There are computers in the training school that can be used. But, you can't always go there to practice, can you? Training schools will be very unhappy. Also, if I want to practice in the middle of the night, they have already locked the door after get off work, what should I do? So, you have to have it in your own home. My laptop has only 4G of RAM. The teacher said that the program itself needs 4G memory. Certainly not. I don't have the money to buy a new computer. However, several old servers in my house, IBM x3650 series, all have 16G memory. So, I did the following:

1. Go to centos.org to download minimal ISO, 64-bit version 7.4. Thanks to friends in the open source world and Alibaba Cloud for providing download mirrors. Of course there are other companies and universities that also offer mirrors. I think, since I also buy a few Alibaba Cloud servers every year, I can feel at ease using their services for free, right?

2. Right-click the CD image file CentOS-7-x86_64-Minimal-1708.iso, and burn the CD image to the CD-ROM drive. The computer is Windows 10, and this burning software comes with it. The software decompresses the ISO into a number of directories and files. Therefore, it cannot be directly dragged to the CD-ROM drive, and the "CD Image Burning" software must be used. Now, there is also a way to burn the ISO file to a USB flash drive, you can give it a try.

3. Insert the burnt CD into the CD-ROM drive on the IBM server, power on, and start. During startup, choose to boot from CD-ROM.

4. Install centos 7. Of course, after the completion, it is inevitable to modify the network card URL, mask and gateway, modify /etc/resolv.conf, set up a domain name resolution server, and let this server access the Internet. Otherwise, you will not be able to access the Internet and will not be able to perform subsequent operations.

The main commands used are as follows:

systemctl con show, see which network cards are there, mine has 4

systemctl con modify "eno2" ipv4.......

vi /etc/resolv.conf, add a resolution server like nameserver 8.8.8.8

systemctl restart network, restart the network

I'll write this later when I have time. I guess everyone will.

5. When installing the U disk, it is prompted that the NTFS format is not recognized, install fuse and ntfs-3g

yum install ntfs-3g fuse

As a result, fuse was installed, ntfs-3g was not installed, and it was not found. So download manually:

mkdir /home/vmware, create a directory named vmware under /home. This has been done directly before, without explanation. As a rookie, I have to ponder for a long time. Is this a shrimp order?

cd /home/vmware, go to that directory

wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/n/ntfs-3g-2017.3.23-1.el7.x86_64.rpm

rpm -ivh ntfs-3g-2017.3.23-1.el7.x86_64.rpm

6. There is no X Window in the minimal installation, so I need to install the GUI. According to the guide of the universal netizen, I installed it like this

yum group list

Saw some information like this:

Loaded plugins: fastestmirror
There is no installed groups file.
Maybe run: yum groups mark convert (see man yum)
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.shu.edu.cn
 * updates: ftp.sjtu.edu.cn
Available Environment Groups:
   Minimal Install
   Compute Node
   Infrastructure Server
   File and Print Server
   Basic Web Server
   Virtualization Host
   Server with GUI
   GNOME Desktop
   KDE Plasma Workspaces
   Development and Creative Workstation
Available Groups:
   Compatibility Libraries
   Console Internet Tools
   Development Tools
   Graphical Administration Tools
   Legacy UNIX Compatibility
   Scientific Support
   Security Tools
   Smart Card Support
   System Administration Tools
   System Management
Done

Then, install the red group

yum -y groupinstall "Server with GUI"

Start X Window

startx

It was an instant success!

In fact, I also went through two hours of stupid twists and turns. The reason is that I put the server in the study, I sit in the bedroom with a laptop, and connect to the server through PuTTy to operate. I didn't realize this, always running the startx command on the PuTTy terminal, there must be something wrong. The correct way is to go directly to the server room and connect a monitor to the server. You can see that the X Window graphical interface is fully activated!

Next, install VMware.

Where did the installed programs come from? Copied from the training school. A configured server snapshot (screenshot), placed in a folder. One is an installer named VMware-Workstation-Full-12.5.0.x86_64.bundle.

Installed VMware Station 12.5 on Linux CentOS 7.4 and got an error. If you copy this program to a directory or path called /home/vmware. At once

cd /home/vmware

Then run the following command:

./VMware-Workstation-Full-12.5.0.x86_64.bundle 

"./" stands for under the current path. Of course, you can also do this:

/home/vmware/VMware-Workstation-Full-12.5.0.x86_64.bundle

After entering, there are a lot of things running up on the screen, you don't need to pay attention to them. That's how I do it. As a result, there is a prompt saying that the Kernel Header is not installed.

kernel-headers-3.10.0-693.el7.x86_64.rpm were not found...

How to do? Install it. There is a general command that works regardless of your kernel version.

yum install "kernel-devel-uname-r == $(uname -r)"

good, very good. But when it starts up, an error occurs. The prompt that appeared said that I should go to /tmp/vmware-root to see a log file named vmware-18801.log . Of course, this number displayed by different machines is different. Open that log, it's like this.

2018-03-09T08:07:27.986-05:00| vthread-4| I125: Log for VMware Workstation pid=18801 version=12.5.0 build=build-4352439 option=Release
2018-03-09T08:07:27.986-05:00| vthread-4| I125: The process is 64-bit.
2018-03-09T08:07:27.986-05:00| vthread-4| I125: Host codepage=UTF-8 encoding=UTF-8
2018-03-09T08:07:27.986-05:00| vthread-4| I125: Host is Linux 3.10.0-693.el7.x86_64 CentOS Linux release 7.4.1708 (Core)
2018-03-09T08:07:27.986-05:00| vthread-4| I125: DictionaryLoad: Cannot open file "/usr/lib/vmware/settings": No such file or directory.
2018-03-09T08:07:27.986-05:00| vthread-4| I125: PREF Optional preferences file not found at /usr/lib/vmware/settings. Using default values.
2018-03-09T08:07:27.986-05:00| vthread-4| I125: DictionaryLoad: Cannot open file "/root/.vmware/config": No such file or directory.
2018-03-09T08:07:27.986-05:00| vthread-4| I125: PREF Optional preferences file not found at /root/.vmware/config. Using default values.
2018-03-09T08:07:27.986-05:00| vthread-4| I125: PREF Unable to check permissions for preferences file.
2018-03-09T08:07:27.986-05:00| vthread-4| I125: DictionaryLoad: Cannot open file "/root/.vmware/preferences": No such file or directory.
2018-03-09T08:07:27.986-05:00| vthread-4| I125: PREF Failed to load user preferences.
2018-03-09T08:07:27.991-05:00| vthread-4| W115: Logging to /tmp/vmware-root/vmware-18801.log
2018-03-09T08:07:27.999-05:00| vthread-4| I125: Obtaining info using the running kernel.
2018-03-09T08:07:27.999-05:00| vthread-4| I125: Created new pathsHash.
2018-03-09T08:07:27.999-05:00| vthread-4| I125: Setting header path for 3.10.0-693.el7.x86_64 to "/lib/modules/3.10.0-693.el7.x86_64/build/include".
2018-03-09T08:07:27.999-05:00| vthread-4| I125: Validating path "/lib/modules/3.10.0-693.el7.x86_64/build/include" for kernel release "3.10.0-693.el7.x86_64".
2018-03-09T08:07:27.999-05:00| vthread-4| I125: Failed to find /lib/modules/3.10.0-693.el7.x86_64/build/include/linux/version.h
2018-03-09T08:07:27.999-05:00| vthread-4| I125: /lib/modules/3.10.0-693.el7.x86_64/build/include/linux/version.h not found, looking for generated/uapi/linux/version.h instead.
2018-03-09T08:07:27.999-05:00| vthread-4| I125: using /bin/gcc for preprocess check
2018-03-09T08:07:28.033-05:00| vthread-4| I125: Preprocessed UTS_RELEASE, got value "3.10.0-693.el7.x86_64".
2018-03-09T08:07:28.033-05:00| vthread-4| I125: The header path "/lib/modules/3.10.0-693.el7.x86_64/build/include" for the kernel "3.10.0-693.el7.x86_64" is valid.  Whoohoo!
2018-03-09T08:07:28.173-05:00| vthread-4| I125: found symbol version file /lib/modules/3.10.0-693.el7.x86_64/build/Module.symvers
2018-03-09T08:07:28.173-05:00| vthread-4| I125: Reading symbol versions from /lib/modules/3.10.0-693.el7.x86_64/build/Module.symvers.
2018-03-09T08:07:28.193-05:00| vthread-4| I125: Read 16054 symbol versions
2018-03-09T08:07:28.194-05:00| vthread-4| I125: Reading in info for the vmmon module.
2018-03-09T08:07:28.194-05:00| vthread-4| I125: Reading in info for the vmnet module.
2018-03-09T08:07:28.194-05:00| vthread-4| I125: Reading in info for the vmblock module.
2018-03-09T08:07:28.194-05:00| vthread-4| I125: Reading in info for the vmci module.
2018-03-09T08:07:28.194-05:00| vthread-4| I125: Reading in info for the vsock module.
2018-03-09T08:07:28.194-05:00| vthread-4| I125: Setting vsock to depend on vmci.
2018-03-09T08:07:28.194-05:00| vthread-4| I125: Invoking modinfo on "vmmon".
2018-03-09T08:07:28.197-05:00| vthread-4| I125: "/sbin/modinfo" exited with status 256.
2018-03-09T08:07:28.197-05:00| vthread-4| I125: Invoking modinfo on "vmnet".
2018-03-09T08:07:28.199-05:00| vthread-4| I125: "/sbin/modinfo" exited with status 256.
2018-03-09T08:07:28.199-05:00| vthread-4| I125: Invoking modinfo on "vmblock".
2018-03-09T08:07:28.202-05:00| vthread-4| I125: "/sbin/modinfo" exited with status 256.
2018-03-09T08:07:28.202-05:00| vthread-4| I125: Invoking modinfo on "vmci".
2018-03-09T08:07:28.204-05:00| vthread-4| I125: "/sbin/modinfo" exited with status 256.
2018-03-09T08:07:28.204-05:00| vthread-4| I125: Invoking modinfo on "vsock".
2018-03-09T08:07:28.208-05:00| vthread-4| I125: "/sbin/modinfo" exited with status 0.
2018-03-09T08:07:28.219-05:00| vthread-4| I125: to be installed: vmmon status: 0
 

Use /systemctl status vmware to view the running status, the following error will appear:

Module vmmon loaded
Module vmnet not loaded

To use systemctl status vmware.service, the following error message appears:

systemctl status vmware.service
● vmware.service - SYSV: This service starts and stops VMware services
   Loaded: loaded (/etc/rc.d/init.d/vmware; bad; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2018-03-11 10:35:20 EDT; 42s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 5996 ExecStart=/etc/rc.d/init.d/vmware start (code=exited, status=1/FAILURE)
   CGroup: /system.slice/vmware.service
           ├─1715 /usr/lib/vmware/bin/vmware-vmblock-fuse -o subtype=vmware-vmblock,default_permissions,allow_other /var/run/vmblock-fuse
           └─1744 /usr/sbin/vmware-authdlauncher

Mar 11 10:35:20 localhost vmware[5996]: Virtual machine monitor[  OK  ]
Mar 11 10:35:20 localhost vmware[5996]: Virtual machine communication interface[  OK  ]
Mar 11 10:35:20 localhost vmware[5996]: VM communication interface socket family[  OK  ]
Mar 11 10:35:20 localhost vmware[5996]: Blocking file system[  OK  ]
Mar 11 10:35:20 localhost vmware[5996]: Virtual ethernet[FAILED]
Mar 11 10:35:20 localhost vmware[5996]: VMware Authentication Daemon[  OK  ]
Mar 11 10:35:20 localhost systemd[1]: vmware.service: control process exited, code=exited status=1
Mar 11 10:35:20 localhost systemd[1]: Failed to start SYSV: This service starts and stops VMware services.
Mar 11 10:35:20 localhost systemd[1]: Unit vmware.service entered failed state.
Mar 11 10:35:20 localhost systemd[1]: vmware.service failed.

Some people say that it is a problem with CentOS 7.4 and needs a patch. On this page (https://wiki.centos.org/Manuals/ReleaseNotes/CentOS7), you search for vmware and you see this line:

In VMware, building the vmnet.ko kernel module fails. There is a patch to fix this. See their post for details.

Clicking on that POST opens a solution:

URL: https://communities.vmware.com/message/2686431?tstart=0#2686431

Patch: https://communities.vmware.com/servlet/JiveServlet/download/2686431-179601/VMware-Workstation-12.5.7-vmnet-RHEL74.patch.zip

The solution is to copy /usr/lib/modules/source/vmnet.tar to a place, decompress it, apply a patch, and then modify it. I am a rookie, writing to the rookies, I do this:

systemctl stop vmware, stop it first

mkdir /home/vmnet-fix creates a separate directory  

cd /home/vmnet-fix into that separate directory

cp /usr/lib/vmware/modules/source/vmnet.tar ./vmnet-12.5.7.tar Copy the package to be patched

wget https://communities.vmware.com/servlet/JiveServlet/download/2686431-179601/VMware-Workstation-12.5.7-vmnet-RHEL74.patch.zip Download the patch to the current directory

tar xf vmnet-12.5.7.tar Unzip to the current directory, a vmnet-only directory will appear

unzip VMware-Workstation-12.5.7-vmnet-RHEL74.patch.zip Unzip the patch to the current directory, there will be a directory named VMware-Workstation-12.5.7-vmnet-RHEL74.patch
patch -p0 < ./VMware -Workstation-12.5.7-vmnet-RHEL74.patch patch
tar cf vmnet.tar vmnet-only/
cp vmnet.tar /usr/lib/vmware/modules/source/vmnet.tar replace the original package

vmware-modconfig --console --install-all, reinstall the configuration file

systemctl start vmware

I installed 12.5.0, not 12.5.7 as the great god said, but it's the same. That's it, all right.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324440923&siteId=291194637