Solution to the problem that Linux cannot connect to the Internet in VMware after the computer shuts down unexpectedly

Solution to the problem that Linux cannot connect to the Internet in VMware after the computer shuts down unexpectedly

Problem description: The Linux system's network card file /etc/sysconfig/network-scripts/ifcfg-eth0 has been configured before, and the external network can be accessed normally relying on the NAT service. However, after the computer shut down unexpectedly, causing VMware to be forced to close, when I started VMware again, I found that I could not connect to the Linux in the virtual machine using the remote connection tool. In addition, when I pinged each other's IP addresses in cmd and the virtual machine, I found that they could not be pinged through and Linux could not access the external network.

Solution: There are two solutions found so far.

(1) After shutting down the Linux system, click the "Virtual Network Editor" button under the "Edit" option in the VMware menu bar, and then Figure 1 will appear. Click to restore the default configuration ( remember to do this after shutting down the Linux system, otherwise you cannot click ; sometimes opening this window will be very slow, so you can close it and then open it again).

Figure 1

After clicking the button above, the VMware software will automatically reinstall (uninstall and then install) the network adapter located in Windows, as shown in Figure 2.

Figure 2

This process requires waiting for 1 to 2 minutes (the specific time varies depending on the performance of the personal computer). Then, configure the IP address in ifcfg-eth0 under the same LAN according to the subnet IP address in NAT mode in Figure 1, and then you can ping the external network.

(2) There is no need to reset the VMware network. You only need to restart the four VMware-related services in the Task Manager (the Workstations Server corresponding to VMwareHostd is a shared service for VMware software and you don’t need to worry about it). ( Method 2 is recommended )

Specific steps: 1. Use the shortcut keys Ctrl+Shift+ESC to call out the Task Manager interface (of course, you can also right-click the taskbar on the desktop to open it, but the shortcut key is simpler), then select the last item "Services", and the interface shown in Figure 3 will appear.

Figure 3

It can be found that all services related to VMware have stopped working. This is probably because VMware was forced to shut down, causing these services to be abnormally shut down. Then, they cannot start automatically after VMware is started. Therefore, you need to manually right-click and "start" these services. Then you can magically find that the Linux system can connect to the external network normally again, as shown in Figure 4.

Figure 4

Summary: After VMware was accidentally forced to shut down, the related services could not be automatically opened when it was restarted, resulting in the Linux system using NAT service being unable to connect to the Internet. I feel that this is a "bad brother" of VMware. (Note: The VMware version number here is 10.0.0 build-1295980. We have not tested other versions for this problem.)

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • How to modify the default Python version when installing Python on Linux
  • Summary of methods to check whether the port is open in Linux
  • MySQL 8.0.15 installation and configuration graphic tutorial and password change under Linux
  • How to install Maven automatically in Linux continuous integration
  • Linux CentOS6.9 installation graphic tutorial under VMware
  • Solution to MySQL garbled code problem under Linux
  • Summary of methods for creating, listing, and deleting Docker containers on Linux
  • How to view available network interfaces in Linux
  • Linux system to view CPU, machine model, memory and other information
  • Solution to the failure of loading dynamic library when Linux program is running

<<:  Compilation process analysis of Remax framework for writing small programs using React (recommended)

>>:  MySQL paging performance exploration

Recommend

How to create a Pod in Kubernetes

Table of contents How to create a Pod? kubectl to...

Detailed explanation of MySQL string concatenation function GROUP_CONCAT

In the previous article, I wrote a cross-table up...

How to use the MySQL authorization command grant

The examples in this article run on MySQL 5.0 and...

Summary of Common Mistakes in Web Design

In the process of designing a web page, designers...

Websocket+Vuex implements a real-time chat software

Table of contents Preface 1. The effect is as sho...

Detailed explanation of how to configure static IP in Centos8

After installing centos 8, the following error wi...

Example code for implementing the wavy water ball effect using CSS

Today I learned a new CSS special effect, the wav...

js array fill() filling method

Table of contents 1. fill() syntax 2. Use of fill...

Complete MySQL Learning Notes

Table of contents MyISAM and InnoDB Reasons for p...

HTML table markup tutorial (4): border color attribute BORDERCOLOR

To beautify the table, you can set different bord...

Javascript Basics: Detailed Explanation of Operators and Flow Control

Table of contents 1. Operator 1.1 Arithmetic oper...

How to use Docker to limit container resources

Problem Peeping In the server, assuming that the ...

CSS position fixed left and right double positioning implementation code

CSS Position The position attribute specifies the...