Bug 1660412 - Documentation about creating VMI with custom disk image path is wrong, fails to start with error "no images found in /disk directory"
Summary: Documentation about creating VMI with custom disk image path is wrong, fails ...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Virtualization
Version: 1.4
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 2.0
Assignee: Petr Kotas
QA Contact: Kedar Bidarkar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-18 09:56 UTC by Kedar Bidarkar
Modified: 2019-06-05 12:34 UTC (History)
5 users (show)

Fixed In Version: kubevirt-0.16.0-g8f9e35f38.6.g8858768.8f9e35f.el8 virt-operator-container-v2.0.0-16 virt-controller-container-v2.0.0-16 virt-handler-container-v2.0.0-16 virt-launcher-container-v2.0.0-16 virt-api-container-v2.0.0-16
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-05 12:34:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
VMI spec with custom disk image path (3.25 KB, text/plain)
2018-12-18 09:56 UTC, Kedar Bidarkar
no flags Details
The vmi file used and pods logs of volumecontainerdisk container (2.40 KB, text/plain)
2019-04-17 10:04 UTC, Kedar Bidarkar
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt kubevirt pull 1891 0 None closed Fix custom path handling 2020-07-24 01:41:20 UTC

Description Kedar Bidarkar 2018-12-18 09:56:19 UTC
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:

Comment 2 Petr Kotas 2019-01-02 11:06:49 UTC
I can confirm this behaviour. I found the bug within the logic of handling the custom path.
Working on a fix.

Comment 5 Petr Kotas 2019-02-01 16:57:56 UTC
The bug has been fixed in upstream by merged https://github.com/kubevirt/kubevirt/pull/1891

Comment 7 Kedar Bidarkar 2019-04-17 10:03:54 UTC
Tested with CNV build v2.0.0-18 on OCP4

We still see the same issue.

Comment 8 Kedar Bidarkar 2019-04-17 10:04:47 UTC
Created attachment 1555805 [details]
The vmi file used and pods logs of volumecontainerdisk container

Comment 9 Petr Kotas 2019-05-07 14:49:05 UTC
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


Note You need to log in before you can comment on or make changes to this bug.