Bug 1863329

Summary: [v2v][VMware to CNV VM import] VM creation fail when picking Ceph-rbd/Block for v2v-conversion-template
Product: Container Native Virtualization (CNV) Reporter: Ilanit Stein <istein>
Component: V2VAssignee: Brett Thurber <bthurber>
Status: CLOSED ERRATA QA Contact: Ilanit Stein <istein>
Severity: medium Docs Contact:
Priority: high    
Version: 2.4.0CC: awels, bthurber, cnv-qe-bugs, dagur, ncredi, pvauter, tgolembi
Target Milestone: ---   
Target Release: 2.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 2.5.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-07 09:53:12 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:
Bug Depends On: 1814611, 1863331    
Bug Blocks:    

Description Ilanit Stein 2020-08-03 15:17:51 UTC
Description of problem:
VM import from VMware to CNV.
For 
VM disk: Ceph-rbd / Block
v2v-conversion-template disk: Ceph-rbd / Block
Fail immediately on:

Error creating virtual machine.

Error "Required value" for field "spec.containers[0].volumeDevices[1].devicePath".

Pod kubevirt-v2v-conversion-mini-rhel7-cloudinit- failed to create
{
 "kind": "Pod",
 "apiVersion": "v1",
 "metadata": {
  "generateName": "kubevirt-v2v-conversion-mini-rhel7-cloudinit-",
  "namespace": "default"
 },
 "spec": {
  "restartPolicy": "Never",
  "serviceAccountName": "kubevirt-v2v-conversion-xpprf",
  "initContainers": [
   {
    "name": "vddk-init",
    "image": "cnv-qe-server.rhevdev.lab.eng.rdu2.redhat.com:5000/vddk-images/vddk:v700",
    "volumeMounts": [
     {
      "name": "volume-vddk",
      "mountPath": "/opt/vmware-vix-disklib-distrib"
     }
    ]
   }
  ],
  "containers": [
   {
    "name": "kubevirt-v2v-conversion",
    "imagePullPolicy": "IfNotPresent",
    "image": "registry.stage.redhat.io/container-native-virtualization/kubevirt-v2v-conversion@sha256:e3056e80f0aecf186bfac6504f23aa58d33120d0ba9646a816bd4f341b030cae",
    "securityContext": {
     "privileged": true
    },
    "volumeMounts": [
     {
      "name": "configuration",
      "mountPath": "/data/input"
     },
     {
      "name": "kvm",
      "mountPath": "/dev/kvm"
     },
     {
      "name": "volume-vddk",
      "mountPath": "/opt/vmware-vix-disklib-distrib"
     }
    ],
    "volumeDevices": [
     {
      "name": "harddisk1",
      "devicePath": "/data/vm/disk1"
     },
     {
      "name": "v2v-conversion-temp"
     }
    ]
   }
  ],
  "volumes": [
   {
    "name": "configuration",
    "secret": {
     "secretName": "kubevirt-v2v-conversion-j6chc"
    }
   },
   {
    "name": "kvm",
    "hostPath": {
     "path": "/dev/kvm"
    }
   },
   {
    "name": "volume-vddk",
    "emptyDir": {}
   },
   {
    "name": "harddisk1",
    "persistentVolumeClaim": {
     "claimName": "harddisk1-f7g9n"
    }
   },
   {
    "name": "v2v-conversion-temp",
    "persistentVolumeClaim": {
     "claimName": "v2v-conversion-temp-jzq6s"
    }
   }
  ]
 }
}

Version-Release number of selected component (if applicable):
CNV-2.4

How reproducible:
100%

Comment 2 Ilanit Stein 2020-08-06 05:45:06 UTC
prior 2.4 GA Ceph-rbd was tested with volume mode: Filesystem, which was the default.
We weren't aware than of the fact that there is an available option on UI VM import wizard to pick the volume mode. 
Therefore, only on recent days, when I found out about it,
I tested Ceph-RBD with volume mode: Block.

This bug was reported for:  
VM disk: Block 
v2v-converison-template disk: Block
That failed immediately, and VM was not created.

Bug 1863331 was reported for: 
VM disk: Block 
v2v-converison-template disk: Filesystem
Import process seem to start, however there was a failure in the v2v log.

Comment 3 Alexander Wels 2020-08-06 18:55:52 UTC
I so am not entirely sure what we are trying to do here, but if v2v-conversion-temp is supposed to be a block device, then it needs a device path.

    "volumeDevices": [
     {
      "name": "harddisk1",
      "devicePath": "/data/vm/disk1"
     },
     {
      "name": "v2v-conversion-temp" <---- missing devicePath
     }

Comment 5 Tomáš Golembiovský 2020-09-21 15:27:25 UTC
So there seem to be actually two problems. One is that device paths for VM disks are wrong which should be fixed by bug 1863331. Second problem is with the temp space as Alexander already mentioned in comment #3 and that should be fixed by bug 1814611. V2v fix shouldn't be necessary.

Comment 6 Brett Thurber 2020-09-30 02:19:10 UTC
Moving to ON_QA as dependent BZ's are ON_QA.

Comment 7 Ilanit Stein 2020-10-01 10:20:52 UTC
v2v conversion template disk is no longer exposed in VM import wizard, in CNV UI.
It is set internally to local storage.

VM import from VMware to CNV using Ceph-RBD/Block for VM disk is successful on CNV-2.5 (Bug 1863331).

Based on the above moving bug to Verified.