Created attachment 1868950 [details] Screenshot of Prometheus UI Description of problem: When creating VMs with YAML in Openshift Virtualizaion UI,labels `flavor`, `os` and `workload` are missing Steps to Reproduce: 1.In OCP UI navigate to Virtualization/VirtualMachines 2.Create one or more VMs with YAML
Hi Assaf, can you describe how you created this VM? Please attach YAML file that you used.
Created attachment 1868967 [details] Screenshot of Openshift Virtualization UI when creating VM with YAML
(In reply to Krzysztof Majcher from comment #1) > Hi Assaf, > can you describe how you created this VM? > Please attach YAML file that you used. Hi Krzysztof, I created this VM on Openshift Virtualization UI, using YAML file. Added a screenshot of this default YAML file.
Assaf hi, thank you for the bug, The UI is just calling the api directly in this case, it may be a virtualization issue that is not UI related. Can you create the VM using CLI, for example by `oc create -f vm.yaml` ? I can't reproduce on my 4.10 cluster: On my 4.10 cluster, the VM is created with the same labels as the YAML code I put in the create from YAML window. It may be something specific to your cluster ? If it is repeatable in the CLI we will move the correct component. If on your cluster you can create a VM that has different YAML then the one you entered in the create from YAML, we will need your help to investigate. can you share a screenshot of the created VM, you shared a screenshot of Prometheus UI ? the labels in prometheus are not taken from the VM directly, and may not represent the VM you created
Its a problem with the YAML default template, which by the way is completely missing in 4.11 and is a different bug.
(In reply to Shirly Radco from comment #6) > Its a problem with the YAML default template, which by the way is completely > missing in 4.11 and is a different bug. we have a bug for 4.11 missing YAML example: https://bugzilla.redhat.com/show_bug.cgi?id=2086849 Shirly can you look at the example YAML in PR#434 ? https://github.com/kubevirt-ui/kubevirt-plugin/pull/434/files
Assaf hi, do you mean that the YAML exampla is missing this labels ? or that if you create a VM with this labels they are getting removed somehow ?
Aviv hi, can you make sure the YAML example is up to date: for example this is a vm created from template on a 4.10 cluster: apiVersion: kubevirt.io/v1 kind: VirtualMachine metadata: annotations: name.os.template.kubevirt.io/fedora35: Fedora 35 name: vm-example labels: app: vm-example flavor.template.kubevirt.io/small: 'true' os.template.kubevirt.io/fedora35: 'true' vm.kubevirt.io/template: fedora-server-small workload.template.kubevirt.io/server: 'true' spec: template: metadata: annotations: vm.kubevirt.io/flavor: small vm.kubevirt.io/os: fedora vm.kubevirt.io/workload: server creationTimestamp: null labels: flavor.template.kubevirt.io/small: 'true' kubevirt.io/domain: vm-example kubevirt.io/size: small os.template.kubevirt.io/fedora35: 'true' vm.kubevirt.io/name: vm-example workload.template.kubevirt.io/server: 'true' spec: domain: cpu: cores: 1 sockets: 1 threads: 1 devices: disks: - bootOrder: 1 disk: bus: virtio name: rootdisk - disk: bus: virtio name: cloudinitdisk interfaces: masquerade: {} name: default networkInterfaceMultiqueue: true rng: {} machine: type: pc-q35-rhel8.4.0 resources: requests: memory: 2Gi evictionStrategy: LiveMigrate hostname: vm-example networks: - name: default pod: {} terminationGracePeriodSeconds: 180 volumes: - name: rootdisk containerDisk: image: 'quay.io/containerdisks/fedora:35' - cloudInitNoCloud: userData: |- #cloud-config user: fedora password: fedora chpasswd: { expire: False } name: cloudinitdisk
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 (Important: OpenShift Container Platform 4.11.0 bug fix and security update), 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/RHSA-2022:5069