when we do a Linux test with VMware Workstation, the snapshot or clone, after restarting the virtual machine, will not recognize the network card, we just do the following, let LinUX automatically recognize the network card.
[Email protected] rules.d]# pwd
/etc/udev/rules.d
[email protected] rules.d]# LL
Total 36
-rw-r--r--. 1 root root 1652 Nov 60-fprint-autosuspend.rules
-rw-r--r--. 1 root root 153 Nov 60-ipath.rules
-rw-r--r--. 1 root root 1060 Nov 60-pcmcia.rules
-rw-r--r--. 1 root root 60-raw.rules
-rw-r--r--. 1 root root 789 Nov 19:30 70-persistent-cd.rules
-rw-r--r--. 1 root root 420 Nov 19:54 70-persistent-net.rules
-rw-r--r--. 1 root root-Sep-90-alsa.rules
-rw-r--r--. 1 root root (90-hal.rules)
-rw-r--r--. 1 root root 308 Nov 98-kexec.rules
1, first enter the directory:/ETC/UDEV/RULES.D directory, the 70-persistent-net.rules file deleted:
[Email protected] rules.d]# RM-RF 70-persistent-net.rules
2. Restart the Linux virtual machine
[Email protected] rules.d]# reboot
3. Edit File Ifcfg-eth0
Execute command:
[Email protected] rules.d]# cd/etc/sysconfig/network-scripts/
[[email protected] network-scripts]# IP addr
1:lo: <LOOPBACK,UP,LOWER_UP> MTU 16436 qdisc noqueue State UNKNOWN
Link/loopback 00:00:00:00:00:00 BRD 00:00:00:00:00:00
inet 127.0.0.1/8 Scope host Lo
INET6:: 1/128 Scope Host
Valid_lft Forever Preferred_lft Forever
2:eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> MTU Qdisc pfifo_fast State up Qlen 1000
Link/ether 00:0c:29:57:fd:1f BRD FF:FF:FF:FF:FF:FF
inet 10.6.2.193/24 BRD 10.6.2.255 Scope Global eth0
Inet6 FE80::20C:29FF:FE57:FD1F/64 Scope link
Valid_lft Forever Preferred_lft Forever
[[email protected] rules.d]# vim ifcfg-eth0 #如果此文件没有, create it Yourself
Device=eth0 #关联到网卡设备eth0
ipaddr=10.6.2.193
netmask=255.255.255.0
gateway=10.6.2.254
Onboot=yes
Name=eth0
[Email protected] network-scripts]# service network restart #重启网卡服务就可以了
VmWare Workstation does not recognize NIC issues after a snapshot or clone of a Linux virtual machine