ManageIQ/manageiq-providers-kubevirt

View on GitHub
manifests/example-template-windows.yml

Summary

Maintainability
Test Coverage
apiVersion: v1
kind: Template
metadata:
  name: windows-vm-template
  annotations:
    description: "OCP KubeVirt Microsoft Windows Server 2016 VM template"
    tags: "kubevirt,ocp,template,windows"
  labels:
    kubevirt.io/os: win2k16
    miq.github.io/kubevirt-is-vm-template: "true"
objects:
- apiVersion: kubevirt.io/v1alpha3
  kind: VirtualMachine
  metadata:
    name: ${NAME}
  spec:
    template:
      spec:
        domain:
          features:
            acpi: {}
            apic: {}
            hyperv:
              relaxed: {}
              vapic: {}
              spinlocks:
                spinlocks: 8191
          clock:
            utc: {}
            timer:
              hpet:
                present: false
              pit:
                tickPolicy: delay
              rtc:
                tickPolicy: catchup
              hyperv: {}
          cpu:
            cores: ${CPU_CORES}
          machine:
            type: q35
          resources:
            requests:
              memory: ${MEMORY}
          devices:
            disks:
            - name: disk0-pvc
        volumes:
          - name: disk0-pvc
            persistentVolumeClaim:
              claimName: windows-vm-pvc-${NAME}
- apiVersion: v1
  kind: PersistentVolumeClaim
  metadata:
    name: windows-vm-pvc-${NAME}
    #FIXME: add an annotation to specify which volume this pvc should be based on
  spec:
    accessModes:
    - ReadWriteOnce
    resources:
      requests:
        storage: 10Gi
parameters:
- name: NAME
  description: Name for the new VM
- name: MEMORY
  description: Amount of memory
  value: 4096Mi
- name: CPU_CORES
  description: Amount of cores
  value: "4"