Created attachment 1515273 [details] VMI spec with custom disk image path Description of problem: Created a VMI with custom path to containerDisk and it fails to start with error, "no images found in /disk directory", as seen from the below message. oc logs -c volumecontainervolume virt-launcher-vmi-f28-custompath-containerdisk-vnfx9 no images found in /disk directory Version-Release number of selected component (if applicable): kubevirt: v0.12.0-alpha.2 How reproducible: Create containerDisk with custom-disk-image-path 1) wget -O fedora28.qcow2 https://download.fedoraproject.org/pub/fedora/linux/releases/28/Cloud/x86_64/images/Fedora-Cloud-Base-28-1.1.x86_64.qcow2 2) Created a docker image with custom disk image path and pushed to docker hub. cat << END > Dockerfile FROM kubevirt/container-disk-v1alpha ADD fedora28.qcow2 /custom-disk-path END 3) Attached the vm-spec file below 4) VMI and pods output fails kbidarka ~ manifests_local oc get vmi NAME AGE PHASE IP NODENAME vmi-f28-custompath-containerdisk 1m Scheduling kbidarka ~ manifests_local oc get pods NAME READY STATUS RESTARTS AGE virt-launcher-vmi-f28-custompath-containerdisk-mbr2v 1/2 Error 0 2m oc logs -c volumecontainervolume virt-launcher-vmi-f28-custompath-containerdisk-vnfx9 no images found in /disk directory Steps to Reproduce: 1. Create a VMI spec file with custom disk image path , the VMI spec file is attached. 2. oc apply -f vmi-f28-custompath-containerdisk.yaml 3. Actual results: The VMI fails to start successfully with custom disk image path with the below error. oc logs -c volumecontainervolume virt-launcher-vmi-f28-custompath-containerdisk-vnfx9 no images found in /disk directory Expected results: The VMI should start successfully with custom disk image path. Additional info:
I can confirm this behaviour. I found the bug within the logic of handling the custom path. Working on a fix.
The bug has been fixed in upstream by merged https://github.com/kubevirt/kubevirt/pull/1891
Tested with CNV build v2.0.0-18 on OCP4 We still see the same issue.
Created attachment 1555805 [details] The vmi file used and pods logs of volumecontainerdisk container
Verified that the feature works as expected. The real source of issue was copy paste error in user guide, that lead to confusion how to properly use the feature. Fixed with PR: https://github.com/kubevirt/user-guide/pull/247