Bug 1845183

Summary: [v2v] VMware to CNV: VM import fails quickly on "Failed to get watch namespace"
Product: Container Native Virtualization (CNV) Reporter: Ilanit Stein <istein>
Component: V2VAssignee: Brett Thurber <bthurber>
Status: CLOSED NOTABUG QA Contact: Daniel Gur <dagur>
Severity: high Docs Contact:
Priority: urgent    
Version: 2.4.0CC: cnv-qe-bugs, fkrepins, mhooper, rjones
Target Milestone: ---Keywords: TestBlocker
Target Release: 2.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-06-09 10:24:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ilanit Stein 2020-06-08 15:27:29 UTC
Description of problem:

VM import fail quickly, with status Import error(VMware).

v2v conversion pod error: 
{"level":"error","ts":1591629282.5786479,"logger":"cmd","msg":"Failed to get watch namespace","error":"WATCH_NAMESPACE must be set","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\tkubevirt-vmware/vendor/github.com/go-logr/zapr/zapr.go:128\nmain.main\n\tkubevirt-vmware/cmd/manager/main.go:64\nruntime.main\n\t/usr/lib/golang/src/runtime/proc.go:203"}

Version-Release number of selected component (if applicable):
"quay.io/kubevirt/kubevirt-vmware:v2.0.0-4"
CNV-2.4
OCP-4.5

Comment 1 Filip Krepinsky 2020-06-08 16:39:16 UTC
What version of kubevirt-v2v-conversion pod are you using? 

I tried this with quay.io/kubevirt/kubevirt-v2v-conversion:latest with mentioned quay.io/kubevirt/kubevirt-vmware:v2.0.0-4 on OCP-4.5 and could not reproduce it.

Comment 2 Ilanit Stein 2020-06-09 07:40:24 UTC
This might be related to Bug 1845408 - [v2v] VMware to CNV VM import: Could not load ConfigMap vmware-to-kubevirt-os in kube-public namespace Configmaps "vmware-to-kubevirt-os" not found

Comment 3 Filip Krepinsky 2020-06-09 08:20:17 UTC
It is not related. This config map is optional and is used just for pre-selecting the OS in the UI. It is not used after you leave the wizard flow.

Comment 4 Filip Krepinsky 2020-06-09 09:50:55 UTC
This was cause by misconfigured environment. I found that kubevirt-vmware-image was used in place of v2v-conversion-image.

before:

kubevirt-vmware-image: >-
    registry-proxy.engineering.redhat.com/rh-osbs/container-native-virtualization-kubevirt-vmware@sha256:4427e049eb64567c2b99952cc42df682318531b2869c789b3c5a9daa0ef69590
v2v-conversion-image: 'quay.io/kubevirt/kubevirt-vmware:v2.0.0-4'

after:

kubevirt-vmware-image: 'quay.io/kubevirt/kubevirt-vmware:v2.0.0-4'
v2v-conversion-image: 'quay.io/kubevirt/kubevirt-v2v-conversion:latest'

I managed to successfully import a vmWare VM on this env.


Can you please try if it worked for you and close this bug?

Comment 5 Ilanit Stein 2020-06-09 10:24:00 UTC
Closing the bug, as Filip explained that HCO set the correct values for those 2 fields, and we changed it manually,
since we wasn't aware that those were correct.

Comment 6 Mark Hooper 2020-09-10 15:01:05 UTC
I am seeing this problem also with OCP 4.5.4

Could not load ConfigMap vmware-to-kubevirt-os in kube-public namespace
Configmaps "vmware-to-kubevirt-os" not found

I delete the deployment/configmap in my openshift-cnv project and then attempt to do a vmware import wizard and as indicated above and adjusted my configmap to what you see below but it is still failing with the same error.

   data:
     kubevirt-vmware-image: 'quay.io/kubevirt/kubevirt-vmware:v2.0.0-4'
     kubevirt-vmware-image-pull-policy: IfNotPresent
     v2v-conversion-image: 'quay.io/kubevirt/kubevirt-v2v-conversion:latest'


FYI this is the default when deploying for the first time and if its not correct then this bug should fix that in future CNV releases.
data:
  kubevirt-vmware-image: >-
    registry.redhat.io/container-native-virtualization/kubevirt-vmware@sha256:8236b5eec92b0d37a1cb67ac6f80bf69deea9699ead6351ae59417510e014437
  kubevirt-vmware-image-pull-policy: IfNotPresent
  v2v-conversion-image: >-
    registry.redhat.io/container-native-virtualization/kubevirt-v2v-conversion@sha256:f160e205506908b7145a1414158721c9c01ffdcf12f55ebe38d8f22432a92d08

Comment 7 Filip Krepinsky 2020-09-10 16:08:36 UTC
> Could not load ConfigMap vmware-to-kubevirt-os in kube-public namespace
> Configmaps "vmware-to-kubevirt-os" not found

this is inconsequential error and will not affect vmware import in any way

PS. you also need to have vddk-init-image property defined in v2v-vmware configMap