Bug 1953462 - [4.8]VM from preallocated DV not bootable
Summary: [4.8]VM from preallocated DV not bootable
Keywords:
Status: CLOSED DUPLICATE of bug 1947553
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Storage
Version: 4.8.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.8.0
Assignee: Adam Litke
QA Contact: Alex Kalenyuk
URL:
Whiteboard:
Depends On: 1947553
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-26 06:59 UTC by Yan Du
Modified: 2021-04-27 01:48 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1947553
Environment:
Last Closed: 2021-04-27 01:48:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt containerized-data-importer pull 1747 0 None closed Bugfix: preallocating resized image erases data 2021-04-26 07:03:37 UTC

Description Yan Du 2021-04-26 06:59:26 UTC
+++ This bug was initially created as a clone of Bug #1947553 +++

Description of problem:
Cant create VM from preallocated DV

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

How reproducible:
100%

Steps to Reproduce:
1. Create and start VM from preallocated DV (manifest below)

Actual results:
VM not bootable

Expected results:
VM boots and is usable

Additional info:
If we don't use preallocation for the DV (drop the preallocation field),
The operation succeeds.

apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
  labels:
    kubevirt.io/vm: vm-prealloc-datavolume
  name: vm-prealloc-datavolume
spec:
  dataVolumeTemplates:
  - metadata:
      creationTimestamp: null
      name: prealloc-dv
    spec:
      preallocation: true
      pvc:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 10Gi
        storageClassName: hostpath-provisioner
      source:
        http:
          url: http://<SERVER>/Fedora-Cloud-Base-32-1.6.x86_64.qcow2
  running: true
  template:
    metadata:
      labels:
        kubevirt.io/vm: vm-prealloc-datavolume
    spec:
      domain:
        devices:
          disks:
          - disk:
              bus: virtio
            name: datavolumedisk1
          - disk:
              bus: virtio
            name: cloudinitdisk
        machine:
          type: ""
        resources:
          requests:
            memory: 2Gi
      terminationGracePeriodSeconds: 0
      volumes:
      - dataVolume:
          name: prealloc-dv
        name: datavolumedisk1
      - cloudInitNoCloud:
          userData: |-
            #cloud-config
            password: fedora
            chpasswd: { expire: False }
        name: cloudinitdisk


[akalenyu@localhost kubeconfigs_bm]$ oc exec cdi-apiserver-799f58948-h6wdc --namespace=openshift-cnv -- virt-cdi-apiserver --version
Containerized Data Importer v1.32.0

HCO bundle hco-v4.8.0-217

--- Additional comment from Ying Cui on 2021-04-14 12:17:50 UTC ---

Tomasz, do we have the PR, if so, could you link the PR and change the bug to POST status. Thanks.

--- Additional comment from Alex Kalenyuk on 2021-04-25 14:17:13 UTC ---

Verified on CNV 2.6.2
Containerized Data Importer v1.28.3-19-g7ab168e

HCO-v2.6.2-34
HCO Image: registry.redhat.io/container-native-virtualization/hyperconverged-cluster-operator@sha256:f9acb6a3a66d6f83fc6d6a43599e5be394e3b38b1fd1d450f09c1f6bc0f2281b
createdAt: "2021-04-23 03:33:06"

@yadu Do we need an additional bug for 4.8 and make this one about 2.6?

--- Additional comment from Yan Du on 2021-04-26 06:56:49 UTC ---

As the verification is on 2.6.2 as well, mark this bug to 2.6.2

Comment 1 Adam Litke 2021-04-26 19:56:28 UTC
Yan, The PR is already merged to master and we have not branched to 4.8 yet.  Thus, I don't think we need this bug.  If you agree can you please close it?

Comment 2 Yan Du 2021-04-27 01:48:47 UTC
OK, close the bug as #comment1

*** This bug has been marked as a duplicate of bug 1947553 ***


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