Description of problem: Migration of VM with one or more Upper Case letter passes MTV validation and only fails when trying to create the VM: Warning VMCreationFailed 1s virtualmachineimport-controller Error while creating virtual machine openshift-migration/Aruvm: VirtualMachine.kubevirt.io "Aruvm" is invalid: metadata.name: Invalid value: "Aruvm": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*') Note: CentOS_7-, for example, does produces the expected results (post: https://github.com/konveyor/forklift-controller/pull/142) Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Here, the validation service will catch it. It should be marked as "fatal", so the controller should not even try to migrate the VM and fail with the concern message.
Since this is a kubernetes (not CNV) limitation, Seems better for the plan controller, not the validation service, to validate this. The controller will need to perform a similar validation anyway should we support a user renaming the VM on the plan.
I think it's still valuable for the validation service to catch it, so that the concern is raised before creating the plan. I also agree that it should also be a validation in the controller to fail as early as possible.
https://github.com/konveyor/forklift-controller/pull/207
The fix should be part of build 2.0.0-17 / iib:66911.
Verified MTV 2.0.0-20 (iib:69034) Status: Conditions: Category: Critical Items: vm-43 Last Transition Time: 2021-04-26T10:07:36Z Message: Target VM name not valid. Reason: NotValid Status: True Type: TargetNameNotValid Migration: Observed Generation: 1 Events: Type Reason Age From Message ---- ------ ---- ---- ------- Warning TargetNameNotValid 9s plan Target VM name not valid.
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