Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The solution to the problem that virtual machines and cloned virtual machines cannot communicate with each other by ping

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

This problem has perplexed me for a long time. I found a lot of information on the Internet, most of which are unreliable. What a joke!

Next, I will talk about how to completely solve the problem of network disconnection between virtual machines and cloned virtual machines.

Solution:

As shown in the figure, it is my virtual machine kang1 and the virtual machine kang2 cloned through kang1:

The kang1 on it is normal, right? Let's take a look at the cloned kang2:

Uh? I always feel like something's wrong! Oh? Where did you get the eth2 network card? Obviously, this is wrong. There is obviously only one network card in our virtual machine.

To enable the network interconnection between the two virtual machines, you need to modify some relevant configuration files of the clone kang2, as shown below:

① logs in to kang2, goes to the network configuration file / etc/sysconfig/network-scripts/ifcfg-eth0 to delete the MAC address, and the final result is shown in the figure below, and then save and exit.

② opens a magical configuration file

Open the configuration file above, as shown in the following figure, and the so-called eth2 is caused by this rule file.

③ We already know that all this is determined by the / etc/udev/rules.d/70-persistent-net.rules file, OK, and the problem is solved by deleting this file. Don't worry, restarting the virtual machine after this file is deleted will be generated automatically.

④ verifies whether two virtual machines can ping each other. The current host ip:192.168.1.106 another host ip:192.168.1.118.

Ok! The problem is solved! Does it feel great?

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report