I'm setting up a virtual machine host on Ubuntu 18.04.3. I installed KVM and have succesfully set up a qemu vm which connects through a bridged network. It shows up as a regular machine in my network.
vm host: 192.168.178.14 vm guest: 192.168.178.15
So I got bridging working fine with netplan. That was on a test machine with a test vm. Now on my production server I added a second network card containing four network interfaces.
The host's 'own' network interface is enp7s0. The extra network interfaces are called enp4s0f0, enp4s0f1, enp5s0f0 and enp5s0f1. I connected enp5s0f1 and what I am trying to do is bridge enp5s0f1 for use with a vm.
/etc/netplan/50-cloud-init.yaml looks like this:
network:
ethernets:
enp7s0:
dhcp4: no
dhcp6: no
addresses: [192.168.178.14/24]
gateway4: 192.168.178.1
nameservers:
addresses: [192.168.178.1]
enp5s0f1:
dhcp4: no
version: 2
bridges:
br0:
interfaces: [enp5s0f1]
dhcp4: no
addresses: [192.168.178.17/24]
gateway4: 192.168.178.1
nameservers:
addresses: [192.168.178.1]
I did not forget to do netplan apply. No error there.
I installed the vm, which went just fine. It installed from an internet repository so I am certain it has network connectivity. I installed openssh-server, just like in my testing environment.
However, when I tried to connect via ssh to the new vm, it didn't work. (The host runs ssh on a non-standard port instead of 22; the guest runs ssh on port 22.)
If I look in my client's arp table I find that 192.168.178.17 has the same mac address as 192.168.178.14. So it looks like the bridging isn't working.
Not sure if it is necessary, but also created an xml file
<network>
<name>host-bridge</name>
<uuid>d90796c6-f38f-42cd-ad55-6f95a8feebe6</uuid>
<forward mode='bridge'/>
<bridge name='br0'/>
</network>
Imported it and now it shows up at virsh net-list -all:
Name State Autostart Persistent
----------------------------------------------------------
default active yes yes
host-bridge active yes yes
No joy.
What am I doing wrong?