Description of problem: A VM created from common templates via CLI is missing attributes which are added when a VM is created from the UI (using templates). From the CLI we use oc process. The following attributes are missing: metadata: annotations: name.os.template.kubevirt.io/win2k16: Microsoft Windows Server 2016 labels: flavor.template.kubevirt.io/medium: 'true' os.template.kubevirt.io/win2k16: 'true' vm.kubevirt.io/template-namespace: openshift workload.template.kubevirt.io/server: 'true' spec: template: metadata: labels: vm.kubevirt.io/name: win16 spec: devices: disks: - bootOrder: 1 interfaces: - bootOrder: 2 Version-Release number of selected component (if applicable): $ oc get csv -n openshift-cnv NAME DISPLAY VERSION REPLACES PHASE kubevirt-hyperconverged-operator.v2.2.0 Container-native virtualization Operator 2.2.0 kubevirt-hyperconverged-operator.v2.1.0 Succeeded How reproducible: 100% Steps to Reproduce: 1. Create a Windows DV 2. Create a Windows VM through the CLI oc process -n openshift win2k12r2-server-medium-v0.7.0 -p NAME="win16" -p PVCNAME="win-16" | oc create -n default -f - Actual results: - VM is created, however the yaml is missing the above-mentioned attributes. Expected results: CLI and UI should create identical VMs (unless modified by the user). Additional info:
Tomas, is there a requirement that the VMs created by the UI be identical to VMs created via common-templates?
Martin, are you aware either?
This is not a bug. CLI is not fully supported, the UI indeed has a lot more logic. The oc process tool is pretty "dumb" and does not understand the CNV annotations.
The currently supported workflow is to use the UI. I agree that it's not nice that the UI and CLI differ--and that's being tracked in the long run in Jira. Closing this issue as there's no short-term solution, and we're working on a long term fix.