The problem lies in the fact that ethernet MAC addresses are cached.
You need to remove a file to clear the cached value:
解决方案查看虚拟机的mac地址是否与linuxmac地址一致
进入一下命令
cd /etc/sysconfig/network-scripts/
vi ifcfg-eth0
如果不一致就会出现错误看不到ip
问题是由于以太网MAC地址被缓存。 你需要删除一个文件来清除缓存值:
$ sudo rm /etc/udev/rules.d/70-persistent-net.rules
$ reboot