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

How to solve the problem that the Centos7.6 virtual machine installed by VirtualBox cannot communicate with ping?

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly explains "how to solve the problem that the Centos7.6 virtual machine installed by VirtualBox can not communicate with ping". The content in the article is simple and clear, and it is easy to learn and understand. Please follow Xiaobian's train of thought to study and learn "how to solve the problem that the Centos7.6 virtual machine installed by VirtualBox cannot communicate with ping".

Use VirtualBox 6.0to minimize the installation of Linux Centos_7.6 virtual machine under windows 10 system, and solve the problem that the virtual machine can not surf the Internet and the virtual machine can not communicate with the host computer by ping.

You need to pay attention to the following key points

1: you need to configure the network and hostname when installing Linux Centos. Just select enable, as shown below.

After completion, it is shown in the following picture

After completing this configuration, you can access the Internet after the virtual machine is installed, and you can ping the host, but the host cannot ping the virtual machine.

2: configure static IPvi / etc/sysconfig/network-scripts/ifcfg-enp0s3

Change BOOTPROTO to static

And add static IP configuration information at the end of the file

BOOTPROTO= "static" IPADDR=192.168.0.50GATEWAY=192.168.0.1DNS1=192.168.0.1DNS2=8.8.8.8NETMASK=255.255.255.0

As shown below:

3. The virtual machine network option is configured as a bridge network card, as shown in the following figure:

4. Replication of virtual machine under VirtualBox

In the VirtualBox virtual machine list interface, you can right-click the virtual machine and select copy. After the replication is completed, you only need to modify the IP of the virtual machine and reset the network service.

Systemctl restart network5, modify computer name vi / etc/hostname

Just enter the computer name directly.

6. Modify the Hosts file to set the computer name access vi / etc/hosts settings as follows: 192.168.0.121 master121192.168.0.122 node122192.168.0.123 node1237, set virtual machine background startup

Copy the following to the run-vms.bat file, and click to start the virtual machine in the background, where centos7_121, centos7_122 and centos7_123 are virtual machine names.

Cd C:\ Program Files\ Oracle\ VirtualBox.\ VBoxManage.exe startvm centos7_121-- type headless.\ VBoxManage.exe startvm centos7_122-- type headless.\ VBoxManage.exe startvm centos7_123-- type headless Thank you for your reading. The above is the content of "how to solve the problem that the Centos7.6 virtual machine installed by VirtualBox cannot communicate with ping". After the study of this article I believe that you have a deeper understanding of how to solve the problem that the Centos7.6 virtual machine installed by VirtualBox can not communicate with ping, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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

Internet Technology

Wechat

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

12
Report