Successfully solved the problem that the virtual machine cannot be connected to the network again after being suspended for a long time, and prompts that the network activation failed (pro-test is effective)

Successfully solved the problem that the virtual machine cannot be connected to the network again after being suspended for a long time, and it will prompt that the network activation failed (pro-test is effective!)

A virtual machine used to do blockchain has not been turned on for a long time, it has been in a suspended state, and it has been prompting that the activation of the network connection failed. Tried many methods but failed to solve the problem. Changing and closing the Ethernet, restarting the network card of the physical machine did not solve the problem very well. Finally, I tried my own method and successfully solved the problem!

insert image description here
insert image description here

solution:

My virtual machine is using NAT mode

insert image description here

First, open our VM virtual network editor

insert image description here

Click on the NAT setting to find its gateway. We also need to set up the network according to its gateway when using NAT mode.

insert image description here

The network card gateway address of VMnet8 we use here is 192.168.95.2
Then we click the small icon in the upper right corner to view the network status, then click the small icon of network connection,
wired settings - wired connection

insert image description here

insert image description here
Then we click on the network settings icon

insert image description here
Then we click IPv4 to change the automatic acquisition (DHCP) to manual, and manually set the ip based on the gateway 192.168.95.2, and also set the DNS resolution address, otherwise we will not be able to access the Internet. The DNS resolution address I set here is 8.8.8.8, you can also set a few more, just separate them with commas.

insert image description here

After setting, click Apply, and then you can restart the network card, or you can directly restart the virtual machine to reconnect to the network.

service network-manager restart

Or restart the virtual machine directly

reboot

insert image description hereIt successfully shows that it has been connected, let's ping Baidu to try

insert image description here
Successfully pinged! Check our ip is also 192.168.95.159 we set

insert image description hereAt the same time, it can also successfully open the web page and solve the problem successfully!

insert image description here

Hahaha, at the beginning I thought it was quite complicated. After referring to other bloggers' processing ideas and comparing my actual situation, I tried it myself and found that the problem is solved so simply, and there is no need to change so many configuration files like other bloggers. . It's really useful to try it myself, I hope it can help you too!

Guess you like

Origin blog.csdn.net/Myx74270512/article/details/130450754