Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-31466

[2227059] UI: VM from a cached snapshot is not running: DataVolume sourceRef not supported

XMLWordPrintable

    • Critical
    • No

      Description of problem:

      VM, created in the UI from a cached snapshot, is not running:
      message: 'Error encountered while creating DataVolumes: DataVolume sourceRef not
            supported'

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

      How reproducible:
      Always

      Steps to Reproduce:

      1. Make OCS a default storage class, and make all the other SCs non-default
      oc patch storageclass ocs-storagecluster-ceph-rbd -p '{"metadata": {"annotations":

      {"storageclass.kubernetes.io/is-default-class": "true"}

      }}'

      2. Delete the boot source DV so it'll recreate on OCS
         Check that the VolumeSnapshot was created and it's ReadyToUse

      3. In UI: go to Virtualization --> VirtualMachines --> Create

      4a. Create --> From template, choose the OS that you just re-imported --> Quick create VirtualMachine

      4b. Create --> From volume, choose the OS that you just re-imported --> Select InstanceType -->  Create VirtualMachine

      Actual results:
      Both VMs are Stopped, False

      Expected results:
      Both VMs are Running

      Additional info:

      [cloud-user@ocp-psi-executor ~]$ oc get vm -A
      NAMESPACE   NAME                           AGE     STATUS    READY
      default     rhel-9-circular-alpaca         3m26s   Stopped   False
      default     rhel9-cautious-woodpecker      7m35s   Stopped   False

      [cloud-user@ocp-psi-executor ~]$ oc get vm rhel-9-circular-alpaca -oyaml
      apiVersion: kubevirt.io/v1
      kind: VirtualMachine
      metadata:
        annotations:
          kubemacpool.io/transaction-timestamp: "2023-07-27T15:13:05.502242178Z"
          kubevirt.io/latest-observed-api-version: v1
          kubevirt.io/storage-observed-api-version: v1
        creationTimestamp: "2023-07-27T15:13:05Z"
        finalizers:
        - kubevirt.io/virtualMachineControllerFinalize
        generation: 2
        name: rhel-9-circular-alpaca
        namespace: default
        resourceVersion: "1227039"
        uid: fbbdcfdb-41b5-4ca5-8e7a-444be7ea1fc3
      spec:
        dataVolumeTemplates:
        - metadata:
            creationTimestamp: null
            name: rhel-9-circular-alpaca-volume
          spec:
            sourceRef:
              kind: DataSource
              name: rhel9
              namespace: openshift-virtualization-os-images
            storage:
              resources: {}
        instancetype:
          kind: virtualmachineclusterinstancetype
          name: u1.medium
          revisionName: rhel-9-circular-alpaca-u1.medium-9de65c2a-a80d-47d8-a702-e6f86d4c10b1-1
        preference:
          kind: virtualmachineclusterpreference
          name: rhel.9
          revisionName: rhel-9-circular-alpaca-rhel.9-5d487cd2-1d73-4aa3-83fa-93c1df202470-1
        running: true
        template:
          metadata:
            creationTimestamp: null
          spec:
            architecture: amd64
            domain:
              devices:
                disks:
                - disk:
                    bus: virtio
                  name: rhel-9-circular-alpaca-disk
                - disk:
                    bus: virtio
                  name: cloudinitdisk
              machine:
                type: pc-q35-rhel9.2.0
              resources: {}
            volumes:
            - dataVolume:
                name: rhel-9-circular-alpaca-volume
              name: rhel-9-circular-alpaca-disk
            - cloudInitConfigDrive:
                userData: |
                  #cloud-config
                  user: cloud-user
                  password: 744w-3kwd-4z8f
                  chpasswd:
                    expire: false
              name: cloudinitdisk
      status:
        conditions:
        - lastProbeTime: "2023-07-27T15:13:05Z"
          lastTransitionTime: "2023-07-27T15:13:05Z"
          message: VMI does not exist
          reason: VMINotExists
          status: "False"
          type: Ready
        - lastProbeTime: null
          lastTransitionTime: "2023-07-27T15:13:05Z"
          message: 'Error encountered while creating DataVolumes: DataVolume sourceRef not
            supported'
          reason: FailedCreate
          status: "True"
          type: Failure
        printableStatus: Stopped
        volumeSnapshotStatuses:
        - enabled: false
          name: rhel-9-circular-alpaca-disk
          reason: PVC not found
        - enabled: false
          name: cloudinitdisk
          reason: Snapshot is not supported for this volumeSource type [cloudinitdisk]

      [cloud-user@ocp-psi-executor ~]$ oc get vm rhel9-cautious-woodpecker -oyaml
      apiVersion: kubevirt.io/v1
      kind: VirtualMachine
      metadata:
        annotations:
          kubevirt.io/latest-observed-api-version: v1
          kubevirt.io/storage-observed-api-version: v1
          vm.kubevirt.io/validations: |
            [
             

      {           "name": "minimal-required-memory",           "path": "jsonpath::.spec.domain.resources.requests.memory",           "rule": "integer",           "message": "This VM requires more memory.",           "min": 1610612736         }

            ]
        creationTimestamp: "2023-07-27T15:08:56Z"
        finalizers:
        - kubevirt.io/virtualMachineControllerFinalize
        generation: 1
        labels:
          app: rhel9-cautious-woodpecker
          vm.kubevirt.io/template: rhel9-server-small
          vm.kubevirt.io/template.namespace: openshift
          vm.kubevirt.io/template.revision: "1"
          vm.kubevirt.io/template.version: v0.25.0
        name: rhel9-cautious-woodpecker
        namespace: default
        resourceVersion: "1221865"
        uid: ee1e3f7d-342e-4208-9d7f-0506a5c09cb8
      spec:
        dataVolumeTemplates:
        - apiVersion: cdi.kubevirt.io/v1beta1
          kind: DataVolume
          metadata:
            creationTimestamp: null
            name: rhel9-cautious-woodpecker
          spec:
            sourceRef:
              kind: DataSource
              name: rhel9
              namespace: openshift-virtualization-os-images
            storage:
              resources:
                requests:
                  storage: 30Gi
        running: true
        template:
          metadata:
            annotations:
              vm.kubevirt.io/flavor: small
              vm.kubevirt.io/os: rhel9
              vm.kubevirt.io/workload: server
            creationTimestamp: null
            labels:
              kubevirt.io/domain: rhel9-cautious-woodpecker
              kubevirt.io/size: small
          spec:
            architecture: amd64
            domain:
              cpu:
                cores: 1
                sockets: 1
                threads: 1
              devices:
                disks:
                - disk:
                    bus: virtio
                  name: rootdisk
                - disk:
                    bus: virtio
                  name: cloudinitdisk
                interfaces:
                - macAddress: 02:6f:22:00:00:01
                  masquerade: {}
                  model: virtio
                  name: default
                networkInterfaceMultiqueue: true
                rng: {}
              features:
                acpi: {}
                smm:
                  enabled: true
              firmware:
                bootloader:
                  efi: {}
              machine:
                type: pc-q35-rhel9.2.0
              resources:
                requests:
                  memory: 2Gi
            networks:
            - name: default
              pod: {}
            terminationGracePeriodSeconds: 180
            volumes:
            - dataVolume:
                name: rhel9-cautious-woodpecker
              name: rootdisk
            - cloudInitConfigDrive:
                userData: |-
                  #cloud-config
                  user: cloud-user
                  password: gioi-0a45-yntm
                  chpasswd:

      { expire: False }

              name: cloudinitdisk
      status:
        conditions:
        - lastProbeTime: "2023-07-27T15:08:56Z"
          lastTransitionTime: "2023-07-27T15:08:56Z"
          message: VMI does not exist
          reason: VMINotExists
          status: "False"
          type: Ready
        - lastProbeTime: null
          lastTransitionTime: "2023-07-27T15:08:56Z"
          message: 'Error encountered while creating DataVolumes: DataVolume sourceRef not
            supported'
          reason: FailedCreate
          status: "True"
          type: Failure
        printableStatus: Stopped
        volumeSnapshotStatuses:
        - enabled: false
          name: rootdisk
          reason: PVC not found
        - enabled: false
          name: cloudinitdisk
          reason: Snapshot is not supported for this volumeSource type [cloudinitdisk]

              akalenyu Alex Kalenyuk
              jpeimer@redhat.com Jenia Peimer
              Jenia Peimer Jenia Peimer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: