Hi there,
I suspect this isn't a support forum but I'm not sure where else to ask - please point me in the right direction if I should be posting somewhere else :)
I'm evaluating KubeVirt as a potential VMware replacement and I've been able to convert and run some test Windows VMs which is promising, I've run into a problem getting networking set up and my networking knowledge is a bit patchy so I'm looking for some pointers.
I've got a K8s 1.29 cluster running KubeVirt 1.2, it's not running much else as it's just for testing, I've installed the cluster-network-addons operator and used that to install Multus and the OVS CNI, each node has an OVS bridge on the secondary physical interface which isn't used for any cluster traffic, on the network outside K8s I have a number of VLANs and I'd like to be able to run VMs on my K8s nodes and have them connected to the external VLANs just like they are in VMware.
The physical switch that the nodes are connected to has the ports set up to trunk the VLANs I'm interested in.
I've added the VLANs to the OVS bridge so each node has a bridge called br1 and the VLAN fake bridges for the VLANs are e.g. br1.10, br1.14 etc.
I've created a network-attachment-definition:
kind: NetworkAttachmentDefinition
metadata:
name: vlan10-conf
spec:
config: '{
"cniVersion": "0.4.0",
"name": "vlan10",
"type": "ovs",
"bridge": "br1",
"vlan": 10
}'
And I'm configuring the VMI like this:
devices:
[...]
interfaces:
- name: "net_default"
masquerade: {}
macAddress: 00:0c:29:d3:63:5d
model: "e1000e"
- name: "net_vlan10"
bridge: {}
macAddress: 00:0c:29:d3:63:67
model: "e1000e"
volumes:
[...]
networks:
- name: "net_default"
pod: {}
- name: "net_vlan10"
multus:
networkName: "vlan10-conf"
The VMI starts fine, two virtual network adapters are present, but the adapter supposedly on the VLAN is unable to get an IP address via DHCP.
On the node that the VMI is running on `ovs-vsctl show` gives this:
Bridge br1
fail_mode: standalone
Port br1.14
tag: 14
Interface br1.14
type: internal
Port vetheb16b846
tag: 10
Interface vetheb16b846
Port br1.10
tag: 10
Interface br1.10
type: internal
Port eno2
Interface eno2
Port br1
Interface br1
type: internal
As far as I can tell, vetheb16b846 is the virtual adapter on my VMI, the port seems set up with the right tag information.
I've tried messing around with some settings on the eno2 port, changing the vlan_mode to trunk/native_tagged/native_untagged, it doesn't seem to change anything, I've also tried specifying the VLANs in the trunks setting, e.g. 0,10,14 but that also doesn't seem to change anything.
Is there something obvious that I'm missing?
Thanks for reading this far :)
Cheers, Matt