kubevirt / web-ui

OpenShift Cluster Console UI
https://www.openshift.org
Apache License 2.0
26 stars 11 forks source link

Create VM Dialog: Add disk fails on dataVolumeTemplate #148

Closed mareklibra closed 5 years ago

mareklibra commented 5 years ago

Info from mailing list:

when creating a vm with an additional blank disk, we see the following (we have enabled datavolumes feature gate)

image

karmab commented 5 years ago

still happening on latest release container

rawagner commented 5 years ago

@karmab can you please try from CLI oc create

apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachine
metadata:
  labels:
    kubevirt.io/vm: vm-alpine-datavolume
  name: vm-alpine-datavolume
spec:
  running: false
  template:
    metadata:
      labels:
        kubevirt.io/vm: vm-alpine-datavolume
    spec:
      domain:
        devices:
          disks:
          - disk:
              bus: virtio
            name: datavolumedisk1
            volumeName: datavolumevolume1
        resources:
          requests:
            memory: 64M
      volumes:
      - dataVolume:
          name: alpine-dv
        name: datavolumevolume1
  dataVolumeTemplates:
  - metadata:
      name: alpine-dv
    spec:
      pvc:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 2Gi
      source:
        http:
          url: http://cdi-http-import-server.kubevirt/images/alpine.iso

and

apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachine
metadata:
  name: myvm
spec:
  dataVolumeTemplates:
  - metadata:
      name: emptydisk-myvm
    spec:
      pvc:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 20Gi
      source:
        blank: {}
  running: false
  template:
    spec:
      domain:
        cpu:
          cores: 2
        devices:
          disks:
          - bootOrder: 1
            disk:
              bus: virtio
            name: rootdisk
            volumeName: rootdisk
          - disk:
              bus: virtio
            name: emptydisk
            volumeName: emptydisk
          interfaces:
          - bridge: {}
            name: eth0
          rng: {}
        resources:
          requests:
            memory: 2G
      networks:
      - name: eth0
        pod: {}
      terminationGracePeriodSeconds: 0
      volumes:
      - containerDisk:
          image: kubevirt/fedora-cloud-container-disk-demo
        name: rootdisk
      - dataVolume:
          name: emptydisk-myvm
        name: emptydisk

let me know if any of the above definition can be created

rawagner commented 5 years ago

@karmab this was reported to CDI bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1663238 but I would like to make sure that its still not fixed in latest release and that it still does not work from CLI.

rawagner commented 5 years ago

fixed in CDI 1.5.1+