Score:1

VM Ware Ubuntu 20.04 lost eth0 when moving to a new host machine

by flag

I recently had to replace my PC, so copied the drive file for my guest Ubuntu 20.04 machine to the new box. I installed VM Ware Workstation Pro 16 and started the Ubuntu system up. When it started up I no longer have the eth0 network interface and certain applications are failing to connect. The default Firefox browser can access the internet, but some applications are failing to connect to my local network.

ifconfig -s shows this:

Iface      MTU    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg
docker0   1500        0      0      0 0             0      0      0      0 BMU
ens33     1500     6828      0      0 0          3357      0      0      0 BMRU
lo       65536      961      0      0 0           961      0      0      0 LRU
veth013d  1500      303      0      0 0           316      0      0      0 BMRU
veth0f0d  1500     2777      0      0 0           408      0      0      0 BMRU
veth78e2  1500    29689      0      0 0         33318      0      0      0 BMRU
vethbfaf  1500    39039      0      0 0         29841      0      0      0 BMRU

I have tried searching for commands to re-enable eth0, rename ens33 to etho0 and even re-installing the kernel modules and network manager but the /etc/network/interfaces does not exist (I have since discovered this is because it was removed from 18.04) and most of the commands listed in these links do not exist on my machine. I have updated the OS with sudo apt-get update && sudo apt-get upgrade which appeared to succeed.

Because /etc/network/interfaces/ does not exist I cannot add auto eth0.

I have looked in etc/netplan/01-network-manager-all.yaml but it just says:

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

What can I do to get eth0 restored?

David avatar
cn flag
Simply moving a hard drive or an OS to different hardware often has issues. A reinstall of the OS is your best bet.
Matt W avatar
by flag
Doesn't that somewhat defeat the purpose of a virtualised machine? Regardless, there must be a way to restore the network device or rename an existing one, right?7
Score:0
sk flag

Did have same issue after porting Ubuntu 20.04 from VirtualBox 6.1 to ESXi 6.5. Old interface "enp0s3" disappeared but new interface "ens33" appeared.

Configured "ens33" interface by following "IP Addressing" section of Ubuntu documentation: https://ubuntu.com/server/docs/network-configuration

P.S. boot log show that "eth0" was renamed to "ens33"

log line: "e1000 ens33: renamed from eth0"

command: "dmesg | grep eth0"

If you just need to rename interface use following commands:

ifconfig ens33 down
ip link set ens33 name eth0
ifconfig eth0 up
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.