I'm trying to connect the Ubuntu 18.04 guest machine to the network on my Kubuntu 18.04 host laptop via bridge adapter. The Ubuntu guest won't recognize it, however.
I read about how I should be modifying netplan .yaml file, but I'm not exactly sure how to set up bridge network with it.
This is what the yaml file looks like so far:
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
# Added everything from here myself
ethernets:
enp1s0:
dhcp4: true
dhcp6: true
wifis:
wlp2s0:
dhcp4: true
dhcp6: true
bridges:
br0:
interfaces: [enp1s0, wlp2s0]
dhcp4: true
dhcp6: true
br1:
interfaces: [enp1s0]
dhcp4: true
dhcp6: true
I got this when I ran # netplan generate
:
Error in network definition //etc/netplan/01-network-manager-all.yaml line 12 column 6: wlp2s0: No access points defined
I'm not sure what I'm doing wrong exactly. Was I supposed to list every access point the interface is using?
Couple of sites I checked out:
I am not familiar with netplan, but presumably this creates connection profiles for NetworkManager.
A WiFi connection profile in NetworkManager must always specify an SSID. That means, you cannot create a WiFi profiles that isn't tied to a particular network. That makes sense (??), because the profile essentially contains the parameters necessary to connect to the WiFi network. As these parameters commonly differ between networks (except for open networks), you need a profile per network.
In NetworkManager, the properties to enslave the device to a bridge (
connextion.slave-type
andconnection.master
) are also part of the connection profile.In netplan, if you specify a WiFi network, this could only map to the entity which NetworkManager understands: the profile. Since you specify no SSIDs, it cannot create any profiles and fails.
It's unclear what netplan or NetworkManager could do better here.
As per one of the links you posted (https://netplan.io/examples#connecting-to-a-wpa-personal-wireless-network), you have to define the SSID and password for the networks you access via WiFi; see this snippet:
The relevant part is the "access-points" block. If your SSID is "MyNet" and your password "S3cr3tPwd!":
Might I suggest KVM over Virtualbox. The advantages are numerous. I have a Netplan bridged VLAN for my virtual machines. Here is my YAML:
This has 4 nics, two bonded together, and a bridged vlan on one for my virtual machines. Be careful with you YAML files, they are very sensitive to formatting. I am pretty sure there is also a firewall option in your kernel parameters that needs to be set in order to not check bridged traffic. You can also put in the appropriate rules. If you go the KVM was, install Virt-Manager and in the VM's prefs, set the interface to br0 (at least in my config).