No ethernet in Linux client, using external virtual switch and physical disk

Paul DeRocco 0 Reputation points
2024-05-20T05:16:35.4133333+00:00

This configuration is a little different from most. I have an M.2 drive with Ubuntu 20.04LTS which works fine when I boot my machine into it through the BIOS. However, I want to run it in a VM under Windows 10, since Windows is what I use for most of my work. I got it running, but in Linux the Ethernet isn't working.

I understand that the Default Switch is internal, so connects the VM via NAT. I tried that, and it didn't work, and I prefer bridged connections so that my VM just looks like another machine on the network. The steps I performed are:

  • I created an external virtual switch, and associated it with my NAT. I turned off all three extensions. The only checkbox that's on is "Allow management operating system to share this network adapter".
  • I created a VM, gave it 16G of RAM (out of 32G), 8 processors (out of 20), and told it to use the external virtual switch. I didn't give it a virtual disk.
  • Once it was created, I opened its properties, created a Hard Drive, and selected the appropriate physical disk.
  • I set it to boot from the hard drive, turned off Secure Boot, and Disabled checkpoints.

The VM booted up fine, except for one thing: networking is broken. "ifconfig" shows only "lo", no "eth0". However, "nmcli device show" shows

User's image

so something in Linux thinks eth0 exists. In Windows, "ipconfig /all" shows:

Windows IP Configuration
   Host Name . . . . . . . . . . . . : GENX
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : attlocal.net
Ethernet adapter VirtualBox Host-Only Network:
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter
   Physical Address. . . . . . . . . : 0A-00-27-00-00-0C
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::cb5b:aa62:537e:f1e6%12(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.56.1(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : 688521255
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-27-41-0F-EE-24-4B-FE-7D-DA-C5
   DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                       fec0:0:0:ffff::2%1
                                       fec0:0:0:ffff::3%1
   NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter vEthernet (Intel Ethernet Controller):
   Connection-specific DNS Suffix  . : attlocal.net
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #2
   Physical Address. . . . . . . . . : 24-4B-FE-7D-DA-C5
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   IPv6 Address. . . . . . . . . . . : 2600:1700:7920:1ec0::37(Preferred)
   Lease Obtained. . . . . . . . . . : Sunday, May 19, 2024 8:06:35 PM
   Lease Expires . . . . . . . . . . : Sunday, May 19, 2024 9:36:35 PM
   IPv6 Address. . . . . . . . . . . : 2600:1700:7920:1ec0:4973:bad8:673f:4591(Preferred)
   Temporary IPv6 Address. . . . . . : 2600:1700:7920:1ec0:b0f6:bbdd:695a:1a94(Preferred)
   Link-local IPv6 Address . . . . . : fe80::c108:8b2d:7582:4dd1%47(Preferred)
   IPv4 Address. . . . . . . . . . . : 192.168.1.223(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Sunday, May 19, 2024 8:06:38 PM
   Lease Expires . . . . . . . . . . : Monday, May 20, 2024 8:06:37 PM
   Default Gateway . . . . . . . . . : fe80::eea:c9ff:fe56:4770%47
                                       192.168.1.254
   DHCP Server . . . . . . . . . . . : 192.168.1.254
   DHCPv6 IAID . . . . . . . . . . . : 790907902
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-27-41-0F-EE-24-4B-FE-7D-DA-C5
   DNS Servers . . . . . . . . . . . : 2600:1700:7920:1ec0::1
                                       2600:1700:7920:1ec0::1
                                       8.8.8.8
                                       8.8.4.4
   NetBIOS over Tcpip. . . . . . . . : Enabled
   Connection-specific DNS Suffix Search List :
                                       attlocal.net
                                       attlocal.net
Wireless LAN adapter Wi-Fi:
   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : attlocal.net
   Description . . . . . . . . . . . : Intel(R) Wi-Fi 6 AX201 160MHz
   Physical Address. . . . . . . . . : D8-3B-BF-17-04-C1
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

I notice that it is now the vEthernet using Hyper-V Virtual Ethernet Adapter #2 (my external virtual switch) that is connected to the internet, but its Status dialog shows only a few thousand packets in both directions. Meanwhile, the original NIC connection doesn't show up in ipconfig at all, but when I bring up its Status dialog, it is showing millions of packets. That's probably normal, but it implies that the external virtual switch isn't completely dead.

Does any of this evidence suggest a reason for why the interface isn't showing up in Linux? Is there any other information I should provide, either from Windows, Hyper-V, or Linux?

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,588 questions
{count} votes