VM Import operator
Description of problem:
UI VM Import from RHV to CNV of a RHEL-8 VM, with a single nic, fails on:
Error "Required value" for field "spec.source.ovirt.mappings.networkMappings.target"
I checked vm-import-controller logs by running:
oc logs vm-import-controller-6c64995476-plljx -n openshift-cnv
and it seems there were no vmimports created so no import operations happened.
I ran the import from the UI and I was able to reproduce. I chose a vm and went with defaults without any changes.
Here is the yaml:
The failure message is:
Error "Invalid value: "null": spec.source.ovirt.mappings.diskMappings.target.name in body must be of type string: "null"" for field "spec.source.ovirt.mappings.diskMappings.target.name".
At this stage there is no interaction with the backend.
The above yaml is rejected by the api.
I tried to create it using cli and I get:
* spec.source.ovirt.mappings.diskMappings.target.name: Invalid value: "null": spec.source.ovirt.mappings.diskMappings.target.name in body must be of type string: "null"
* spec.source.ovirt.mappings.networkMappings.target: Required value
In case you did not change anything and the VM has one network, then pod network was selected by default and target was set to undefined. Having a target doesn't make sense for pod networks so this is a bug on vm-import-operator side IMO.
There must be a problem with the resource validation as I don't see a problem with the generated YAML (please double check).
pod network should not require a target
null should indicate that the default storage class should be used (which is standard in this case) or no class. When I replace it with standard the error disappears.
Version-Release number of selected component (if applicable):
It seems like we have regression after working on csv generator. Let's align with older vmimport CRD.
Apparently the CRD is correct. It is a mystery how it worked before.
Managed to VM import from RHV to CNV using default mapping, which have failed on previous versions.
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, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.