Bug 1947553 - VM from preallocated DV not bootable
Summary: VM from preallocated DV not bootable
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Storage
Version: 4.8.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 2.6.2
Assignee: Tomasz Barański
QA Contact: Alex Kalenyuk
URL:
Whiteboard:
: 1953462 (view as bug list)
Depends On:
Blocks: 1953462
TreeView+ depends on / blocked
 
Reported: 2021-04-08 17:14 UTC by Alex Kalenyuk
Modified: 2021-05-04 20:09 UTC (History)
4 users (show)

Fixed In Version: hco-bundle-registry-container-v2.6.2-34
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1953462 (view as bug list)
Environment:
Last Closed: 2021-05-04 20:09:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt containerized-data-importer pull 1746 0 None closed Bugfix: preallocating resized image erases data 2021-04-14 12:55:31 UTC
Github kubevirt containerized-data-importer pull 1756 0 None closed [release-v1.28] Bugfix: preallocating resized image erases data (#1747) 2021-04-19 08:10:57 UTC
Red Hat Product Errata RHEA-2021:1502 0 None None None 2021-05-04 20:09:23 UTC

Description Alex Kalenyuk 2021-04-08 17:14:43 UTC
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

Comment 1 Ying Cui 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.

Comment 4 Yan Du 2021-04-26 07:05:19 UTC
@Alex, here is the clone bug for 4.8 https://bugzilla.redhat.com/show_bug.cgi?id=1953462

Comment 5 Yan Du 2021-04-27 01:48:47 UTC
*** Bug 1953462 has been marked as a duplicate of this bug. ***

Comment 11 errata-xmlrpc 2021-05-04 20:09:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Virtualization 2.6.2 Images), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2021:1502


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