VMware workstation virtual machine cannot be connected to the network solution

for later use.

The first step: first set up VMware's editor - virtual network editor, enable VMnet8, NAT mode, as shown in the following figure.

In fact, it is the default setting of VMware, and there is no need to change it. If you accidentally change it, click Restore default settings.

The second step: virtual machine settings - network adapter, set to NAT mode, as shown below.

In fact, it is also the default and does not need to be changed.

Step 3: Edit the network configuration file of the linux system.

In the /etc/sysconfig/network-scripts folder, edit the network card configuration file ifcfg-**, each system is different, depending on your own situation.

Change the content of the ifcfg-** file as shown below. The point is ONBOOT=yes.

For example, the command under centos7 system is as follows:

  cd /etc/sysconfig/network-scripts (find the network configuration files directory)

  vi ifcfg-ens33 (related settings of network ens33)

  service network restart

After setting the above operations, ping localhost in the root directory, as shown in the figure below, the network is successful.

 

Guess you like

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