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

Detailed steps to configure MySQL remote connection under Alibaba Cloud

Preface As we all know, by default, the MySQL ins...

Using CSS3 to create header animation effects

Netease Kanyouxi official website (http://kanyoux...

Summary of basic operations for MySQL beginners

Library Operations Query 1.SHOW DATABASE; ----Que...

JavaScript Dom implements the principle and example of carousel

If we want to make a carousel, we must first unde...

Vue realizes web online chat function

This article example shares the specific code of ...

Detailed explanation of MySQL 8.0.18 commands

Open the folder C:\web\mysql-8.0.11 that you just...

Alibaba Cloud Server Ubuntu Configuration Tutorial

Since Alibaba Cloud's import of custom Ubuntu...

Example code for implementing transparent gradient effects with CSS

The title images on Zhihu Discovery columns are g...

Centos7 mysql database installation and configuration tutorial

1. System environment The system version after yu...

Example analysis of interval calculation of mysql date and time

This article uses an example to describe the inte...

Detailed use cases of MySql escape

MySQL escape Escape means the original semantics ...

Detailed explanation of MySQL 8's new feature ROLE

What problems does MySQL ROLE solve? If you are a...

Basic usage of UNION and UNION ALL in MySQL

In the database, both UNION and UNION ALL keyword...