The next issue I’m facing is how to get a VM in KVM to be on the LAN and get a DHCP address from the DHCP server, and be reachable on the LAN.
Default profile:
devices:
eth0:
name: eth0
nictype: macvlan
parent: eno1
type: nic
So a container gets the default:
network:
version: 2
ethernets:
eth0:
dhcp4: true
dhcp-identifier: mac
If I follow either the basic or complex examples of creating a bridge from here:
and read the source code of the above page to see the XML for the KVM network config at line xml br0
, I can see the VM try to get an IP and the DHCP responding but the VM doesn’t hear it:
dhcpd[4759]: DHCPDISCOVER from 52:54:00:92:a8:a4 (ius01a-omel01) via eth0
dhcpd[4759]: DHCPOFFER on 10.0.0.172 to 52:54:00:92:a8:a4 (ius01a-omel01) via eth0
dhcpd[4759]: DHCPDISCOVER from 52:54:00:92:a8:a4 (ius01a-omel01) via eth0
dhcpd[4759]: DHCPOFFER on 10.0.0.172 to 52:54:00:92:a8:a4 (ius01a-omel01) via eth0
dhcpd[4759]: DHCPDISCOVER from 52:54:00:92:a8:a4 (ius01a-omel01) via eth0
dhcpd[4759]: DHCPOFFER on 10.0.0.172 to 52:54:00:92:a8:a4 (ius01a-omel01) via eth0
dhcpd[4759]: DHCPDISCOVER from 52:54:00:92:a8:a4 (ius01a-omel01) via eth0
dhcpd[4759]: DHCPOFFER on 10.0.0.172 to 52:54:00:92:a8:a4 (ius01a-omel01) via eth0
dhcpd[4759]: DHCPDISCOVER from 52:54:00:92:a8:a4 (ius01a-omel01) via eth0
I’ve also tried adding a second macvlan interface (eth1) into the container for the bridging but the bridge interface has the same DHCP problem as as the VM running on it, here is the basic example but attached to the second interface, eth1
:
network:
version: 2
ethernets:
eth0:
dhcp4: true
dhcp-identifier: mac
eth1:
dhcp4: false
dhcp-identifier: mac
bridges:
ius01abr0:
dhcp4: true
interfaces:
- eth1
So really its just looking like the bridge cannot hear responses for some reason.
This is the closest thing I’ve found and sounds familiar, but it needs some translation:
Thanks