-
Feature Request
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
None
MTV needs a way to define the IP addresses + MAC address a VM will have when imported.
For that, MTV should template the VM with said information in its metadata, following the k8snetworkplumbingwg de-facto standard network-selection-element syntax.
KubeVirt will then carry over these annotations from the template to the pod's metadata, thus configuring the multus default network customization feature.
Later on, another KubeVirt component will decorate the network selection element adding it the ipam-claim-reference attribute.
MTV should set the following annotation on the VM's spec.template.metadata.annotations:
apiVersion: kubevirt.io/v1 kind: VirtualMachine metadata: name: vm-server namespace: blue spec: runStrategy: Always template: metadata: annotations: v1.multus-cni.io/default-network: '[{ "name": "default", "namespace": "openshift-ovn-kubernetes", "mac": "02:03:04:05:06:07", "ips": [ "10.0.0.5/24" # the list of IPs which we'll set on the VM ] }]'
The values for "default" and "openshift-ovn-kubernetes" are hard-coded. For upsteam, we need a way to allow the admin to provide different values.