Description of problem: Migration should fail for a Migration plan that was set via API with "wrong network mapping": 1. No network mapping section 2. Source network doesn't exist. 3. Source network exist on the VMware, but is not the network the migrated VM is attached to.
I think that cases 2 and 3 are not issues : 2. The mapping can cover network that don't exist and it will not fail the migration, since no VM is attached to a non existing network. 3. The mapping can cover more networks than is needed. The extra mapping won't be used during the migration. And another plan can use the same mapping, with VMs connected to the "extra" networks. In case #1, there's already a validation and the "map" attribute is required. Moving to ON_QA to verify that.
Verified as fixed MTV version: 2.0.0-17 / iib:66911 $ cat << EOF | oc apply -f - > --- > apiVersion: forklift.konveyor.io/v1alpha1 > kind: Plan > metadata: > name: plan-no-network > namespace: openshift-rhmtv > spec: > map: > storage: > name: iscsi-nfs > namespace: openshift-rhmtv > provider: > destination: > name: host > namespace: openshift-rhmtv > source: > name: node-05 > namespace: openshift-rhmtv > targetNamespace: openshift-rhmtv > vms: > - id: vm-715 > EOF The Plan "plan-no-network" is invalid: spec.map.network: Required value
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (MTV 2.0.0 images), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2021:2381