Migrate the original Ubuntu virtual machine files to a machine.
Ifconfig shows that there is only one Lo network card and some articles are found online. Mostly change the/etc/network/interfaces
The original content is
# #######################################################
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see Interfaces (5).
# The Loopback network interface
Auto Lo
Iface Lo inet Loopback
# The Primary network interface
Auto Eth0
Iface eth0 inet DHCP
# #######################################################
Change eth0 to static IP
# #######################################################
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see Interfaces (5).
# The Loopback network interface
Auto Lo
Iface Lo inet Loopback
# The Primary network interface
Auto Eth0
Iface eth0 inet Static
Address 192.168.60.218
Gateway 192.168.60.1
Netmask 255.255.255.0
# #######################################################
Run Ifconfig after reboot, still only shows Lo. I can't find the eth0.
Run ifconfig-a unintentionally, showing Eth1,eth2 and lo.
So change/etc/network/interfaces, change the original eth0 to eth1
# #######################################################
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see Interfaces (5).
# The Loopback network interface
Auto Lo
Iface Lo inet Loopback
# The Primary network interface
Auto Eth1
Iface eth1 inet Static
Address 192.168.60.218
Gateway 192.168.60.1
Netmask 255.255.255.0
# #######################################################
After reboot, Ifconfig finally show eth1, the familiar network is back again. Here is a simple record to avoid encountering again next time.
Eth0 disappearing due to VMware virtual machine migration