Home > Backend Development > PHP Tutorial > Troubleshooting CentOS-6.7 Internet Access under VirtualBox_PHP Tutorial

Troubleshooting CentOS-6.7 Internet Access under VirtualBox_PHP Tutorial

WBOY
Release: 2016-07-12 09:05:58
Original
1311 people have browsed it

Troubleshooting CentOS-6.7 Internet Access under VirtualBox

2015/11/2 18:10:43

I recently needed to install a CentOS virtual machine, recommended by a colleague I bought the compact VirtualBox to replace the "bulky" VMware, so I tried to install the CentOS-6.7 virtual machine on VirtualBox.

The process of installing a virtual machine is similar to that of VMware. If you are familiar with VMware, it will not be a problem. However, the newly installed virtual machine has always been unable to connect to the network and encountered many problems.

My VirtualBox version is 4.3.24 r98716, and the CentOS-6.7 kernel version is 2.6.32-513.3.1.el6.i686.

1. No suitable device found

This is the first problem I encountered. Although I set up the Bridge connection method and re-established the ifcfg-eth0 file, I still encountered the prompt No. There is a problem with network equipment. The specific screenshots are as follows:

Troubleshooting CentOS-6.7 Internet Access under VirtualBox_PHP Tutorial

For this problem, we can learn from online solutions:

  1. Delete the /etc/udev/rules.d/70-persistent-net.rules file;
  2. Analyze whether the actual HWADDR value of ifconig is consistent with the configuration file setting, that is, check /etc/ HWADDR value in the sysconfig/network-scripts/ifcfg-eth0 file;

After comparison, the two values ​​are indeed inconsistent, so the configuration file is modified again; however, after running, it is found that there is still a problem with the eth0 port :

2. Device not managed by NetworkManager or unavailable

The first thing I thought of here was to add the parameter NM_CONTROLLED=yes in the ifcfg-eth0 configuration file, and then restart the system. The problem remains. I continued to search for information on the Internet, and finally found the cause of the problem. In CentOS-6.0 or above systems, the problem occurred when NetworkManager and Network services managed the network card at the same time. The solution was to execute the following commands in sequence:

  1. chkconfig NetworkManager off
  2. chkconfig network on
  3. service NetworkManager stop
  4. service network start

Then the problem is solved, but My CentOS still cannot connect to the Internet through the VirtualBox bridge. I thought the problem should be in the VirtualBox settings. Sure enough, I need to allow virtual networks in the network settings:

Troubleshooting CentOS-6.7 Internet Access under VirtualBox_PHP Tutorial

Finally the problem is solved and the network can be connected.

It is also worth mentioning that before I used VMware or VirtualBox to use NAT to create CentOS-6.7 virtual machines, the network was always unable to connect. Later, I used Bridge mode. Bridge mode is more convenient than NAT mode. Be more stable.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1067477.htmlTechArticleTroubleshooting CentOS-6.7 Internet Access under VirtualBox 2015/11/2 18:10:43 Recently I need to install a CentOS Virtual machine, a colleague recommended the compact VirtualBox to replace the "bulky" VMware, so I...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template