Description of problem: Failed to import RHV VM once its FQDN is reported FQDN includes period characters ('.') that are not allowed by DNS-1123 Version-Release number of selected component (if applicable): CVN 2.4.1 / OCP 4.5.6 How reproducible: 100% Steps to Reproduce: 1. Have a running VM in RHV 2. Verify VM FQDN is reported 3. Try to import to CNV Actual results: Import Error: The virtual machine could not be imported. VMCreationFailed: Error while creating virtual machine default/v2v-rhel8-vm-guest-agent-installed: admission webhook "virtualmachine-validator.kubevirt.io" denied the request: spec.template.spec.hostname does not conform to the kubernetes DNS_LABEL rules : a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')
Moving to ASSIGNED as the issue is reproduced VM FQDN: rhev-orange-03.rdu2.scalelab.redhat.com Versions: CNV 2.5.0 (createdAt: "2020-09-27 03:29:41") OCP 4.6.0-fc.8 The validation error is displayed in 'oc describe my_vmimport' (see Bug 1884403) $ oc describe virtualmachineimports vm-import-v2v-rhel8-vm-guest-agent-installed-xlwfl Name: vm-import-v2v-rhel8-vm-guest-agent-installed-xlwfl Namespace: default Labels: <none> Annotations: vmimport.v2v.kubevirt.io/progress: 100 vmimport.v2v.kubevirt.io/source-vm-initial-state: up API Version: v2v.kubevirt.io/v1beta1 Kind: VirtualMachineImport Metadata: Creation Timestamp: 2020-10-01T21:02:32Z Finalizers: vmimport.v2v.kubevirt.io/restore-state Generate Name: vm-import-v2v-rhel8-vm-guest-agent-installed- Generation: 1 Managed Fields: API Version: v2v.kubevirt.io/v1beta1 Fields Type: FieldsV1 fieldsV1: f:metadata: f:generateName: f:spec: .: f:providerCredentialsSecret: .: f:name: f:namespace: f:source: .: f:ovirt: .: f:mappings: .: f:diskMappings: f:vm: .: f:id: f:startVm: f:targetVmName: Manager: Mozilla Operation: Update Time: 2020-10-01T21:02:32Z API Version: v2v.kubevirt.io/v1beta1 Fields Type: FieldsV1 fieldsV1: f:metadata: f:annotations: .: f:vmimport.v2v.kubevirt.io/progress: f:vmimport.v2v.kubevirt.io/source-vm-initial-state: f:finalizers: .: v:"vmimport.v2v.kubevirt.io/restore-state": f:spec: f:source: f:ovirt: f:mappings: f:networkMappings: f:status: .: f:conditions: f:targetVmName: Manager: vm-import-controller Operation: Update Time: 2020-10-01T21:02:50Z Resource Version: 5072507 Self Link: /apis/v2v.kubevirt.io/v1beta1/namespaces/default/virtualmachineimports/vm-import-v2v-rhel8-vm-guest-agent-installed-xlwfl UID: a9479a76-755d-4c63-9fad-126898063e8d Spec: Provider Credentials Secret: Name: admin-rhev-blue-01-rdu2-scalel-nrd8b Namespace: default Source: Ovirt: Mappings: Disk Mappings: Source: Id: 213ab526-bfad-476e-9243-a488b97b16d4 Target: Name: Volume Mode: Filesystem Network Mappings: Source: Id: b183d36a-6ba6-4821-9960-6df92c185ef3 Type: pod Vm: Id: 560b560b-e1ab-4c44-97f6-e4a16a78e32b Start Vm: false Target Vm Name: v2v-rhel8-vm-guest-agent-installed Status: Conditions: Last Heartbeat Time: 2020-10-01T21:02:33Z Last Transition Time: 2020-10-01T21:02:33Z Message: Default storage class will be used for 213ab526-bfad-476e-9243-a488b97b16d4 disk Reason: ValidationReportedWarnings Status: True Type: Valid Last Heartbeat Time: 2020-10-01T21:02:33Z Last Transition Time: 2020-10-01T21:02:33Z Message: VM specifies IO Threads: 0, VM has NUMA tune mode secified: interleave, Interface 1cf2eea7-9239-4086-ab38-8052e8ccda01 uses profile with a network filter with ID: d2370ab4-fee3-11e9-a310-8c1645ce738e. Reason: MappingRulesVerificationReportedWarnings Status: True Type: MappingRulesVerified Last Heartbeat Time: 2020-10-01T21:02:50Z Last Transition Time: 2020-10-01T21:02:50Z Message: Error while importing disk image: . VirtualMachine.kubevirt.io "" not found Reason: ProcessingFailed Status: False Type: Processing Last Heartbeat Time: 2020-10-01T21:02:50Z Last Transition Time: 2020-10-01T21:02:44Z Message: Error while importing disk image: . VirtualMachine.kubevirt.io "" not found Reason: DataVolumeCreationFailed Status: False Type: Succeeded Target Vm Name: Events: Type Reason Age From Message ---- ------ ---- ---- ------- Warning VMCreationFailed 32s virtualmachineimport-controller Error while creating virtual machine default/v2v-rhel8-vm-guest-agent-installed: admission webhook "virtualmachine-validator.kubevirt.io" denied the request: spec.template.spec.hostname does not conform to the kubernetes DNS_LABEL rules : a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?') Normal ImportScheduled 27s virtualmachineimport-controller Import of Virtual Machine default/ started Warning DVCreationFailed 26s virtualmachineimport-controller VirtualMachine.kubevirt.io "" not found
It seems like our normalization logic is buggy. Please share fqdn used by your vm.
(In reply to Piotr Kliczewski from comment #2) > It seems like our normalization logic is buggy. Please share fqdn used by > your vm. VM FQDN: rhev-orange-03.rdu2.scalelab.redhat.com (please see comment #1)
verified on CNV version : v2.5.0-333 The VM import works for VM v2v-rhel8-vm-guest-agent-installed with FQDN ( rhev-orange-03.rdu2.scalelab.redhat.com )