I am using VirtualBox 5.0.20. The host machine is a MacBook running OS X 10.11.5 (El Capitan). The guest OS is 64-bit Arch Linux. When I installed Arch from the ISO, the guest's internet connectivity was fine. However, once I booted into the installed system, I could no longer reach the internet (for example, pinging 8.8.8.8 just hangs indefinitely).
The virtual machine has two network adapters: one bridged and one host-only. I have tried changing the bridged to a NAT adapter, as well as connecting the bridge at one time to the host's wireless interface and at another time to the host's wired interface. The guest cannot access the internet under any of these setups.
The guest OS has enabled systemd-networkd.service and systemd-resolved.service. It does not have any other network service enabled that I am aware of. If possible, I would like to stick to these services, rather than switch to a different service, but I will switch if there is some inherent flaw in these services that is the root of my problem.
Within the guest OS, the contents of the bridged adapter's network file:
[root@arch64 ~]# cat /etc/systemd/network/bridged.network
[Match]
Name=enp0s3
[Network]
DHCP=ipv4
And the contents of the host-only adapter's network file:
[root@arch64 ~]# cat /etc/systemd/network/host-only.network
[Match]
Name=enp0s8
[Network]
Address=192.168.56.2/24
Gateway=192.168.56.1
The bridged adapter successfully acquires a DHCP lease and I can additionally ping hosts on my LAN, but I cannot ping anything beyond my LAN's router. The host's internet connection is fine.