记录日常工作关于系统运维,虚拟化云计算,数据库,网络安全等各方面问题。

hyper-v配置centos6.3 不能配置网卡或是不能解析DNS


本人在Hyper-v 中配置Centos6.3 时,

不是找不到网卡,就是系统只能ping ,不能打开网页。


如果配置虚拟机时,选网卡类型全都是:网络适配器。

那么安装centos6.3后,系统没有安装网卡的管理程序。

导致网卡没法配置,也找不到DNS配置文件。

所以安装centos系统时,至少一个网卡类型为: 旧版网络适配器



这样安装好Linux 集成安装包3.4后,会有一个网卡配置文件。

其它的配置文件,照此复制修改就OK了。

网卡都可以正常使用。


但是不能打开网页。原因是因为:


Run ‘vi /etc/sysconfig/network-scripts/ifcfg-eth0’ at the command prompt, then in vi, press i to go into insert mode, then enter the following:

DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.1.16
NETMASK=255.255.255.0
GATEWAY=192.168.1.123

Obviously you have to replace the settings with the correct details for your network! To save the file, press Esc, Shift + : , wp, <Enter>
We now need to do the same as above for /etc/resolv.conf – add the IP’s of your DNS servers to this file:

nameserver 8.8.8.8
nameserver 8.8.4.4

The final file we need to edit is /etc/sysconfig/network in order to enable networking, and set the system hostname. Add the following ot this file:

NETWORKING=yes
HOSTNAME=myServer.mydomain.net

Now start the network by entering the command ‘service network restart’. You should see eth0 start up, and should be able to ping other hosts on your network, and beyond!







转载请标明出处【hyper-v配置centos6.3 不能配置网卡或是不能解析DNS】。

《www.micoder.cc》 虚拟化云计算,系统运维,安全技术服务.

网站已经关闭评论