Bug 1886927 - VM Creation from Template fails with forbidden property in dataVolumeTemplates
Summary: VM Creation from Template fails with forbidden property in dataVolumeTemplates
Keywords:
Status: CLOSED DUPLICATE of bug 1885196
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: User Experience
Version: 2.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Tomas Jelinek
QA Contact: Guohua Ouyang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-09 18:28 UTC by Chandler Wilkerson
Modified: 2020-10-11 12:08 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-11 12:08:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Chandler Wilkerson 2020-10-09 18:28:59 UTC
Description of problem:

On creation of a Windows VM from a Windows VM Template, I get:

Error creating virtual machine.
Error "spec.dataVolumeTemplates.apiVersion in body is a forbidden property" for field "undefined".

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

CNV 2.5 on OCP 4.6

How reproducible:

Always

Steps to Reproduce:
1. Create DataVolume for Windows (may not matter) VM
2. Create Template employing that DV
3. Create VM from template

Actual results:

Above error message with below template yaml 

apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachine
metadata:
  labels:
    app: edge1
    vm.kubevirt.io/template: msedge-eval
    vm.kubevirt.io/template.revision: '1'
    vm.kubevirt.io/template.version: v0.12.2
    os.template.kubevirt.io/win10: 'true'
    flavor.template.kubevirt.io/medium: 'true'
    workload.template.kubevirt.io/desktop: 'true'
    vm.kubevirt.io/template.namespace: default
  name: edge1
  namespace: default
  annotations:
    name.os.template.kubevirt.io/win10: Microsoft Windows 10
spec:
  dataVolumeTemplates:
    - apiVersion: cdi.kubevirt.io/v1alpha1
      kind: DataVolume
      metadata:
        name: edge1-disk-0-yrnpb
      spec:
        pvc:
          accessModes:
            - ReadWriteOnce
          resources:
            requests:
              storage: 40Gi
          storageClassName: hostpath-provisioner
          volumeMode: Filesystem
        source:
          pvc:
            name: msedge-w10
            namespace: default
  running: true
  template:
    metadata:
      labels:
        kubevirt.io/domain: edge1
        kubevirt.io/size: medium
        vm.kubevirt.io/name: edge1
        os.template.kubevirt.io/win10: 'true'
        flavor.template.kubevirt.io/medium: 'true'
        workload.template.kubevirt.io/desktop: 'true'
    spec:
      domain:
        clock:
          timer:
            hpet:
              present: false
            hyperv: {}
            pit:
              tickPolicy: delay
            rtc:
              tickPolicy: catchup
          utc: {}
        cpu:
          cores: 1
          sockets: 1
          threads: 1
        devices:
          disks:
            - bootOrder: 1
              disk:
                bus: virtio
              name: disk-0
            - cdrom:
                bus: sata
              name: windows-guest-tools
          inputs:
            - bus: usb
              name: tablet
              type: tablet
          interfaces:
            - masquerade: {}
              model: virtio
              name: nic-0
        features:
          acpi: {}
          apic: {}
          hyperv:
            relaxed: {}
            spinlocks:
              spinlocks: 8191
            vapic: {}
        machine:
          type: pc-q35-rhel8.2.0
        resources:
          requests:
            memory: 4Gi
      evictionStrategy: LiveMigrate
      hostname: edge1
      networks:
        - name: nic-0
          pod: {}
      terminationGracePeriodSeconds: 3600
      volumes:
        - dataVolume:
            name: edge1-disk-0-yrnpb
          name: disk-0
        - containerDisk:
            image: registry.redhat.io/container-native-virtualization/virtio-win
          name: windows-guest-tools



Expected results:

VM Creation

Additional info:

Comment 1 Tomas Jelinek 2020-10-11 12:08:35 UTC

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


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