A helpful set of comments from @Zina has helped me dig into the issue.
First of all I confirmed that two network adapters were available, even though they were not up:
sudo cat /proc/net/dev
Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
enp0s3: 2360 4 0 0 0 0 0 0 2170 14 0 0 0 0 0 0
enp0s8: 1007 7 0 0 0 0 0 0 1410 11 0 0 0 0 0 0
lo: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
I then added this simple /etc/network/interfaces
to bring everything up using DHCP:
auto lo
auto enp0s3
iface enp0s3 inet dhcp
auto enp0s8
iface enp0s8 inet dhcp
Now we are getting somewhere with ifconfig
:
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.2.15 netmask 255.255.255.0 broadcast 10.0.2.255
inet6 fe80::a00:27ff:fe00:6ca9 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:00:6c:a9 txqueuelen 1000 (Ethernet)
RX packets 4 bytes 2360 (2.3 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 16 bytes 2310 (2.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.43.105 netmask 255.255.255.0 broadcast 192.168.43.255
inet6 fe80::a00:27ff:fe9e:4ec0 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:9e:4e:c0 txqueuelen 1000 (Ethernet)
RX packets 14 bytes 1427 (1.4 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 13 bytes 1550 (1.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
I can then do a ifconfig
in both VMs to find the IP of each, so that one can be pinged from the other.
I am not sure why the first network adapter is brought up automatically with an empty interfaces
file, but the second one is not. Moreover, my GUI VM only references the loopback adapter in the interfaces
file, but seems to bring up both network devices automatically.