最近在VMware workstation 8上安裝了RHEL 7.0 x64,可是顯示沒有網卡,ifconfig只顯示lo設備ide
[root@localhost~]# ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 8 bytes 764 (764.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8 bytes 764 (764.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0oop
到/etc/sysconfig/network-scritps裏發現只有lo這個設備google
可是明明是有這塊網卡的blog
[root@openstack ~]# lspci |grep -i eth
02:01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)ci
google了下,試了下面幾種方式,都不行文檔
1,開機刪掉網卡
2,重啓
3,開機後加網卡
4,重啓,ifconfig仍是隻有loget
-------------------------------
1,開機刪掉網卡
2,關機下加網卡
3,開機,仍是不行
虛擬機
後來在下面兩篇文章中看到原來是虛擬機vmx配置文件中少了一行配置it
https://access.redhat.com/discussions/1120733io
https://communities.vmware.com/thread/477988
1,關機,
2,移除網卡
3,添加網卡
4,往虛擬機vmx配置文件加ethernet0.virtualDev = "e1000"
5,開機,經過ifconfig能看到網卡
[root@openstack ~]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.47.130 netmask 255.255.255.0 broadcast 192.168.47.255
inet6 fe80::20c:29ff:fe5f:8717 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:5f:87:17 txqueuelen 1000 (Ethernet)
RX packets 75 bytes 8456 (8.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 124 bytes 15417 (15.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 8 bytes 764 (764.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8 bytes 764 (764.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
附:RedHat 7.0 文檔
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/