-
Bug
-
Resolution: Done
-
Normal
-
2.8.2
-
Incidents & Support
-
5
-
False
-
-
True
-
-
-
MTV Sprint 1
-
Moderate
-
+
Description of problem:
By default, OVA downloaded from VMware don't have MAC address in the OVF file. So the provider will see an empty value.
curl -k -X GET -H "Authorization: Bearer $token" https://127.0.0.1:8443/providers/ova/c7c779ce-4834-4708-a2df-c80883b2167c/vms/d148465f8ae3b7b3cf6ebec41f09d6d95a2c' 2>/dev/null |jq '.nics' [ { "Name": "Network adapter 1", "MAC": "", <=== "Network": "PNQ2-25G-PUBLIC-PG", "Config": null } ]
Migrating this virtual machine to OpenShift Virtualization is failing with MAC conflict error even though the source VM definition don't have any MAC:
Source VM has a mac address conflict with one or more destination VMs: [cvs-udn-poc1/rhel9-jade-falcon-53]
The problem is it's comparing the empty value with the source VMs MAC address list. It is not considering empty mac case while checking macConflicts.
The conflict is reported on a VM which is having UDN layer 2 primary network because the VM definition will not have MAC, so it matches this VM since we are comparing empty MAC:
# oc get vm rhel9-jade-falcon-53 -n cvs-udn-poc1 -o yaml |yq '.spec.template.spec.domain.devices.interfaces' - binding: name: l2bridge model: virtio name: default # curl -k -X GET -H "Authorization: Bearer $token" https://127.0.0.1:8443/providers/openshift/a104967b-f19c-4329-adb2-fcd2cbdc0a03/vms/1e587459-fbfc-4515-b8ff-5d3d993bdc7a' 2>/dev/null|jq '.object.spec.template.spec.domain.devices.interfaces' [ { "name": "default", "model": "virtio", "binding": { "name": "l2bridge" } } ]
Version-Release number of selected component (if applicable):
OpenShift Virtualization 4.18.2 Migration Toolkit for Virtualization Operator 2.8.2
How reproducible:
Always
Steps to Reproduce:
1. Download an OVA file from VMware using option "export as template" 2. In an OpenShift cluster, create a VM and attach UDN Layer 2 primary network to this VM. 3. Migrate the OVA VM to this cluster. Migration will fail with error "Source VM has a mac address conflict with one or more destination" with conflict on above VM.
Actual results:
Migrating virtual machines from OVA provider fails with MAC conflict
Expected results:
The source VM OVF doesn't have any MAC addresses, so there is no scope for MAC conflicts
Additional info: