apiVersion: template.openshift.io/v1 kind: Template metadata: name: windows-server-2022-small-redhat namespace: '${TENANT_NAMESPACE}' labels: template.kubevirt.io/type: 'vm' os.template.kubevirt.io/win2k22: 'true' workload.template.kubevirt.io/server: 'true' annotations: name.os.template.kubevirt.io/win2k22: Windows Server 2022 description: Windows Server 2022 VM openshift.io/display-name: Windows Server 2022 iconClass: icon-windows objects: - apiVersion: kubevirt.io/v1 kind: VirtualMachine metadata: name: '${NAME}' annotations: description: Windows Server 2022 VM example labels: app: '${NAME}' vm.kubevirt.io/template: 'windows-server-2022-template' os.template.kubevirt.io/win2k22: 'true' spec: running: false template: metadata: annotations: vm.kubevirt.io/flavor: small vm.kubevirt.io/os: win2k22 vm.kubevirt.io/workload: server labels: kubevirt.io/domain: '${NAME}' kubevirt.io/size: small spec: domain: cpu: cores: 1 sockets: 1 threads: 1 devices: disks: - disk: bus: virtio name: rootdisk interfaces: - masquerade: {} model: virtio name: default networkInterfaceMultiqueue: true rng: {} features: acpi: {} smm: enabled: true firmware: bootloader: efi: {} memory: guest: 4Gi hostname: '${NAME}' networks: - name: default pod: {} terminationGracePeriodSeconds: 180 volumes: - name: rootdisk dataVolume: name: '${NAME}-dv' - apiVersion: cdi.kubevirt.io/v1beta1 kind: DataVolume metadata: name: '${NAME}-dv' namespace: '${TENANT_NAMESPACE}' spec: source: http: url: '${IMAGE_URL}' pvc: accessModes: - ReadWriteOnce resources: requests: storage: '${PVC_SIZE}' storageClassName: '${STORAGE_CLASS}' parameters: - name: NAME description: Name for the new VM generate: expression from: 'windows-[a-z0-9]{8}' - name: IMAGE_URL description: Public or internal HTTP(S) URL to a sysprepped Windows .qcow2 image required: true value: http://nginx.demo.svc.cluster.local:8080/win2022.qcow2 - name: PVC_SIZE description: Size of the root disk PVC required: true value: 120Gi - name: STORAGE_CLASS description: The StorageClass to use for the root disk PVC required: true value: ibm-spectrum-scale-fileset