From 4695cd664799ad1ba39107f631d71c712cf4e051 Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Tue, 8 Oct 2024 16:38:15 +0200 Subject: [PATCH 1/7] Introduce InstanceTypes Signed-off-by: Andrei Kvapil --- packages/apps/kubernetes/Chart.yaml | 2 +- packages/apps/kubernetes/README.md | 191 +- .../apps/kubernetes/templates/cluster.yaml | 25 + packages/apps/kubernetes/values.yaml | 8 +- packages/apps/versions_map | 6 +- packages/apps/virtual-machine/Chart.yaml | 2 +- packages/apps/virtual-machine/Makefile | 13 +- packages/apps/virtual-machine/README.md | 255 ++- .../hack/update-instance-types.sh | 1 + .../apps/virtual-machine/templates/vm.yaml | 48 +- .../apps/virtual-machine/values.schema.json | 141 +- packages/apps/virtual-machine/values.yaml | 34 +- packages/core/platform/bundles/paas-full.yaml | 6 + .../kubevirt-common-instancetypes/Chart.yaml | 3 + .../kubevirt-common-instancetypes/Makefile | 12 + .../templates/instancetypes.yaml | 1649 ++++++++++++++++ .../templates/preferences.yaml | 1694 +++++++++++++++++ .../kubevirt-common-instancetypes/values.yaml | 1 + .../kubevirt/templates/kubevirt-cr.yaml | 2 + 19 files changed, 3983 insertions(+), 110 deletions(-) create mode 100755 packages/apps/virtual-machine/hack/update-instance-types.sh create mode 100644 packages/system/kubevirt-common-instancetypes/Chart.yaml create mode 100644 packages/system/kubevirt-common-instancetypes/Makefile create mode 100644 packages/system/kubevirt-common-instancetypes/templates/instancetypes.yaml create mode 100644 packages/system/kubevirt-common-instancetypes/templates/preferences.yaml create mode 100644 packages/system/kubevirt-common-instancetypes/values.yaml diff --git a/packages/apps/kubernetes/Chart.yaml b/packages/apps/kubernetes/Chart.yaml index 7ae338d6..78204701 100644 --- a/packages/apps/kubernetes/Chart.yaml +++ b/packages/apps/kubernetes/Chart.yaml @@ -16,7 +16,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.12.0 +version: 0.13.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/packages/apps/kubernetes/README.md b/packages/apps/kubernetes/README.md index fdbad05c..bbc55cfd 100644 --- a/packages/apps/kubernetes/README.md +++ b/packages/apps/kubernetes/README.md @@ -27,26 +27,181 @@ How to access to deployed cluster: kubectl get secret -n kubernetes--admin-kubeconfig -o go-template='{{ printf "%s\n" (index .data "super-admin.conf" | base64decode) }}' > test ``` -## Parameters +# Series -### Common parameters + -| Name | Description | Value | -| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -| `host` | The hostname used to access the Kubernetes cluster externally (defaults to using the cluster name as a subdomain for the tenant host). | `""` | -| `controlPlane.replicas` | Number of replicas for Kubernetes contorl-plane components | `2` | -| `storageClass` | StorageClass used to store user data | `replicated` | -| `nodeGroups` | nodeGroups configuration | `{}` | +. | U | O | CX | M | RT +----------------------------|-----|-----|------|-----|------ +*Has GPUs* | | | | | +*Hugepages* | | | ✓ | ✓ | ✓ +*Overcommitted Memory* | | ✓ | | | +*Dedicated CPU* | | | ✓ | | ✓ +*Burstable CPU performance* | ✓ | ✓ | | ✓ | +*Isolated emulator threads* | | | ✓ | | ✓ +*vNUMA* | | | ✓ | | ✓ +*vCPU-To-Memory Ratio* | 1:4 | 1:4 | 1:2 | 1:8 | 1:4 -### Cluster Addons -| Name | Description | Value | -| ------------------------------------ | ---------------------------------------------------------------------------------- | ------- | -| `addons.certManager.enabled` | Enables the cert-manager | `false` | -| `addons.certManager.valuesOverride` | Custom values to override | `{}` | -| `addons.ingressNginx.enabled` | Enable Ingress-NGINX controller (expect nodes with 'ingress-nginx' role) | `false` | -| `addons.ingressNginx.valuesOverride` | Custom values to override | `{}` | -| `addons.ingressNginx.hosts` | List of domain names that should be passed through to the cluster by upper cluster | `[]` | -| `addons.fluxcd.enabled` | Enables Flux CD | `false` | -| `addons.fluxcd.valuesOverride` | Custom values to override | `{}` | +## U Series +The U Series is quite neutral and provides resources for +general purpose applications. + +*U* is the abbreviation for "Universal", hinting at the universal +attitude towards workloads. + +VMs of instance types will share physical CPU cores on a +time-slice basis with other VMs. + +### U Series Characteristics + +Specific characteristics of this series are: +- *Burstable CPU performance* - The workload has a baseline compute + performance but is permitted to burst beyond this baseline, if + excess compute resources are available. +- *vCPU-To-Memory Ratio (1:4)* - A vCPU-to-Memory ratio of 1:4, for less + noise per node. + +## O Series + +The O Series is based on the U Series, with the only difference +being that memory is overcommitted. + +*O* is the abbreviation for "Overcommitted". + +### UO Series Characteristics + +Specific characteristics of this series are: +- *Burstable CPU performance* - The workload has a baseline compute + performance but is permitted to burst beyond this baseline, if + excess compute resources are available. +- *Overcommitted Memory* - Memory is over-committed in order to achieve + a higher workload density. +- *vCPU-To-Memory Ratio (1:4)* - A vCPU-to-Memory ratio of 1:4, for less + noise per node. + +## CX Series + +The CX Series provides exclusive compute resources for compute +intensive applications. + +*CX* is the abbreviation of "Compute Exclusive". + +The exclusive resources are given to the compute threads of the +VM. In order to ensure this, some additional cores (depending +on the number of disks and NICs) will be requested to offload +the IO threading from cores dedicated to the workload. +In addition, in this series, the NUMA topology of the used +cores is provided to the VM. + +### CX Series Characteristics + +Specific characteristics of this series are: +- *Hugepages* - Hugepages are used in order to improve memory + performance. +- *Dedicated CPU* - Physical cores are exclusively assigned to every + vCPU in order to provide fixed and high compute guarantees to the + workload. +- *Isolated emulator threads* - Hypervisor emulator threads are isolated + from the vCPUs in order to reduce emaulation related impact on the + workload. +- *vNUMA* - Physical NUMA topology is reflected in the guest in order to + optimize guest sided cache utilization. +- *vCPU-To-Memory Ratio (1:2)* - A vCPU-to-Memory ratio of 1:2. + +## M Series + +The M Series provides resources for memory intensive +applications. + +*M* is the abbreviation of "Memory". + +### M Series Characteristics + +Specific characteristics of this series are: +- *Hugepages* - Hugepages are used in order to improve memory + performance. +- *Burstable CPU performance* - The workload has a baseline compute + performance but is permitted to burst beyond this baseline, if + excess compute resources are available. +- *vCPU-To-Memory Ratio (1:8)* - A vCPU-to-Memory ratio of 1:8, for much + less noise per node. + +## RT Series + +The RT Series provides resources for realtime applications, like Oslat. + +*RT* is the abbreviation for "realtime". + +This series of instance types requires nodes capable of running +realtime applications. + +### RT Series Characteristics + +Specific characteristics of this series are: +- *Hugepages* - Hugepages are used in order to improve memory + performance. +- *Dedicated CPU* - Physical cores are exclusively assigned to every + vCPU in order to provide fixed and high compute guarantees to the + workload. +- *Isolated emulator threads* - Hypervisor emulator threads are isolated + from the vCPUs in order to reduce emaulation related impact on the + workload. +- *vCPU-To-Memory Ratio (1:4)* - A vCPU-to-Memory ratio of 1:4 starting from + the medium size. + +## Resources + +The following instancetype resources are provided by Cozystack: + +Name | vCPUs | Memory +-----|-------|------- +cx1.2xlarge | 8 | 16Gi +cx1.4xlarge | 16 | 32Gi +cx1.8xlarge | 32 | 64Gi +cx1.large | 2 | 4Gi +cx1.medium | 1 | 2Gi +cx1.xlarge | 4 | 8Gi +gn1.2xlarge | 8 | 32Gi +gn1.4xlarge | 16 | 64Gi +gn1.8xlarge | 32 | 128Gi +gn1.xlarge | 4 | 16Gi +m1.2xlarge | 8 | 64Gi +m1.4xlarge | 16 | 128Gi +m1.8xlarge | 32 | 256Gi +m1.large | 2 | 16Gi +m1.xlarge | 4 | 32Gi +n1.2xlarge | 16 | 32Gi +n1.4xlarge | 32 | 64Gi +n1.8xlarge | 64 | 128Gi +n1.large | 4 | 8Gi +n1.medium | 4 | 4Gi +n1.xlarge | 8 | 16Gi +o1.2xlarge | 8 | 32Gi +o1.4xlarge | 16 | 64Gi +o1.8xlarge | 32 | 128Gi +o1.large | 2 | 8Gi +o1.medium | 1 | 4Gi +o1.micro | 1 | 1Gi +o1.nano | 1 | 512Mi +o1.small | 1 | 2Gi +o1.xlarge | 4 | 16Gi +rt1.2xlarge | 8 | 32Gi +rt1.4xlarge | 16 | 64Gi +rt1.8xlarge | 32 | 128Gi +rt1.large | 2 | 8Gi +rt1.medium | 1 | 4Gi +rt1.micro | 1 | 1Gi +rt1.small | 1 | 2Gi +rt1.xlarge | 4 | 16Gi +u1.2xlarge | 8 | 32Gi +u1.2xmedium | 2 | 4Gi +u1.4xlarge | 16 | 64Gi +u1.8xlarge | 32 | 128Gi +u1.large | 2 | 8Gi +u1.medium | 1 | 4Gi +u1.micro | 1 | 1Gi +u1.nano | 1 | 512Mi +u1.small | 1 | 2Gi +u1.xlarge | 4 | 16Gi diff --git a/packages/apps/kubernetes/templates/cluster.yaml b/packages/apps/kubernetes/templates/cluster.yaml index 637902af..d7607c67 100644 --- a/packages/apps/kubernetes/templates/cluster.yaml +++ b/packages/apps/kubernetes/templates/cluster.yaml @@ -15,6 +15,11 @@ spec: node-role.kubernetes.io/{{ . }}: "" {{- end }} spec: + {{- with .group.instanceType }} + instancetype: + kind: VirtualMachineClusterInstancetype + name: {{ . }} + {{- end }} runStrategy: Always template: metadata: @@ -26,10 +31,12 @@ spec: {{- end }} spec: domain: + {{- if and .group.resources .group.resources.cpu }} cpu: threads: 1 cores: {{ .group.resources.cpu }} sockets: 1 + {{- end }} devices: disks: - name: system @@ -43,8 +50,10 @@ spec: interfaces: - name: default bridge: {} + {{- if and .group.resources .group.resources.memory }} memory: guest: {{ .group.resources.memory }} + {{- end }} evictionStrategy: External volumes: - name: system @@ -176,6 +185,14 @@ spec: template: {{- $kubevirtmachinetemplate | nindent 4 }} --- +{{- $instanceType := dict }} +{{- if $group.instanceType }} +{{- $instanceType = (lookup "instancetype.kubevirt.io/v1beta1" "VirtualMachineClusterInstancetype" "" $group.instanceType) }} +{{- if not $instanceType }} +{{- fail (printf "Specified instancetype not exists in cluster: %s" $group.instanceType) }} +{{- end }} +{{- end }} + apiVersion: cluster.x-k8s.io/v1beta1 kind: MachineDeployment metadata: @@ -184,8 +201,16 @@ metadata: annotations: cluster.x-k8s.io/cluster-api-autoscaler-node-group-min-size: "{{ $group.minReplicas }}" cluster.x-k8s.io/cluster-api-autoscaler-node-group-max-size: "{{ $group.maxReplicas }}" + {{- if and $group.resources $group.resources.memory }} capacity.cluster-autoscaler.kubernetes.io/memory: "{{ $group.resources.memory }}" + {{- else }} + capacity.cluster-autoscaler.kubernetes.io/memory: "{{ $instanceType.spec.memory.guest }}" + {{- end }} + {{- if and $group.resources $group.resources.cpu }} capacity.cluster-autoscaler.kubernetes.io/cpu: "{{ $group.resources.cpu }}" + {{- else }} + capacity.cluster-autoscaler.kubernetes.io/cpu: "{{ $instanceType.spec.cpu.guest }}" + {{- end }} spec: clusterName: {{ $.Release.Name }} template: diff --git a/packages/apps/kubernetes/values.yaml b/packages/apps/kubernetes/values.yaml index bdfcc4c1..8250e895 100644 --- a/packages/apps/kubernetes/values.yaml +++ b/packages/apps/kubernetes/values.yaml @@ -15,13 +15,15 @@ nodeGroups: md0: minReplicas: 0 maxReplicas: 10 - resources: - cpu: 2 - memory: 1024Mi + instanceType: "u1.medium" ephemeralStorage: 20Gi roles: - ingress-nginx + resources: + cpu: "" + memory: "" + ## @section Cluster Addons ## addons: diff --git a/packages/apps/versions_map b/packages/apps/versions_map index 302bbcae..38cebde5 100644 --- a/packages/apps/versions_map +++ b/packages/apps/versions_map @@ -34,7 +34,8 @@ kubernetes 0.9.0 9b6dd19 kubernetes 0.10.0 ac5c38b kubernetes 0.11.0 4eaca42 kubernetes 0.11.1 4f430a90 -kubernetes 0.12.0 HEAD +kubernetes 0.12.0 31a45c4d +kubernetes 0.13.0 HEAD mysql 0.1.0 f642698 mysql 0.2.0 8b975ff0 mysql 0.3.0 5ca8823 @@ -77,7 +78,8 @@ virtual-machine 0.1.4 f2015d6 virtual-machine 0.1.5 7cd7de7 virtual-machine 0.2.0 5ca8823 virtual-machine 0.3.0 b908400 -virtual-machine 0.4.0 HEAD +virtual-machine 0.4.0 4746d51 +virtual-machine 0.5.0 HEAD vpn 0.1.0 f642698 vpn 0.2.0 7151424 vpn 0.3.0 HEAD diff --git a/packages/apps/virtual-machine/Chart.yaml b/packages/apps/virtual-machine/Chart.yaml index 6affe799..b176fe7b 100644 --- a/packages/apps/virtual-machine/Chart.yaml +++ b/packages/apps/virtual-machine/Chart.yaml @@ -17,7 +17,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.4.0 +version: 0.5.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/packages/apps/virtual-machine/Makefile b/packages/apps/virtual-machine/Makefile index 709bd438..cf5eab3c 100644 --- a/packages/apps/virtual-machine/Makefile +++ b/packages/apps/virtual-machine/Makefile @@ -1,10 +1,9 @@ include ../../../scripts/package.mk generate: - readme-generator -v values.yaml -s values.schema.json.tmp -r README.md - cat values.schema.json.tmp | \ - jq '.properties.image.enum = ["ubuntu", "cirros", "alpine", "fedora", "talos"]' | \ - jq '.properties.resources.properties.memory["x-display"] = "slider"' | \ - jq '.properties.externalPorts.items.type = "integer"' \ - > values.schema.json - rm -f values.schema.json.tmp + readme-generator -v values.yaml -s values.schema.json -r README.md + INSTANCE_TYPES=$$(yq e '.metadata.name' -o=json -r ../../system/kubevirt-common-instancetypes/templates/instancetypes.yaml | yq 'split(" ") | . + [""]' -o json) \ + && yq -i -o json ".properties.instanceType.optional=true | .properties.instanceType.enum = $${INSTANCE_TYPES}" values.schema.json + PREFERENCES=$$(yq e '.metadata.name' -o=json -r ../../system/kubevirt-common-instancetypes/templates/preferences.yaml | yq 'split(" ") | . + [""]' -o json) \ + && yq -i -o json ".properties.instanceProfile.optional=true | .properties.instanceProfile.enum = $${PREFERENCES}" values.schema.json + yq -i -o json '.properties.externalPorts.items.type = "integer"' values.schema.json diff --git a/packages/apps/virtual-machine/README.md b/packages/apps/virtual-machine/README.md index 3846d75b..93e350a8 100644 --- a/packages/apps/virtual-machine/README.md +++ b/packages/apps/virtual-machine/README.md @@ -36,40 +36,233 @@ virtctl ssh @ ### Common parameters -| Name | Description | Value | -| ------------------ | ---------------------------------------------------------------------------------------------------------- | ---------------- | -| `external` | Enable external access from outside the cluster | `false` | -| `externalPorts` | Specify ports to forward from outside the cluster | `[]` | -| `running` | Determines if the virtual machine should be running | `true` | -| `image` | The base image for the virtual machine. Allowed values: `ubuntu`, `cirros`, `alpine`, `fedora` and `talos` | `ubuntu` | -| `storageClass` | StorageClass used to store the data | `replicated` | -| `resources.cpu` | The number of CPU cores allocated to the virtual machine | `1` | -| `resources.memory` | The amount of memory allocated to the virtual machine | `1024M` | -| `resources.disk` | The size of the disk allocated for the virtual machine | `5Gi` | -| `sshKeys` | List of SSH public keys for authentication. Can be a single key or a list of keys. | `[]` | -| `cloudInit` | cloud-init user data config. See cloud-init documentation for more details. | `#cloud-config +| Name | Description | Value | +| ------------------------- | ---------------------------------------------------------------------------------- | ---------------- | +| `external` | Enable external access from outside the cluster | `false` | +| `externalPorts` | Specify ports to forward from outside the cluster | `[]` | +| `running` | Determines if the virtual machine should be running | `true` | +| `instanceType` | Virtual Machine instance type | `u1.medium` | +| `instanceProfile` | Virtual Machine prefferences profile | `ubuntu` | +| `systemDisk.origin` | The HTTP URL for source image | `""` | +| `systemDisk.storage` | The size of the disk allocated for the virtual machine | `5Gi` | +| `systemDisk.storageClass` | StorageClass used to store the data | `replicated` | +| `resources.cpu` | The number of CPU cores allocated to the virtual machine | `""` | +| `resources.memory` | The amount of memory allocated to the virtual machine | `""` | +| `sshKeys` | List of SSH public keys for authentication. Can be a single key or a list of keys. | `[]` | +| `cloudInit` | cloud-init user data config. See cloud-init documentation for more details. | `#cloud-config ` | -You can customize the exposed ports by specifying them under `service.ports` in the `values.yaml` file. +## U Series -## Example virtual machine: +The U Series is quite neutral and provides resources for +general purpose applications. -```yaml -running: true -image: fedora -storageClass: replicated -resources: - cpu: 1 - memory: 1024M - disk: 10Gi +*U* is the abbreviation for "Universal", hinting at the universal +attitude towards workloads. -sshKeys: -- ssh-rsa ... +VMs of instance types will share physical CPU cores on a +time-slice basis with other VMs. -cloudInit: | - #cloud-config - user: fedora - password: fedora - chpasswd: { expire: False } - ssh_pwauth: True -``` +### U Series Characteristics + +Specific characteristics of this series are: +- *Burstable CPU performance* - The workload has a baseline compute + performance but is permitted to burst beyond this baseline, if + excess compute resources are available. +- *vCPU-To-Memory Ratio (1:4)* - A vCPU-to-Memory ratio of 1:4, for less + noise per node. + +## O Series + +The O Series is based on the U Series, with the only difference +being that memory is overcommitted. + +*O* is the abbreviation for "Overcommitted". + +### UO Series Characteristics + +Specific characteristics of this series are: +- *Burstable CPU performance* - The workload has a baseline compute + performance but is permitted to burst beyond this baseline, if + excess compute resources are available. +- *Overcommitted Memory* - Memory is over-committed in order to achieve + a higher workload density. +- *vCPU-To-Memory Ratio (1:4)* - A vCPU-to-Memory ratio of 1:4, for less + noise per node. + +## CX Series + +The CX Series provides exclusive compute resources for compute +intensive applications. + +*CX* is the abbreviation of "Compute Exclusive". + +The exclusive resources are given to the compute threads of the +VM. In order to ensure this, some additional cores (depending +on the number of disks and NICs) will be requested to offload +the IO threading from cores dedicated to the workload. +In addition, in this series, the NUMA topology of the used +cores is provided to the VM. + +### CX Series Characteristics + +Specific characteristics of this series are: +- *Hugepages* - Hugepages are used in order to improve memory + performance. +- *Dedicated CPU* - Physical cores are exclusively assigned to every + vCPU in order to provide fixed and high compute guarantees to the + workload. +- *Isolated emulator threads* - Hypervisor emulator threads are isolated + from the vCPUs in order to reduce emaulation related impact on the + workload. +- *vNUMA* - Physical NUMA topology is reflected in the guest in order to + optimize guest sided cache utilization. +- *vCPU-To-Memory Ratio (1:2)* - A vCPU-to-Memory ratio of 1:2. + +## M Series + +The M Series provides resources for memory intensive +applications. + +*M* is the abbreviation of "Memory". + +### M Series Characteristics + +Specific characteristics of this series are: +- *Hugepages* - Hugepages are used in order to improve memory + performance. +- *Burstable CPU performance* - The workload has a baseline compute + performance but is permitted to burst beyond this baseline, if + excess compute resources are available. +- *vCPU-To-Memory Ratio (1:8)* - A vCPU-to-Memory ratio of 1:8, for much + less noise per node. + +## RT Series + +The RT Series provides resources for realtime applications, like Oslat. + +*RT* is the abbreviation for "realtime". + +This series of instance types requires nodes capable of running +realtime applications. + +### RT Series Characteristics + +Specific characteristics of this series are: +- *Hugepages* - Hugepages are used in order to improve memory + performance. +- *Dedicated CPU* - Physical cores are exclusively assigned to every + vCPU in order to provide fixed and high compute guarantees to the + workload. +- *Isolated emulator threads* - Hypervisor emulator threads are isolated + from the vCPUs in order to reduce emaulation related impact on the + workload. +- *vCPU-To-Memory Ratio (1:4)* - A vCPU-to-Memory ratio of 1:4 starting from + the medium size. + +## Development + +To get started with customizing or creating your own instancetypes and preferences +see [DEVELOPMENT.md](./DEVELOPMENT.md). + +## Resources + +The following instancetype resources are provided by Cozystack: + +Name | vCPUs | Memory +-----|-------|------- +cx1.2xlarge | 8 | 16Gi +cx1.4xlarge | 16 | 32Gi +cx1.8xlarge | 32 | 64Gi +cx1.large | 2 | 4Gi +cx1.medium | 1 | 2Gi +cx1.xlarge | 4 | 8Gi +gn1.2xlarge | 8 | 32Gi +gn1.4xlarge | 16 | 64Gi +gn1.8xlarge | 32 | 128Gi +gn1.xlarge | 4 | 16Gi +m1.2xlarge | 8 | 64Gi +m1.4xlarge | 16 | 128Gi +m1.8xlarge | 32 | 256Gi +m1.large | 2 | 16Gi +m1.xlarge | 4 | 32Gi +n1.2xlarge | 16 | 32Gi +n1.4xlarge | 32 | 64Gi +n1.8xlarge | 64 | 128Gi +n1.large | 4 | 8Gi +n1.medium | 4 | 4Gi +n1.xlarge | 8 | 16Gi +o1.2xlarge | 8 | 32Gi +o1.4xlarge | 16 | 64Gi +o1.8xlarge | 32 | 128Gi +o1.large | 2 | 8Gi +o1.medium | 1 | 4Gi +o1.micro | 1 | 1Gi +o1.nano | 1 | 512Mi +o1.small | 1 | 2Gi +o1.xlarge | 4 | 16Gi +rt1.2xlarge | 8 | 32Gi +rt1.4xlarge | 16 | 64Gi +rt1.8xlarge | 32 | 128Gi +rt1.large | 2 | 8Gi +rt1.medium | 1 | 4Gi +rt1.micro | 1 | 1Gi +rt1.small | 1 | 2Gi +rt1.xlarge | 4 | 16Gi +u1.2xlarge | 8 | 32Gi +u1.2xmedium | 2 | 4Gi +u1.4xlarge | 16 | 64Gi +u1.8xlarge | 32 | 128Gi +u1.large | 2 | 8Gi +u1.medium | 1 | 4Gi +u1.micro | 1 | 1Gi +u1.nano | 1 | 512Mi +u1.small | 1 | 2Gi +u1.xlarge | 4 | 16Gi + +The following preference resources are provided by Cozystack: + +Name | Guest OS +-----|--------- +alpine | Alpine +centos.7 | CentOS 7 +centos.7.desktop | CentOS 7 +centos.stream10 | CentOS Stream 10 +centos.stream10.desktop | CentOS Stream 10 +centos.stream8 | CentOS Stream 8 +centos.stream8.desktop | CentOS Stream 8 +centos.stream8.dpdk | CentOS Stream 8 +centos.stream9 | CentOS Stream 9 +centos.stream9.desktop | CentOS Stream 9 +centos.stream9.dpdk | CentOS Stream 9 +cirros | Cirros +fedora | Fedora (amd64) +fedora.arm64 | Fedora (arm64) +opensuse.leap | OpenSUSE Leap +opensuse.tumbleweed | OpenSUSE Tumbleweed +rhel.10 | Red Hat Enterprise Linux 10 Beta (amd64) +rhel.10.arm64 | Red Hat Enterprise Linux 10 Beta (arm64) +rhel.7 | Red Hat Enterprise Linux 7 +rhel.7.desktop | Red Hat Enterprise Linux 7 +rhel.8 | Red Hat Enterprise Linux 8 +rhel.8.desktop | Red Hat Enterprise Linux 8 +rhel.8.dpdk | Red Hat Enterprise Linux 8 +rhel.9 | Red Hat Enterprise Linux 9 (amd64) +rhel.9.arm64 | Red Hat Enterprise Linux 9 (arm64) +rhel.9.desktop | Red Hat Enterprise Linux 9 Desktop (amd64) +rhel.9.dpdk | Red Hat Enterprise Linux 9 DPDK (amd64) +rhel.9.realtime | Red Hat Enterprise Linux 9 Realtime (amd64) +sles | SUSE Linux Enterprise Server +ubuntu | Ubuntu +windows.10 | Microsoft Windows 10 +windows.10.virtio | Microsoft Windows 10 (virtio) +windows.11 | Microsoft Windows 11 +windows.11.virtio | Microsoft Windows 11 (virtio) +windows.2k16 | Microsoft Windows Server 2016 +windows.2k16.virtio | Microsoft Windows Server 2016 (virtio) +windows.2k19 | Microsoft Windows Server 2019 +windows.2k19.virtio | Microsoft Windows Server 2019 (virtio) +windows.2k22 | Microsoft Windows Server 2022 +windows.2k22.virtio | Microsoft Windows Server 2022 (virtio) +windows.2k25 | Microsoft Windows Server 2025 +windows.2k25.virtio | Microsoft Windows Server 2025 (virtio) diff --git a/packages/apps/virtual-machine/hack/update-instance-types.sh b/packages/apps/virtual-machine/hack/update-instance-types.sh new file mode 100755 index 00000000..1a248525 --- /dev/null +++ b/packages/apps/virtual-machine/hack/update-instance-types.sh @@ -0,0 +1 @@ +#!/bin/sh diff --git a/packages/apps/virtual-machine/templates/vm.yaml b/packages/apps/virtual-machine/templates/vm.yaml index f2a07904..f4a1471b 100644 --- a/packages/apps/virtual-machine/templates/vm.yaml +++ b/packages/apps/virtual-machine/templates/vm.yaml @@ -1,3 +1,10 @@ +{{- if and .Values.instanceType (not (lookup "instancetype.kubevirt.io/v1beta1" "VirtualMachineClusterInstancetype" "" .Values.instanceType)) }} +{{- fail (printf "Specified instancetype not exists in cluster: %s" .Values.instanceType) }} +{{- end }} +{{- if and .Values.instanceProfile (not (lookup "instancetype.kubevirt.io/v1beta1" "VirtualMachineClusterPreference" "" .Values.instanceProfile)) }} +{{- fail (printf "Specified profile not exists in cluster: %s" .Values.instanceProfile) }} +{{- end }} + apiVersion: kubevirt.io/v1 kind: VirtualMachine metadata: @@ -6,6 +13,16 @@ metadata: {{- include "virtual-machine.labels" . | nindent 4 }} spec: running: {{ .Values.running | default "true" }} + {{- with .Values.instanceType }} + instancetype: + kind: VirtualMachineClusterInstancetype + name: {{ . }} + {{- end }} + {{- with .Values.instanceProfile }} + preference: + kind: VirtualMachineClusterPreference + name: {{ . }} + {{- end }} dataVolumeTemplates: - metadata: name: {{ include "virtual-machine.fullname" . }} @@ -16,23 +33,18 @@ spec: - ReadWriteMany resources: requests: - storage: {{ .Values.resources.disk | quote }} - {{- with $.Values.storageClass }} + storage: {{ $.Values.systemDisk.storage | quote }} + {{- with $.Values.systemDisk.storageClass }} storageClassName: {{ . }} {{- end }} source: + {{- if $.Values.systemDisk.origin }} http: - {{- if eq .Values.image "cirros" }} - url: https://download.cirros-cloud.net/0.6.2/cirros-0.6.2-x86_64-disk.img - {{- else if eq .Values.image "ubuntu" }} - url: https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img - {{- else if eq .Values.image "fedora" }} - url: https://download.fedoraproject.org/pub/fedora/linux/releases/40/Cloud/x86_64/images/Fedora-Cloud-Base-Generic.x86_64-40-1.14.qcow2 - {{- else if eq .Values.image "alpine" }} - url: https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/cloud/nocloud_alpine-3.20.2-x86_64-bios-tiny-r0.qcow2 - {{- else if eq .Values.image "talos" }} - url: https://github.com/siderolabs/talos/releases/download/v1.7.6/nocloud-amd64.raw.xz - {{- end }} + url: {{ $.Values.systemDisk.origin }} + {{- else }} + blank: {} + {{- end }} + template: metadata: annotations: @@ -41,8 +53,15 @@ spec: {{- include "virtual-machine.labels" . | nindent 8 }} spec: domain: + {{- if and .Values.resources .Values.resources.cpu }} cpu: cores: {{ .Values.resources.cpu }} + {{- end }} + {{- if and .Values.resources .Values.resources.memory }} + resources: + requests: + memory: {{ .Values.resources.memory | quote }} + {{- end }} devices: disks: - disk: @@ -58,9 +77,6 @@ spec: bridge: {} machine: type: "" - resources: - requests: - memory: {{ .Values.resources.memory | quote }} {{- with .Values.sshKeys }} accessCredentials: - sshPublicKey: diff --git a/packages/apps/virtual-machine/values.schema.json b/packages/apps/virtual-machine/values.schema.json index 2c248e4f..c5d8daf8 100644 --- a/packages/apps/virtual-machine/values.schema.json +++ b/packages/apps/virtual-machine/values.schema.json @@ -20,41 +20,146 @@ "description": "Determines if the virtual machine should be running", "default": true }, - "image": { + "instanceType": { "type": "string", - "description": "The base image for the virtual machine. Allowed values: `ubuntu`, `cirros`, `alpine`, `fedora` and `talos`", + "description": "Virtual Machine instance type", + "default": "u1.medium", + "optional": true, + "enum": [ + "cx1.2xlarge", + "cx1.4xlarge", + "cx1.8xlarge", + "cx1.large", + "cx1.medium", + "cx1.xlarge", + "gn1.2xlarge", + "gn1.4xlarge", + "gn1.8xlarge", + "gn1.xlarge", + "m1.2xlarge", + "m1.4xlarge", + "m1.8xlarge", + "m1.large", + "m1.xlarge", + "n1.2xlarge", + "n1.4xlarge", + "n1.8xlarge", + "n1.large", + "n1.medium", + "n1.xlarge", + "o1.2xlarge", + "o1.4xlarge", + "o1.8xlarge", + "o1.large", + "o1.medium", + "o1.micro", + "o1.nano", + "o1.small", + "o1.xlarge", + "rt1.2xlarge", + "rt1.4xlarge", + "rt1.8xlarge", + "rt1.large", + "rt1.medium", + "rt1.micro", + "rt1.small", + "rt1.xlarge", + "u1.2xlarge", + "u1.2xmedium", + "u1.4xlarge", + "u1.8xlarge", + "u1.large", + "u1.medium", + "u1.micro", + "u1.nano", + "u1.small", + "u1.xlarge", + "" + ] + }, + "instanceProfile": { + "type": "string", + "description": "Virtual Machine prefferences profile", "default": "ubuntu", + "optional": true, "enum": [ - "ubuntu", - "cirros", "alpine", + "centos.7", + "centos.7.desktop", + "centos.stream10", + "centos.stream10.desktop", + "centos.stream8", + "centos.stream8.desktop", + "centos.stream8.dpdk", + "centos.stream9", + "centos.stream9.desktop", + "centos.stream9.dpdk", + "cirros", "fedora", - "talos" + "fedora.arm64", + "opensuse.leap", + "opensuse.tumbleweed", + "rhel.10", + "rhel.10.arm64", + "rhel.7", + "rhel.7.desktop", + "rhel.8", + "rhel.8.desktop", + "rhel.8.dpdk", + "rhel.9", + "rhel.9.arm64", + "rhel.9.desktop", + "rhel.9.dpdk", + "rhel.9.realtime", + "sles", + "ubuntu", + "windows.10", + "windows.10.virtio", + "windows.11", + "windows.11.virtio", + "windows.2k16", + "windows.2k16.virtio", + "windows.2k19", + "windows.2k19.virtio", + "windows.2k22", + "windows.2k22.virtio", + "windows.2k25", + "windows.2k25.virtio", + "" ] }, - "storageClass": { - "type": "string", - "description": "StorageClass used to store the data", - "default": "replicated" + "systemDisk": { + "type": "object", + "properties": { + "origin": { + "type": "string", + "description": "The HTTP URL for source image", + "default": "" + }, + "storage": { + "type": "string", + "description": "The size of the disk allocated for the virtual machine", + "default": "5Gi" + }, + "storageClass": { + "type": "string", + "description": "StorageClass used to store the data", + "default": "replicated" + } + } }, "resources": { "type": "object", "properties": { "cpu": { - "type": "number", + "type": "string", "description": "The number of CPU cores allocated to the virtual machine", - "default": 1 + "default": "" }, "memory": { "type": "string", "description": "The amount of memory allocated to the virtual machine", - "default": "1024M", - "x-display": "slider" - }, - "disk": { - "type": "string", - "description": "The size of the disk allocated for the virtual machine", - "default": "5Gi" + "default": "" } } }, diff --git a/packages/apps/virtual-machine/values.yaml b/packages/apps/virtual-machine/values.yaml index 6d8f79f0..1e6597db 100644 --- a/packages/apps/virtual-machine/values.yaml +++ b/packages/apps/virtual-machine/values.yaml @@ -2,24 +2,33 @@ ## @param external Enable external access from outside the cluster ## @param externalPorts [array] Specify ports to forward from outside the cluster -## @param running Determines if the virtual machine should be running -## @param image The base image for the virtual machine. Allowed values: `ubuntu`, `cirros`, `alpine`, `fedora` and `talos` -## @param storageClass StorageClass used to store the data -## @param resources.cpu The number of CPU cores allocated to the virtual machine -## @param resources.memory The amount of memory allocated to the virtual machine -## @param resources.disk The size of the disk allocated for the virtual machine - external: false externalPorts: - 22 +## @param running Determines if the virtual machine should be running running: true -image: ubuntu -storageClass: replicated + +## @param instanceType Virtual Machine instance type +## @param instanceProfile Virtual Machine prefferences profile +## +instanceType: "u1.medium" +instanceProfile: ubuntu + +## @param systemDisk.origin The HTTP URL for source image +## @param systemDisk.storage The size of the disk allocated for the virtual machine +## @param systemDisk.storageClass StorageClass used to store the data +## +systemDisk: + origin: "" + storage: 5Gi + storageClass: replicated + +## @param resources.cpu The number of CPU cores allocated to the virtual machine +## @param resources.memory The amount of memory allocated to the virtual machine resources: - cpu: 1 - memory: 1024M - disk: 5Gi + cpu: "" + memory: "" ## @param sshKeys [array] List of SSH public keys for authentication. Can be a single key or a list of keys. ## Example: @@ -40,4 +49,3 @@ sshKeys: [] ## cloudInit: | #cloud-config - diff --git a/packages/core/platform/bundles/paas-full.yaml b/packages/core/platform/bundles/paas-full.yaml index 0ecf1527..0397933c 100644 --- a/packages/core/platform/bundles/paas-full.yaml +++ b/packages/core/platform/bundles/paas-full.yaml @@ -79,6 +79,12 @@ releases: privileged: true dependsOn: [cilium,kubeovn,kubevirt-operator] +- name: kubevirt-common-instancetypes + releaseName: kubevirt-common-instancetypes + chart: cozy-kubevirt-common-instancetypes + namespace: cozy-kubevirt + dependsOn: [cilium,kubeovn,kubevirt-operator,kubevirt] + - name: kubevirt-cdi-operator releaseName: kubevirt-cdi-operator chart: cozy-kubevirt-cdi-operator diff --git a/packages/system/kubevirt-common-instancetypes/Chart.yaml b/packages/system/kubevirt-common-instancetypes/Chart.yaml new file mode 100644 index 00000000..6a352088 --- /dev/null +++ b/packages/system/kubevirt-common-instancetypes/Chart.yaml @@ -0,0 +1,3 @@ +apiVersion: v2 +name: cozy-kubevirt +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process diff --git a/packages/system/kubevirt-common-instancetypes/Makefile b/packages/system/kubevirt-common-instancetypes/Makefile new file mode 100644 index 00000000..ced6c784 --- /dev/null +++ b/packages/system/kubevirt-common-instancetypes/Makefile @@ -0,0 +1,12 @@ +export NAME=kubevirt-common-instancetypes +export NAMESPACE=cozy-kubevirt + +include ../../../scripts/package.mk + +update: + rm -rf templates + mkdir templates + kustomize build https://github.com/kubevirt/common-instancetypes/preferences > templates/preferences.yaml + yq -i 'select(.kind != "VirtualMachinePreference")' templates/preferences.yaml + kustomize build https://github.com/kubevirt/common-instancetypes/instancetypes > templates/instancetypes.yaml + yq -i 'select(.kind != "VirtualMachineInstancetype")' templates/instancetypes.yaml diff --git a/packages/system/kubevirt-common-instancetypes/templates/instancetypes.yaml b/packages/system/kubevirt-common-instancetypes/templates/instancetypes.yaml new file mode 100644 index 00000000..a4dfe2e9 --- /dev/null +++ b/packages/system/kubevirt-common-instancetypes/templates/instancetypes.yaml @@ -0,0 +1,1649 @@ +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The CX Series provides exclusive compute resources for compute + intensive applications. + + *CX* is the abbreviation of "Compute Exclusive". + + The exclusive resources are given to the compute threads of the + VM. In order to ensure this, some additional cores (depending + on the number of disks and NICs) will be requested to offload + the IO threading from cores dedicated to the workload. + In addition, in this series, the NUMA topology of the used + cores is provided to the VM. + instancetype.kubevirt.io/displayName: Compute Exclusive + labels: + instancetype.kubevirt.io/class: compute.exclusive + instancetype.kubevirt.io/cpu: "8" + instancetype.kubevirt.io/dedicatedCPUPlacement: "true" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: pficon-registry + instancetype.kubevirt.io/isolateEmulatorThread: "true" + instancetype.kubevirt.io/memory: 16Gi + instancetype.kubevirt.io/numa: "true" + instancetype.kubevirt.io/size: 2xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: cx1.2xlarge +spec: + cpu: + dedicatedCPUPlacement: true + guest: 8 + isolateEmulatorThread: true + numa: + guestMappingPassthrough: {} + ioThreadsPolicy: auto + memory: + guest: 16Gi + hugepages: + pageSize: 2Mi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The CX Series provides exclusive compute resources for compute + intensive applications. + + *CX* is the abbreviation of "Compute Exclusive". + + The exclusive resources are given to the compute threads of the + VM. In order to ensure this, some additional cores (depending + on the number of disks and NICs) will be requested to offload + the IO threading from cores dedicated to the workload. + In addition, in this series, the NUMA topology of the used + cores is provided to the VM. + instancetype.kubevirt.io/displayName: Compute Exclusive + labels: + instancetype.kubevirt.io/class: compute.exclusive + instancetype.kubevirt.io/cpu: "16" + instancetype.kubevirt.io/dedicatedCPUPlacement: "true" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: pficon-registry + instancetype.kubevirt.io/isolateEmulatorThread: "true" + instancetype.kubevirt.io/memory: 32Gi + instancetype.kubevirt.io/numa: "true" + instancetype.kubevirt.io/size: 4xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: cx1.4xlarge +spec: + cpu: + dedicatedCPUPlacement: true + guest: 16 + isolateEmulatorThread: true + numa: + guestMappingPassthrough: {} + ioThreadsPolicy: auto + memory: + guest: 32Gi + hugepages: + pageSize: 2Mi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The CX Series provides exclusive compute resources for compute + intensive applications. + + *CX* is the abbreviation of "Compute Exclusive". + + The exclusive resources are given to the compute threads of the + VM. In order to ensure this, some additional cores (depending + on the number of disks and NICs) will be requested to offload + the IO threading from cores dedicated to the workload. + In addition, in this series, the NUMA topology of the used + cores is provided to the VM. + instancetype.kubevirt.io/displayName: Compute Exclusive + labels: + instancetype.kubevirt.io/class: compute.exclusive + instancetype.kubevirt.io/cpu: "32" + instancetype.kubevirt.io/dedicatedCPUPlacement: "true" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: pficon-registry + instancetype.kubevirt.io/isolateEmulatorThread: "true" + instancetype.kubevirt.io/memory: 64Gi + instancetype.kubevirt.io/numa: "true" + instancetype.kubevirt.io/size: 8xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: cx1.8xlarge +spec: + cpu: + dedicatedCPUPlacement: true + guest: 32 + isolateEmulatorThread: true + numa: + guestMappingPassthrough: {} + ioThreadsPolicy: auto + memory: + guest: 64Gi + hugepages: + pageSize: 2Mi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The CX Series provides exclusive compute resources for compute + intensive applications. + + *CX* is the abbreviation of "Compute Exclusive". + + The exclusive resources are given to the compute threads of the + VM. In order to ensure this, some additional cores (depending + on the number of disks and NICs) will be requested to offload + the IO threading from cores dedicated to the workload. + In addition, in this series, the NUMA topology of the used + cores is provided to the VM. + instancetype.kubevirt.io/displayName: Compute Exclusive + labels: + instancetype.kubevirt.io/class: compute.exclusive + instancetype.kubevirt.io/cpu: "2" + instancetype.kubevirt.io/dedicatedCPUPlacement: "true" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: pficon-registry + instancetype.kubevirt.io/isolateEmulatorThread: "true" + instancetype.kubevirt.io/memory: 4Gi + instancetype.kubevirt.io/numa: "true" + instancetype.kubevirt.io/size: large + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: cx1.large +spec: + cpu: + dedicatedCPUPlacement: true + guest: 2 + isolateEmulatorThread: true + numa: + guestMappingPassthrough: {} + ioThreadsPolicy: auto + memory: + guest: 4Gi + hugepages: + pageSize: 2Mi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The CX Series provides exclusive compute resources for compute + intensive applications. + + *CX* is the abbreviation of "Compute Exclusive". + + The exclusive resources are given to the compute threads of the + VM. In order to ensure this, some additional cores (depending + on the number of disks and NICs) will be requested to offload + the IO threading from cores dedicated to the workload. + In addition, in this series, the NUMA topology of the used + cores is provided to the VM. + instancetype.kubevirt.io/displayName: Compute Exclusive + labels: + instancetype.kubevirt.io/class: compute.exclusive + instancetype.kubevirt.io/cpu: "1" + instancetype.kubevirt.io/dedicatedCPUPlacement: "true" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: pficon-registry + instancetype.kubevirt.io/isolateEmulatorThread: "true" + instancetype.kubevirt.io/memory: 2Gi + instancetype.kubevirt.io/numa: "true" + instancetype.kubevirt.io/size: medium + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: cx1.medium +spec: + cpu: + dedicatedCPUPlacement: true + guest: 1 + isolateEmulatorThread: true + numa: + guestMappingPassthrough: {} + ioThreadsPolicy: auto + memory: + guest: 2Gi + hugepages: + pageSize: 2Mi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The CX Series provides exclusive compute resources for compute + intensive applications. + + *CX* is the abbreviation of "Compute Exclusive". + + The exclusive resources are given to the compute threads of the + VM. In order to ensure this, some additional cores (depending + on the number of disks and NICs) will be requested to offload + the IO threading from cores dedicated to the workload. + In addition, in this series, the NUMA topology of the used + cores is provided to the VM. + instancetype.kubevirt.io/displayName: Compute Exclusive + labels: + instancetype.kubevirt.io/class: compute.exclusive + instancetype.kubevirt.io/cpu: "4" + instancetype.kubevirt.io/dedicatedCPUPlacement: "true" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: pficon-registry + instancetype.kubevirt.io/isolateEmulatorThread: "true" + instancetype.kubevirt.io/memory: 8Gi + instancetype.kubevirt.io/numa: "true" + instancetype.kubevirt.io/size: xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: cx1.xlarge +spec: + cpu: + dedicatedCPUPlacement: true + guest: 4 + isolateEmulatorThread: true + numa: + guestMappingPassthrough: {} + ioThreadsPolicy: auto + memory: + guest: 8Gi + hugepages: + pageSize: 2Mi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The GN Series provides instances types intended for VMs with + NVIDIA GPU resources attached. + + *GN* is the abbreviation of "GPU NVIDIA". + + This series is intended to be used with VMs consuming GPUs + provided by the + [NVIDIA GPU Operator](https://github.com/NVIDIA/gpu-operator) + which can be installed on Kubernetes and also is made available + on OpenShift via OperatorHub. + instancetype.kubevirt.io/displayName: GPU NVIDIA + labels: + instancetype.kubevirt.io/class: gpu.nvidia + instancetype.kubevirt.io/cpu: "8" + instancetype.kubevirt.io/deprecated: "true" + instancetype.kubevirt.io/gpus: "true" + instancetype.kubevirt.io/icon-pf: fa-microchip + instancetype.kubevirt.io/memory: 32Gi + instancetype.kubevirt.io/size: 2xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: gn1.2xlarge +spec: + cpu: + guest: 8 + gpus: + - deviceName: nvidia.com/A400 + name: gpu1 + memory: + guest: 32Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The GN Series provides instances types intended for VMs with + NVIDIA GPU resources attached. + + *GN* is the abbreviation of "GPU NVIDIA". + + This series is intended to be used with VMs consuming GPUs + provided by the + [NVIDIA GPU Operator](https://github.com/NVIDIA/gpu-operator) + which can be installed on Kubernetes and also is made available + on OpenShift via OperatorHub. + instancetype.kubevirt.io/displayName: GPU NVIDIA + labels: + instancetype.kubevirt.io/class: gpu.nvidia + instancetype.kubevirt.io/cpu: "16" + instancetype.kubevirt.io/deprecated: "true" + instancetype.kubevirt.io/gpus: "true" + instancetype.kubevirt.io/icon-pf: fa-microchip + instancetype.kubevirt.io/memory: 64Gi + instancetype.kubevirt.io/size: 4xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: gn1.4xlarge +spec: + cpu: + guest: 16 + gpus: + - deviceName: nvidia.com/A400 + name: gpu1 + memory: + guest: 64Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The GN Series provides instances types intended for VMs with + NVIDIA GPU resources attached. + + *GN* is the abbreviation of "GPU NVIDIA". + + This series is intended to be used with VMs consuming GPUs + provided by the + [NVIDIA GPU Operator](https://github.com/NVIDIA/gpu-operator) + which can be installed on Kubernetes and also is made available + on OpenShift via OperatorHub. + instancetype.kubevirt.io/displayName: GPU NVIDIA + labels: + instancetype.kubevirt.io/class: gpu.nvidia + instancetype.kubevirt.io/cpu: "32" + instancetype.kubevirt.io/deprecated: "true" + instancetype.kubevirt.io/gpus: "true" + instancetype.kubevirt.io/icon-pf: fa-microchip + instancetype.kubevirt.io/memory: 128Gi + instancetype.kubevirt.io/size: 8xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: gn1.8xlarge +spec: + cpu: + guest: 32 + gpus: + - deviceName: nvidia.com/A400 + name: gpu1 + memory: + guest: 128Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The GN Series provides instances types intended for VMs with + NVIDIA GPU resources attached. + + *GN* is the abbreviation of "GPU NVIDIA". + + This series is intended to be used with VMs consuming GPUs + provided by the + [NVIDIA GPU Operator](https://github.com/NVIDIA/gpu-operator) + which can be installed on Kubernetes and also is made available + on OpenShift via OperatorHub. + instancetype.kubevirt.io/displayName: GPU NVIDIA + labels: + instancetype.kubevirt.io/class: gpu.nvidia + instancetype.kubevirt.io/cpu: "4" + instancetype.kubevirt.io/deprecated: "true" + instancetype.kubevirt.io/gpus: "true" + instancetype.kubevirt.io/icon-pf: fa-microchip + instancetype.kubevirt.io/memory: 16Gi + instancetype.kubevirt.io/size: xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: gn1.xlarge +spec: + cpu: + guest: 4 + gpus: + - deviceName: nvidia.com/A400 + name: gpu1 + memory: + guest: 16Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The M Series provides resources for memory intensive + applications. + + *M* is the abbreviation of "Memory". + instancetype.kubevirt.io/displayName: Memory Intensive + labels: + instancetype.kubevirt.io/class: memory.intensive + instancetype.kubevirt.io/cpu: "8" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: fa-memory + instancetype.kubevirt.io/memory: 64Gi + instancetype.kubevirt.io/size: 2xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: m1.2xlarge +spec: + cpu: + guest: 8 + memory: + guest: 64Gi + hugepages: + pageSize: 2Mi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The M Series provides resources for memory intensive + applications. + + *M* is the abbreviation of "Memory". + instancetype.kubevirt.io/displayName: Memory Intensive + labels: + instancetype.kubevirt.io/class: memory.intensive + instancetype.kubevirt.io/cpu: "16" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: fa-memory + instancetype.kubevirt.io/memory: 128Gi + instancetype.kubevirt.io/size: 4xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: m1.4xlarge +spec: + cpu: + guest: 16 + memory: + guest: 128Gi + hugepages: + pageSize: 2Mi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The M Series provides resources for memory intensive + applications. + + *M* is the abbreviation of "Memory". + instancetype.kubevirt.io/displayName: Memory Intensive + labels: + instancetype.kubevirt.io/class: memory.intensive + instancetype.kubevirt.io/cpu: "32" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: fa-memory + instancetype.kubevirt.io/memory: 256Gi + instancetype.kubevirt.io/size: 8xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: m1.8xlarge +spec: + cpu: + guest: 32 + memory: + guest: 256Gi + hugepages: + pageSize: 2Mi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The M Series provides resources for memory intensive + applications. + + *M* is the abbreviation of "Memory". + instancetype.kubevirt.io/displayName: Memory Intensive + labels: + instancetype.kubevirt.io/class: memory.intensive + instancetype.kubevirt.io/cpu: "2" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: fa-memory + instancetype.kubevirt.io/memory: 16Gi + instancetype.kubevirt.io/size: large + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: m1.large +spec: + cpu: + guest: 2 + memory: + guest: 16Gi + hugepages: + pageSize: 2Mi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The M Series provides resources for memory intensive + applications. + + *M* is the abbreviation of "Memory". + instancetype.kubevirt.io/displayName: Memory Intensive + labels: + instancetype.kubevirt.io/class: memory.intensive + instancetype.kubevirt.io/cpu: "4" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: fa-memory + instancetype.kubevirt.io/memory: 32Gi + instancetype.kubevirt.io/size: xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: m1.xlarge +spec: + cpu: + guest: 4 + memory: + guest: 32Gi + hugepages: + pageSize: 2Mi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The N Series provides resources for network intensive DPDK + applications, like VNFs. + + *N* is the abbreviation for "Network". + + This series of instancetypes requires nodes capable + of running DPDK workloads and being marked with the respective + node-role.kubevirt.io/worker-dpdk label as such. + instancetype.kubevirt.io/displayName: Network + labels: + instancetype.kubevirt.io/class: network + instancetype.kubevirt.io/cpu: "16" + instancetype.kubevirt.io/dedicatedCPUPlacement: "true" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: pficon-network + instancetype.kubevirt.io/isolateEmulatorThread: "true" + instancetype.kubevirt.io/memory: 32Gi + instancetype.kubevirt.io/size: 2xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: n1.2xlarge +spec: + annotations: + cpu-load-balancing.crio.io: disable + cpu-quota.crio.io: disable + irq-load-balancing.crio.io: disable + cpu: + dedicatedCPUPlacement: true + guest: 16 + isolateEmulatorThread: true + memory: + guest: 32Gi + hugepages: + pageSize: 1Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The N Series provides resources for network intensive DPDK + applications, like VNFs. + + *N* is the abbreviation for "Network". + + This series of instancetypes requires nodes capable + of running DPDK workloads and being marked with the respective + node-role.kubevirt.io/worker-dpdk label as such. + instancetype.kubevirt.io/displayName: Network + labels: + instancetype.kubevirt.io/class: network + instancetype.kubevirt.io/cpu: "32" + instancetype.kubevirt.io/dedicatedCPUPlacement: "true" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: pficon-network + instancetype.kubevirt.io/isolateEmulatorThread: "true" + instancetype.kubevirt.io/memory: 64Gi + instancetype.kubevirt.io/size: 4xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: n1.4xlarge +spec: + annotations: + cpu-load-balancing.crio.io: disable + cpu-quota.crio.io: disable + irq-load-balancing.crio.io: disable + cpu: + dedicatedCPUPlacement: true + guest: 32 + isolateEmulatorThread: true + memory: + guest: 64Gi + hugepages: + pageSize: 1Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The N Series provides resources for network intensive DPDK + applications, like VNFs. + + *N* is the abbreviation for "Network". + + This series of instancetypes requires nodes capable + of running DPDK workloads and being marked with the respective + node-role.kubevirt.io/worker-dpdk label as such. + instancetype.kubevirt.io/displayName: Network + labels: + instancetype.kubevirt.io/class: network + instancetype.kubevirt.io/cpu: "64" + instancetype.kubevirt.io/dedicatedCPUPlacement: "true" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: pficon-network + instancetype.kubevirt.io/isolateEmulatorThread: "true" + instancetype.kubevirt.io/memory: 128Gi + instancetype.kubevirt.io/size: 8xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: n1.8xlarge +spec: + annotations: + cpu-load-balancing.crio.io: disable + cpu-quota.crio.io: disable + irq-load-balancing.crio.io: disable + cpu: + dedicatedCPUPlacement: true + guest: 64 + isolateEmulatorThread: true + memory: + guest: 128Gi + hugepages: + pageSize: 1Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The N Series provides resources for network intensive DPDK + applications, like VNFs. + + *N* is the abbreviation for "Network". + + This series of instancetypes requires nodes capable + of running DPDK workloads and being marked with the respective + node-role.kubevirt.io/worker-dpdk label as such. + instancetype.kubevirt.io/displayName: Network + labels: + instancetype.kubevirt.io/class: network + instancetype.kubevirt.io/cpu: "4" + instancetype.kubevirt.io/dedicatedCPUPlacement: "true" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: pficon-network + instancetype.kubevirt.io/isolateEmulatorThread: "true" + instancetype.kubevirt.io/memory: 8Gi + instancetype.kubevirt.io/size: large + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: n1.large +spec: + annotations: + cpu-load-balancing.crio.io: disable + cpu-quota.crio.io: disable + irq-load-balancing.crio.io: disable + cpu: + dedicatedCPUPlacement: true + guest: 4 + isolateEmulatorThread: true + memory: + guest: 8Gi + hugepages: + pageSize: 1Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The N Series provides resources for network intensive DPDK + applications, like VNFs. + + *N* is the abbreviation for "Network". + + This series of instancetypes requires nodes capable + of running DPDK workloads and being marked with the respective + node-role.kubevirt.io/worker-dpdk label as such. + instancetype.kubevirt.io/displayName: Network + labels: + instancetype.kubevirt.io/class: network + instancetype.kubevirt.io/cpu: "4" + instancetype.kubevirt.io/dedicatedCPUPlacement: "true" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: pficon-network + instancetype.kubevirt.io/isolateEmulatorThread: "true" + instancetype.kubevirt.io/memory: 4Gi + instancetype.kubevirt.io/size: medium + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: n1.medium +spec: + annotations: + cpu-load-balancing.crio.io: disable + cpu-quota.crio.io: disable + irq-load-balancing.crio.io: disable + cpu: + dedicatedCPUPlacement: true + guest: 4 + isolateEmulatorThread: true + memory: + guest: 4Gi + hugepages: + pageSize: 1Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The N Series provides resources for network intensive DPDK + applications, like VNFs. + + *N* is the abbreviation for "Network". + + This series of instancetypes requires nodes capable + of running DPDK workloads and being marked with the respective + node-role.kubevirt.io/worker-dpdk label as such. + instancetype.kubevirt.io/displayName: Network + labels: + instancetype.kubevirt.io/class: network + instancetype.kubevirt.io/cpu: "8" + instancetype.kubevirt.io/dedicatedCPUPlacement: "true" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: pficon-network + instancetype.kubevirt.io/isolateEmulatorThread: "true" + instancetype.kubevirt.io/memory: 16Gi + instancetype.kubevirt.io/size: xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: n1.xlarge +spec: + annotations: + cpu-load-balancing.crio.io: disable + cpu-quota.crio.io: disable + irq-load-balancing.crio.io: disable + cpu: + dedicatedCPUPlacement: true + guest: 8 + isolateEmulatorThread: true + memory: + guest: 16Gi + hugepages: + pageSize: 1Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The O Series is based on the U Series, with the only difference + being that memory is overcommitted. + + *O* is the abbreviation for "Overcommitted". + instancetype.kubevirt.io/displayName: Overcommitted + labels: + instancetype.kubevirt.io/class: overcommitted + instancetype.kubevirt.io/cpu: "8" + instancetype.kubevirt.io/icon-pf: pficon-virtual-machine + instancetype.kubevirt.io/memory: 32Gi + instancetype.kubevirt.io/size: 2xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: o1.2xlarge +spec: + cpu: + guest: 8 + memory: + guest: 32Gi + overcommitPercent: 50 +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The O Series is based on the U Series, with the only difference + being that memory is overcommitted. + + *O* is the abbreviation for "Overcommitted". + instancetype.kubevirt.io/displayName: Overcommitted + labels: + instancetype.kubevirt.io/class: overcommitted + instancetype.kubevirt.io/cpu: "16" + instancetype.kubevirt.io/icon-pf: pficon-virtual-machine + instancetype.kubevirt.io/memory: 64Gi + instancetype.kubevirt.io/size: 4xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: o1.4xlarge +spec: + cpu: + guest: 16 + memory: + guest: 64Gi + overcommitPercent: 50 +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The O Series is based on the U Series, with the only difference + being that memory is overcommitted. + + *O* is the abbreviation for "Overcommitted". + instancetype.kubevirt.io/displayName: Overcommitted + labels: + instancetype.kubevirt.io/class: overcommitted + instancetype.kubevirt.io/cpu: "32" + instancetype.kubevirt.io/icon-pf: pficon-virtual-machine + instancetype.kubevirt.io/memory: 128Gi + instancetype.kubevirt.io/size: 8xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: o1.8xlarge +spec: + cpu: + guest: 32 + memory: + guest: 128Gi + overcommitPercent: 50 +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The O Series is based on the U Series, with the only difference + being that memory is overcommitted. + + *O* is the abbreviation for "Overcommitted". + instancetype.kubevirt.io/displayName: Overcommitted + labels: + instancetype.kubevirt.io/class: overcommitted + instancetype.kubevirt.io/cpu: "2" + instancetype.kubevirt.io/icon-pf: pficon-virtual-machine + instancetype.kubevirt.io/memory: 8Gi + instancetype.kubevirt.io/size: large + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: o1.large +spec: + cpu: + guest: 2 + memory: + guest: 8Gi + overcommitPercent: 50 +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The O Series is based on the U Series, with the only difference + being that memory is overcommitted. + + *O* is the abbreviation for "Overcommitted". + instancetype.kubevirt.io/displayName: Overcommitted + labels: + instancetype.kubevirt.io/class: overcommitted + instancetype.kubevirt.io/cpu: "1" + instancetype.kubevirt.io/icon-pf: pficon-virtual-machine + instancetype.kubevirt.io/memory: 4Gi + instancetype.kubevirt.io/size: medium + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: o1.medium +spec: + cpu: + guest: 1 + memory: + guest: 4Gi + overcommitPercent: 50 +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The O Series is based on the U Series, with the only difference + being that memory is overcommitted. + + *O* is the abbreviation for "Overcommitted". + instancetype.kubevirt.io/displayName: Overcommitted + labels: + instancetype.kubevirt.io/class: overcommitted + instancetype.kubevirt.io/cpu: "1" + instancetype.kubevirt.io/icon-pf: pficon-virtual-machine + instancetype.kubevirt.io/memory: 1Gi + instancetype.kubevirt.io/size: micro + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: o1.micro +spec: + cpu: + guest: 1 + memory: + guest: 1Gi + overcommitPercent: 50 +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The O Series is based on the U Series, with the only difference + being that memory is overcommitted. + + *O* is the abbreviation for "Overcommitted". + instancetype.kubevirt.io/displayName: Overcommitted + labels: + instancetype.kubevirt.io/class: overcommitted + instancetype.kubevirt.io/cpu: "1" + instancetype.kubevirt.io/icon-pf: pficon-virtual-machine + instancetype.kubevirt.io/memory: 512Mi + instancetype.kubevirt.io/size: nano + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: o1.nano +spec: + cpu: + guest: 1 + memory: + guest: 512Mi + overcommitPercent: 50 +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The O Series is based on the U Series, with the only difference + being that memory is overcommitted. + + *O* is the abbreviation for "Overcommitted". + instancetype.kubevirt.io/displayName: Overcommitted + labels: + instancetype.kubevirt.io/class: overcommitted + instancetype.kubevirt.io/cpu: "1" + instancetype.kubevirt.io/icon-pf: pficon-virtual-machine + instancetype.kubevirt.io/memory: 2Gi + instancetype.kubevirt.io/size: small + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: o1.small +spec: + cpu: + guest: 1 + memory: + guest: 2Gi + overcommitPercent: 50 +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The O Series is based on the U Series, with the only difference + being that memory is overcommitted. + + *O* is the abbreviation for "Overcommitted". + instancetype.kubevirt.io/displayName: Overcommitted + labels: + instancetype.kubevirt.io/class: overcommitted + instancetype.kubevirt.io/cpu: "4" + instancetype.kubevirt.io/icon-pf: pficon-virtual-machine + instancetype.kubevirt.io/memory: 16Gi + instancetype.kubevirt.io/size: xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: o1.xlarge +spec: + cpu: + guest: 4 + memory: + guest: 16Gi + overcommitPercent: 50 +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The RT Series provides resources for realtime applications, like Oslat. + + *RT* is the abbreviation for "realtime". + + This series of instance types requires nodes capable of running + realtime applications. + instancetype.kubevirt.io/displayName: Realtime + labels: + instancetype.kubevirt.io/class: realtime + instancetype.kubevirt.io/cpu: "8" + instancetype.kubevirt.io/dedicatedCPUPlacement: "true" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: pficon-server-group + instancetype.kubevirt.io/isolateEmulatorThread: "true" + instancetype.kubevirt.io/memory: 32Gi + instancetype.kubevirt.io/numa: "true" + instancetype.kubevirt.io/realtime: "true" + instancetype.kubevirt.io/size: 2xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: rt1.2xlarge +spec: + annotations: + cpu-load-balancing.crio.io: disable + cpu-quota.crio.io: disable + irq-load-balancing.crio.io: disable + cpu: + dedicatedCPUPlacement: true + guest: 8 + isolateEmulatorThread: true + numa: + guestMappingPassthrough: {} + realtime: {} + memory: + guest: 32Gi + hugepages: + pageSize: 1Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The RT Series provides resources for realtime applications, like Oslat. + + *RT* is the abbreviation for "realtime". + + This series of instance types requires nodes capable of running + realtime applications. + instancetype.kubevirt.io/displayName: Realtime + labels: + instancetype.kubevirt.io/class: realtime + instancetype.kubevirt.io/cpu: "16" + instancetype.kubevirt.io/dedicatedCPUPlacement: "true" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: pficon-server-group + instancetype.kubevirt.io/isolateEmulatorThread: "true" + instancetype.kubevirt.io/memory: 64Gi + instancetype.kubevirt.io/numa: "true" + instancetype.kubevirt.io/realtime: "true" + instancetype.kubevirt.io/size: 4xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: rt1.4xlarge +spec: + annotations: + cpu-load-balancing.crio.io: disable + cpu-quota.crio.io: disable + irq-load-balancing.crio.io: disable + cpu: + dedicatedCPUPlacement: true + guest: 16 + isolateEmulatorThread: true + numa: + guestMappingPassthrough: {} + realtime: {} + memory: + guest: 64Gi + hugepages: + pageSize: 1Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The RT Series provides resources for realtime applications, like Oslat. + + *RT* is the abbreviation for "realtime". + + This series of instance types requires nodes capable of running + realtime applications. + instancetype.kubevirt.io/displayName: Realtime + labels: + instancetype.kubevirt.io/class: realtime + instancetype.kubevirt.io/cpu: "32" + instancetype.kubevirt.io/dedicatedCPUPlacement: "true" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: pficon-server-group + instancetype.kubevirt.io/isolateEmulatorThread: "true" + instancetype.kubevirt.io/memory: 128Gi + instancetype.kubevirt.io/numa: "true" + instancetype.kubevirt.io/realtime: "true" + instancetype.kubevirt.io/size: 8xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: rt1.8xlarge +spec: + annotations: + cpu-load-balancing.crio.io: disable + cpu-quota.crio.io: disable + irq-load-balancing.crio.io: disable + cpu: + dedicatedCPUPlacement: true + guest: 32 + isolateEmulatorThread: true + numa: + guestMappingPassthrough: {} + realtime: {} + memory: + guest: 128Gi + hugepages: + pageSize: 1Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The RT Series provides resources for realtime applications, like Oslat. + + *RT* is the abbreviation for "realtime". + + This series of instance types requires nodes capable of running + realtime applications. + instancetype.kubevirt.io/displayName: Realtime + labels: + instancetype.kubevirt.io/class: realtime + instancetype.kubevirt.io/cpu: "2" + instancetype.kubevirt.io/dedicatedCPUPlacement: "true" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: pficon-server-group + instancetype.kubevirt.io/isolateEmulatorThread: "true" + instancetype.kubevirt.io/memory: 8Gi + instancetype.kubevirt.io/numa: "true" + instancetype.kubevirt.io/realtime: "true" + instancetype.kubevirt.io/size: large + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: rt1.large +spec: + annotations: + cpu-load-balancing.crio.io: disable + cpu-quota.crio.io: disable + irq-load-balancing.crio.io: disable + cpu: + dedicatedCPUPlacement: true + guest: 2 + isolateEmulatorThread: true + numa: + guestMappingPassthrough: {} + realtime: {} + memory: + guest: 8Gi + hugepages: + pageSize: 1Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The RT Series provides resources for realtime applications, like Oslat. + + *RT* is the abbreviation for "realtime". + + This series of instance types requires nodes capable of running + realtime applications. + instancetype.kubevirt.io/displayName: Realtime + labels: + instancetype.kubevirt.io/class: realtime + instancetype.kubevirt.io/cpu: "1" + instancetype.kubevirt.io/dedicatedCPUPlacement: "true" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: pficon-server-group + instancetype.kubevirt.io/isolateEmulatorThread: "true" + instancetype.kubevirt.io/memory: 4Gi + instancetype.kubevirt.io/numa: "true" + instancetype.kubevirt.io/realtime: "true" + instancetype.kubevirt.io/size: medium + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: rt1.medium +spec: + annotations: + cpu-load-balancing.crio.io: disable + cpu-quota.crio.io: disable + irq-load-balancing.crio.io: disable + cpu: + dedicatedCPUPlacement: true + guest: 1 + isolateEmulatorThread: true + numa: + guestMappingPassthrough: {} + realtime: {} + memory: + guest: 4Gi + hugepages: + pageSize: 1Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The RT Series provides resources for realtime applications, like Oslat. + + *RT* is the abbreviation for "realtime". + + This series of instance types requires nodes capable of running + realtime applications. + instancetype.kubevirt.io/displayName: Realtime + labels: + instancetype.kubevirt.io/class: realtime + instancetype.kubevirt.io/cpu: "1" + instancetype.kubevirt.io/dedicatedCPUPlacement: "true" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: pficon-server-group + instancetype.kubevirt.io/isolateEmulatorThread: "true" + instancetype.kubevirt.io/memory: 1Gi + instancetype.kubevirt.io/numa: "true" + instancetype.kubevirt.io/realtime: "true" + instancetype.kubevirt.io/size: micro + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: rt1.micro +spec: + annotations: + cpu-load-balancing.crio.io: disable + cpu-quota.crio.io: disable + irq-load-balancing.crio.io: disable + cpu: + dedicatedCPUPlacement: true + guest: 1 + isolateEmulatorThread: true + numa: + guestMappingPassthrough: {} + realtime: {} + memory: + guest: 1Gi + hugepages: + pageSize: 1Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The RT Series provides resources for realtime applications, like Oslat. + + *RT* is the abbreviation for "realtime". + + This series of instance types requires nodes capable of running + realtime applications. + instancetype.kubevirt.io/displayName: Realtime + labels: + instancetype.kubevirt.io/class: realtime + instancetype.kubevirt.io/cpu: "1" + instancetype.kubevirt.io/dedicatedCPUPlacement: "true" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: pficon-server-group + instancetype.kubevirt.io/isolateEmulatorThread: "true" + instancetype.kubevirt.io/memory: 2Gi + instancetype.kubevirt.io/numa: "true" + instancetype.kubevirt.io/realtime: "true" + instancetype.kubevirt.io/size: small + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: rt1.small +spec: + annotations: + cpu-load-balancing.crio.io: disable + cpu-quota.crio.io: disable + irq-load-balancing.crio.io: disable + cpu: + dedicatedCPUPlacement: true + guest: 1 + isolateEmulatorThread: true + numa: + guestMappingPassthrough: {} + realtime: {} + memory: + guest: 2Gi + hugepages: + pageSize: 1Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The RT Series provides resources for realtime applications, like Oslat. + + *RT* is the abbreviation for "realtime". + + This series of instance types requires nodes capable of running + realtime applications. + instancetype.kubevirt.io/displayName: Realtime + labels: + instancetype.kubevirt.io/class: realtime + instancetype.kubevirt.io/cpu: "4" + instancetype.kubevirt.io/dedicatedCPUPlacement: "true" + instancetype.kubevirt.io/hugepages: "true" + instancetype.kubevirt.io/icon-pf: pficon-server-group + instancetype.kubevirt.io/isolateEmulatorThread: "true" + instancetype.kubevirt.io/memory: 16Gi + instancetype.kubevirt.io/numa: "true" + instancetype.kubevirt.io/realtime: "true" + instancetype.kubevirt.io/size: xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: rt1.xlarge +spec: + annotations: + cpu-load-balancing.crio.io: disable + cpu-quota.crio.io: disable + irq-load-balancing.crio.io: disable + cpu: + dedicatedCPUPlacement: true + guest: 4 + isolateEmulatorThread: true + numa: + guestMappingPassthrough: {} + realtime: {} + memory: + guest: 16Gi + hugepages: + pageSize: 1Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The U Series is quite neutral and provides resources for + general purpose applications. + + *U* is the abbreviation for "Universal", hinting at the universal + attitude towards workloads. + + VMs of instance types will share physical CPU cores on a + time-slice basis with other VMs. + instancetype.kubevirt.io/displayName: General Purpose + labels: + instancetype.kubevirt.io/class: general.purpose + instancetype.kubevirt.io/cpu: "8" + instancetype.kubevirt.io/icon-pf: pficon-server-group + instancetype.kubevirt.io/memory: 32Gi + instancetype.kubevirt.io/size: 2xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: u1.2xlarge +spec: + cpu: + guest: 8 + memory: + guest: 32Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The U Series is quite neutral and provides resources for + general purpose applications. + + *U* is the abbreviation for "Universal", hinting at the universal + attitude towards workloads. + + VMs of instance types will share physical CPU cores on a + time-slice basis with other VMs. + instancetype.kubevirt.io/displayName: General Purpose + labels: + instancetype.kubevirt.io/class: general.purpose + instancetype.kubevirt.io/cpu: "2" + instancetype.kubevirt.io/icon-pf: pficon-server-group + instancetype.kubevirt.io/memory: 4Gi + instancetype.kubevirt.io/size: 2xmedium + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: u1.2xmedium +spec: + cpu: + guest: 2 + memory: + guest: 4Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The U Series is quite neutral and provides resources for + general purpose applications. + + *U* is the abbreviation for "Universal", hinting at the universal + attitude towards workloads. + + VMs of instance types will share physical CPU cores on a + time-slice basis with other VMs. + instancetype.kubevirt.io/displayName: General Purpose + labels: + instancetype.kubevirt.io/class: general.purpose + instancetype.kubevirt.io/cpu: "16" + instancetype.kubevirt.io/icon-pf: pficon-server-group + instancetype.kubevirt.io/memory: 64Gi + instancetype.kubevirt.io/size: 4xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: u1.4xlarge +spec: + cpu: + guest: 16 + memory: + guest: 64Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The U Series is quite neutral and provides resources for + general purpose applications. + + *U* is the abbreviation for "Universal", hinting at the universal + attitude towards workloads. + + VMs of instance types will share physical CPU cores on a + time-slice basis with other VMs. + instancetype.kubevirt.io/displayName: General Purpose + labels: + instancetype.kubevirt.io/class: general.purpose + instancetype.kubevirt.io/cpu: "32" + instancetype.kubevirt.io/icon-pf: pficon-server-group + instancetype.kubevirt.io/memory: 128Gi + instancetype.kubevirt.io/size: 8xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: u1.8xlarge +spec: + cpu: + guest: 32 + memory: + guest: 128Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The U Series is quite neutral and provides resources for + general purpose applications. + + *U* is the abbreviation for "Universal", hinting at the universal + attitude towards workloads. + + VMs of instance types will share physical CPU cores on a + time-slice basis with other VMs. + instancetype.kubevirt.io/displayName: General Purpose + labels: + instancetype.kubevirt.io/class: general.purpose + instancetype.kubevirt.io/cpu: "2" + instancetype.kubevirt.io/icon-pf: pficon-server-group + instancetype.kubevirt.io/memory: 8Gi + instancetype.kubevirt.io/size: large + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: u1.large +spec: + cpu: + guest: 2 + memory: + guest: 8Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The U Series is quite neutral and provides resources for + general purpose applications. + + *U* is the abbreviation for "Universal", hinting at the universal + attitude towards workloads. + + VMs of instance types will share physical CPU cores on a + time-slice basis with other VMs. + instancetype.kubevirt.io/displayName: General Purpose + labels: + instancetype.kubevirt.io/class: general.purpose + instancetype.kubevirt.io/cpu: "1" + instancetype.kubevirt.io/icon-pf: pficon-server-group + instancetype.kubevirt.io/memory: 4Gi + instancetype.kubevirt.io/size: medium + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: u1.medium +spec: + cpu: + guest: 1 + memory: + guest: 4Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The U Series is quite neutral and provides resources for + general purpose applications. + + *U* is the abbreviation for "Universal", hinting at the universal + attitude towards workloads. + + VMs of instance types will share physical CPU cores on a + time-slice basis with other VMs. + instancetype.kubevirt.io/displayName: General Purpose + labels: + instancetype.kubevirt.io/class: general.purpose + instancetype.kubevirt.io/cpu: "1" + instancetype.kubevirt.io/icon-pf: pficon-server-group + instancetype.kubevirt.io/memory: 1Gi + instancetype.kubevirt.io/size: micro + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: u1.micro +spec: + cpu: + guest: 1 + memory: + guest: 1Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The U Series is quite neutral and provides resources for + general purpose applications. + + *U* is the abbreviation for "Universal", hinting at the universal + attitude towards workloads. + + VMs of instance types will share physical CPU cores on a + time-slice basis with other VMs. + instancetype.kubevirt.io/displayName: General Purpose + labels: + instancetype.kubevirt.io/class: general.purpose + instancetype.kubevirt.io/cpu: "1" + instancetype.kubevirt.io/icon-pf: pficon-server-group + instancetype.kubevirt.io/memory: 512Mi + instancetype.kubevirt.io/size: nano + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: u1.nano +spec: + cpu: + guest: 1 + memory: + guest: 512Mi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The U Series is quite neutral and provides resources for + general purpose applications. + + *U* is the abbreviation for "Universal", hinting at the universal + attitude towards workloads. + + VMs of instance types will share physical CPU cores on a + time-slice basis with other VMs. + instancetype.kubevirt.io/displayName: General Purpose + labels: + instancetype.kubevirt.io/class: general.purpose + instancetype.kubevirt.io/cpu: "1" + instancetype.kubevirt.io/icon-pf: pficon-server-group + instancetype.kubevirt.io/memory: 2Gi + instancetype.kubevirt.io/size: small + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: u1.small +spec: + cpu: + guest: 1 + memory: + guest: 2Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterInstancetype +metadata: + annotations: + instancetype.kubevirt.io/description: |- + The U Series is quite neutral and provides resources for + general purpose applications. + + *U* is the abbreviation for "Universal", hinting at the universal + attitude towards workloads. + + VMs of instance types will share physical CPU cores on a + time-slice basis with other VMs. + instancetype.kubevirt.io/displayName: General Purpose + labels: + instancetype.kubevirt.io/class: general.purpose + instancetype.kubevirt.io/cpu: "4" + instancetype.kubevirt.io/icon-pf: pficon-server-group + instancetype.kubevirt.io/memory: 16Gi + instancetype.kubevirt.io/size: xlarge + instancetype.kubevirt.io/vendor: kubevirt.io + instancetype.kubevirt.io/version: "1" + name: u1.xlarge +spec: + cpu: + guest: 4 + memory: + guest: 16Gi diff --git a/packages/system/kubevirt-common-instancetypes/templates/preferences.yaml b/packages/system/kubevirt-common-instancetypes/templates/preferences.yaml new file mode 100644 index 00000000..5931e9f8 --- /dev/null +++ b/packages/system/kubevirt-common-instancetypes/templates/preferences.yaml @@ -0,0 +1,1694 @@ +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-alpine + openshift.io/display-name: Alpine + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,alpine + labels: + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: alpine +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredDiskBus: virtio + preferredInterfaceModel: virtio + requirements: + cpu: + guest: 1 + memory: + guest: 512Mi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-centos + openshift.io/display-name: CentOS 7 + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,linux,centos-stream + labels: + instancetype.kubevirt.io/deprecated: "true" + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: centos.7 +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredDiskBus: virtio + preferredInterfaceModel: virtio + requirements: + cpu: + guest: 1 + memory: + guest: 1Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-centos + openshift.io/display-name: CentOS 7 + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,linux,centos-stream + labels: + instancetype.kubevirt.io/deprecated: "true" + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: centos.7.desktop +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredAutoattachInputDevice: true + preferredDiskBus: virtio + preferredInputBus: virtio + preferredInputType: tablet + preferredInterfaceModel: virtio + requirements: + cpu: + guest: 1 + memory: + guest: 1Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-centos + openshift.io/display-name: CentOS Stream 10 + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,linux,centos-stream + labels: + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: centos.stream10 +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredDiskBus: virtio + preferredDiskDedicatedIoThread: true + preferredInterfaceModel: virtio + preferredRng: {} + requirements: + cpu: + guest: 1 + memory: + guest: 1.5Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-centos + openshift.io/display-name: CentOS Stream 10 + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,linux,centos-stream + labels: + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: centos.stream10.desktop +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredAutoattachInputDevice: true + preferredDiskBus: virtio + preferredDiskDedicatedIoThread: true + preferredInputBus: virtio + preferredInputType: tablet + preferredInterfaceModel: virtio + preferredRng: {} + requirements: + cpu: + guest: 1 + memory: + guest: 1.5Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-centos + openshift.io/display-name: CentOS Stream 8 + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,linux,centos-stream + labels: + instancetype.kubevirt.io/deprecated: "true" + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: centos.stream8 +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredDiskBus: virtio + preferredInterfaceModel: virtio + requirements: + cpu: + guest: 1 + memory: + guest: 1.5Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-centos + openshift.io/display-name: CentOS Stream 8 + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,linux,centos-stream + labels: + instancetype.kubevirt.io/deprecated: "true" + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: centos.stream8.desktop +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredAutoattachInputDevice: true + preferredDiskBus: virtio + preferredInputBus: virtio + preferredInputType: tablet + preferredInterfaceModel: virtio + requirements: + cpu: + guest: 1 + memory: + guest: 1.5Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-centos + openshift.io/display-name: CentOS Stream 8 + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,linux,centos-stream,dpdk + labels: + instancetype.kubevirt.io/deprecated: "true" + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: centos.stream8.dpdk +spec: + annotations: + vm.kubevirt.io/os: linux + cpu: + preferredCPUTopology: spread + spreadOptions: + across: SocketsCoresThreads + ratio: 4 + devices: + preferredDiskBus: virtio + preferredInterfaceModel: virtio + preferredNetworkInterfaceMultiQueue: true + requirements: + cpu: + guest: 2 + memory: + guest: 1.5Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-centos + openshift.io/display-name: CentOS Stream 9 + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,linux,centos-stream + labels: + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: centos.stream9 +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredDiskBus: virtio + preferredDiskDedicatedIoThread: true + preferredInterfaceModel: virtio + preferredRng: {} + requirements: + cpu: + guest: 1 + memory: + guest: 1.5Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-centos + openshift.io/display-name: CentOS Stream 9 + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,linux,centos-stream + labels: + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: centos.stream9.desktop +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredAutoattachInputDevice: true + preferredDiskBus: virtio + preferredDiskDedicatedIoThread: true + preferredInputBus: virtio + preferredInputType: tablet + preferredInterfaceModel: virtio + preferredRng: {} + requirements: + cpu: + guest: 1 + memory: + guest: 1.5Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-centos + openshift.io/display-name: CentOS Stream 9 + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,linux,centos-stream,dpdk + labels: + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: centos.stream9.dpdk +spec: + annotations: + vm.kubevirt.io/os: linux + cpu: + preferredCPUTopology: spread + spreadOptions: + across: SocketsCoresThreads + ratio: 4 + devices: + preferredDiskBus: virtio + preferredDiskDedicatedIoThread: true + preferredInterfaceModel: virtio + preferredNetworkInterfaceMultiQueue: true + preferredRng: {} + requirements: + cpu: + guest: 2 + memory: + guest: 1.5Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-cirros + openshift.io/display-name: Cirros + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,cirros + labels: + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: cirros +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredDiskBus: virtio + preferredInterfaceModel: virtio + requirements: + cpu: + guest: 1 + memory: + guest: 256Mi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-fedora + openshift.io/display-name: Fedora (amd64) + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,fedora + labels: + instancetype.kubevirt.io/arch: amd64 + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: fedora +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredDiskBus: virtio + preferredInterfaceModel: virtio + preferredNetworkInterfaceMultiQueue: true + preferredRng: {} + features: + preferredSmm: {} + firmware: + preferredEfi: + secureBoot: true + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-fedora + openshift.io/display-name: Fedora (arm64) + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,fedora + labels: + instancetype.kubevirt.io/arch: arm64 + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: fedora.arm64 +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredDiskBus: virtio + preferredInterfaceModel: virtio + preferredNetworkInterfaceMultiQueue: true + preferredRng: {} + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-opensuse-leap + openshift.io/display-name: OpenSUSE Leap + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,opensuse.leap + labels: + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: opensuse.leap +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredDiskBus: virtio + preferredInterfaceModel: virtio + preferredRng: {} + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-opensuse-tumbleweed + openshift.io/display-name: OpenSUSE Tumbleweed + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,opensuse.tumbleweed + labels: + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: opensuse.tumbleweed +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredDiskBus: virtio + preferredInterfaceModel: virtio + preferredRng: {} + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-rhel + openshift.io/display-name: Red Hat Enterprise Linux 10 Beta (amd64) + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,linux,rhel + labels: + instancetype.kubevirt.io/arch: amd64 + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: rhel.10 +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredDiskBus: virtio + preferredDiskDedicatedIoThread: true + preferredInterfaceModel: virtio + preferredRng: {} + features: + preferredSmm: {} + firmware: + preferredEfi: + secureBoot: true + requirements: + cpu: + guest: 1 + memory: + guest: 1.5Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-rhel + openshift.io/display-name: Red Hat Enterprise Linux 10 Beta (arm64) + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,linux,rhel + labels: + instancetype.kubevirt.io/arch: arm64 + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: rhel.10.arm64 +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredDiskBus: virtio + preferredDiskDedicatedIoThread: true + preferredInterfaceModel: virtio + preferredRng: {} + requirements: + cpu: + guest: 1 + memory: + guest: 1.5Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-rhel + openshift.io/display-name: Red Hat Enterprise Linux 7 + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,linux,rhel + labels: + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: rhel.7 +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredDiskBus: virtio + preferredInterfaceModel: virtio + requirements: + cpu: + guest: 1 + memory: + guest: 1Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-rhel + openshift.io/display-name: Red Hat Enterprise Linux 7 + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,linux,rhel + labels: + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: rhel.7.desktop +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredAutoattachInputDevice: true + preferredDiskBus: virtio + preferredInputBus: virtio + preferredInputType: tablet + preferredInterfaceModel: virtio + requirements: + cpu: + guest: 1 + memory: + guest: 1Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-rhel + openshift.io/display-name: Red Hat Enterprise Linux 8 + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,linux,rhel + labels: + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: rhel.8 +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredDiskBus: virtio + preferredInterfaceModel: virtio + requirements: + cpu: + guest: 1 + memory: + guest: 1.5Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-rhel + openshift.io/display-name: Red Hat Enterprise Linux 8 + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,linux,rhel + labels: + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: rhel.8.desktop +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredAutoattachInputDevice: true + preferredDiskBus: virtio + preferredInputBus: virtio + preferredInputType: tablet + preferredInterfaceModel: virtio + requirements: + cpu: + guest: 1 + memory: + guest: 1.5Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-rhel + openshift.io/display-name: Red Hat Enterprise Linux 8 + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,linux,rhel,dpdk + labels: + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: rhel.8.dpdk +spec: + annotations: + vm.kubevirt.io/os: linux + cpu: + preferredCPUTopology: spread + spreadOptions: + across: SocketsCoresThreads + ratio: 4 + devices: + preferredDiskBus: virtio + preferredInterfaceModel: virtio + preferredNetworkInterfaceMultiQueue: true + requirements: + cpu: + guest: 2 + memory: + guest: 1.5Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-rhel + openshift.io/display-name: Red Hat Enterprise Linux 9 (amd64) + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,linux,rhel + labels: + instancetype.kubevirt.io/arch: amd64 + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: rhel.9 +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredDiskBus: virtio + preferredDiskDedicatedIoThread: true + preferredInterfaceModel: virtio + preferredRng: {} + features: + preferredSmm: {} + firmware: + preferredEfi: + secureBoot: true + requirements: + cpu: + guest: 1 + memory: + guest: 1.5Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-rhel + openshift.io/display-name: Red Hat Enterprise Linux 9 (arm64) + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,linux,rhel + labels: + instancetype.kubevirt.io/arch: arm64 + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: rhel.9.arm64 +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredDiskBus: virtio + preferredDiskDedicatedIoThread: true + preferredInterfaceModel: virtio + preferredRng: {} + requirements: + cpu: + guest: 1 + memory: + guest: 1.5Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-rhel + openshift.io/display-name: Red Hat Enterprise Linux 9 Desktop (amd64) + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,linux,rhel + labels: + instancetype.kubevirt.io/arch: amd64 + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: rhel.9.desktop +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredAutoattachInputDevice: true + preferredDiskBus: virtio + preferredDiskDedicatedIoThread: true + preferredInputBus: virtio + preferredInputType: tablet + preferredInterfaceModel: virtio + preferredRng: {} + features: + preferredSmm: {} + firmware: + preferredEfi: + secureBoot: true + requirements: + cpu: + guest: 1 + memory: + guest: 1.5Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-rhel + openshift.io/display-name: Red Hat Enterprise Linux 9 DPDK (amd64) + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,linux,rhel,dpdk + labels: + instancetype.kubevirt.io/arch: amd64 + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: rhel.9.dpdk +spec: + annotations: + vm.kubevirt.io/os: linux + cpu: + preferredCPUTopology: spread + spreadOptions: + across: SocketsCoresThreads + ratio: 4 + devices: + preferredDiskBus: virtio + preferredDiskDedicatedIoThread: true + preferredInterfaceModel: virtio + preferredNetworkInterfaceMultiQueue: true + preferredRng: {} + features: + preferredSmm: {} + firmware: + preferredEfi: + secureBoot: true + requirements: + cpu: + guest: 2 + memory: + guest: 1.5Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-rhel + openshift.io/display-name: Red Hat Enterprise Linux 9 Realtime (amd64) + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,linux,rhel,realtime + labels: + instancetype.kubevirt.io/arch: amd64 + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: rhel.9.realtime +spec: + annotations: + vm.kubevirt.io/os: linux + cpu: + preferredCPUTopology: spread + spreadOptions: + across: SocketsCoresThreads + devices: + preferredAutoattachGraphicsDevice: false + preferredAutoattachMemBalloon: false + preferredAutoattachSerialConsole: true + preferredDiskBus: virtio + preferredDiskDedicatedIoThread: true + preferredInterfaceModel: virtio + preferredNetworkInterfaceMultiQueue: true + preferredRng: {} + features: + preferredSmm: {} + firmware: + preferredEfi: + secureBoot: true + requirements: + cpu: + guest: 1 + memory: + guest: 1.5Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-sles + openshift.io/display-name: SUSE Linux Enterprise Server + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,sles + labels: + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: sles +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredDiskBus: virtio + preferredInterfaceModel: virtio + preferredRng: {} + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-ubuntu + openshift.io/display-name: Ubuntu + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,ubuntu + labels: + instancetype.kubevirt.io/os-type: linux + instancetype.kubevirt.io/vendor: kubevirt.io + name: ubuntu +spec: + annotations: + vm.kubevirt.io/os: linux + devices: + preferredDiskBus: virtio + preferredInterfaceModel: virtio + preferredRng: {} + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-windows + openshift.io/display-name: Microsoft Windows 10 + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,windows + labels: + instancetype.kubevirt.io/os-type: windows + instancetype.kubevirt.io/vendor: kubevirt.io + name: windows.10 +spec: + annotations: + vm.kubevirt.io/os: windows + clock: + preferredClockOffset: + utc: {} + preferredTimer: + hpet: + present: false + hyperv: {} + pit: + tickPolicy: delay + rtc: + tickPolicy: catchup + cpu: + preferredCPUTopology: sockets + devices: + preferredAutoattachInputDevice: true + preferredDiskBus: sata + preferredInterfaceModel: e1000e + features: + preferredAcpi: {} + preferredApic: {} + preferredHyperv: + frequencies: {} + ipi: {} + reenlightenment: {} + relaxed: {} + reset: {} + runtime: {} + spinlocks: + spinlocks: 8191 + synic: {} + synictimer: + direct: {} + tlbflush: {} + vapic: {} + vpindex: {} + preferredSmm: {} + firmware: + preferredEfi: + secureBoot: true + preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-windows + openshift.io/display-name: Microsoft Windows 10 (virtio) + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,windows + labels: + instancetype.kubevirt.io/os-type: windows + instancetype.kubevirt.io/vendor: kubevirt.io + name: windows.10.virtio +spec: + annotations: + vm.kubevirt.io/os: windows + clock: + preferredClockOffset: + utc: {} + preferredTimer: + hpet: + present: false + hyperv: {} + pit: + tickPolicy: delay + rtc: + tickPolicy: catchup + cpu: + preferredCPUTopology: sockets + devices: + preferredAutoattachInputDevice: true + preferredDiskBus: virtio + preferredInputBus: virtio + preferredInputType: tablet + preferredInterfaceModel: virtio + features: + preferredAcpi: {} + preferredApic: {} + preferredHyperv: + frequencies: {} + ipi: {} + reenlightenment: {} + relaxed: {} + reset: {} + runtime: {} + spinlocks: + spinlocks: 8191 + synic: {} + synictimer: + direct: {} + tlbflush: {} + vapic: {} + vpindex: {} + preferredSmm: {} + firmware: + preferredEfi: + secureBoot: true + preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-windows + openshift.io/display-name: Microsoft Windows 11 + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,windows + labels: + instancetype.kubevirt.io/os-type: windows + instancetype.kubevirt.io/vendor: kubevirt.io + name: windows.11 +spec: + annotations: + vm.kubevirt.io/os: windows + clock: + preferredClockOffset: + utc: {} + preferredTimer: + hpet: + present: false + hyperv: {} + pit: + tickPolicy: delay + rtc: + tickPolicy: catchup + cpu: + preferredCPUTopology: sockets + devices: + preferredAutoattachInputDevice: true + preferredDiskBus: sata + preferredInterfaceModel: e1000e + preferredTPM: + persistent: true + features: + preferredAcpi: {} + preferredApic: {} + preferredHyperv: + frequencies: {} + ipi: {} + reenlightenment: {} + relaxed: {} + reset: {} + runtime: {} + spinlocks: + spinlocks: 8191 + synic: {} + synictimer: + direct: {} + tlbflush: {} + vapic: {} + vpindex: {} + preferredSmm: {} + firmware: + preferredEfi: + persistent: true + secureBoot: true + preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 2 + memory: + guest: 4Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-windows + openshift.io/display-name: Microsoft Windows 11 (virtio) + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,windows + labels: + instancetype.kubevirt.io/os-type: windows + instancetype.kubevirt.io/vendor: kubevirt.io + name: windows.11.virtio +spec: + annotations: + vm.kubevirt.io/os: windows + clock: + preferredClockOffset: + utc: {} + preferredTimer: + hpet: + present: false + hyperv: {} + pit: + tickPolicy: delay + rtc: + tickPolicy: catchup + cpu: + preferredCPUTopology: sockets + devices: + preferredAutoattachInputDevice: true + preferredDiskBus: virtio + preferredInputBus: virtio + preferredInputType: tablet + preferredInterfaceModel: virtio + preferredTPM: + persistent: true + features: + preferredAcpi: {} + preferredApic: {} + preferredHyperv: + frequencies: {} + ipi: {} + reenlightenment: {} + relaxed: {} + reset: {} + runtime: {} + spinlocks: + spinlocks: 8191 + synic: {} + synictimer: + direct: {} + tlbflush: {} + vapic: {} + vpindex: {} + preferredSmm: {} + firmware: + preferredEfi: + persistent: true + secureBoot: true + preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 2 + memory: + guest: 4Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-windows + openshift.io/display-name: Microsoft Windows Server 2016 + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,windows + labels: + instancetype.kubevirt.io/os-type: windows + instancetype.kubevirt.io/vendor: kubevirt.io + name: windows.2k16 +spec: + annotations: + vm.kubevirt.io/os: windows + clock: + preferredClockOffset: + utc: {} + preferredTimer: + hpet: + present: false + hyperv: {} + pit: + tickPolicy: delay + rtc: + tickPolicy: catchup + cpu: + preferredCPUTopology: sockets + devices: + preferredAutoattachInputDevice: true + preferredDiskBus: sata + preferredInterfaceModel: e1000e + features: + preferredAcpi: {} + preferredApic: {} + preferredHyperv: + frequencies: {} + ipi: {} + reenlightenment: {} + relaxed: {} + reset: {} + runtime: {} + spinlocks: + spinlocks: 8191 + synic: {} + synictimer: + direct: {} + tlbflush: {} + vapic: {} + vpindex: {} + preferredSmm: {} + firmware: + preferredEfi: + secureBoot: true + preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-windows + openshift.io/display-name: Microsoft Windows Server 2016 (virtio) + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,windows + labels: + instancetype.kubevirt.io/os-type: windows + instancetype.kubevirt.io/vendor: kubevirt.io + name: windows.2k16.virtio +spec: + annotations: + vm.kubevirt.io/os: windows + clock: + preferredClockOffset: + utc: {} + preferredTimer: + hpet: + present: false + hyperv: {} + pit: + tickPolicy: delay + rtc: + tickPolicy: catchup + cpu: + preferredCPUTopology: sockets + devices: + preferredAutoattachInputDevice: true + preferredDiskBus: virtio + preferredInputBus: virtio + preferredInputType: tablet + preferredInterfaceModel: virtio + features: + preferredAcpi: {} + preferredApic: {} + preferredHyperv: + frequencies: {} + ipi: {} + reenlightenment: {} + relaxed: {} + reset: {} + runtime: {} + spinlocks: + spinlocks: 8191 + synic: {} + synictimer: + direct: {} + tlbflush: {} + vapic: {} + vpindex: {} + preferredSmm: {} + firmware: + preferredEfi: + secureBoot: true + preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-windows + openshift.io/display-name: Microsoft Windows Server 2019 + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,windows + labels: + instancetype.kubevirt.io/os-type: windows + instancetype.kubevirt.io/vendor: kubevirt.io + name: windows.2k19 +spec: + annotations: + vm.kubevirt.io/os: windows + clock: + preferredClockOffset: + utc: {} + preferredTimer: + hpet: + present: false + hyperv: {} + pit: + tickPolicy: delay + rtc: + tickPolicy: catchup + cpu: + preferredCPUTopology: sockets + devices: + preferredAutoattachInputDevice: true + preferredDiskBus: sata + preferredInterfaceModel: e1000e + features: + preferredAcpi: {} + preferredApic: {} + preferredHyperv: + frequencies: {} + ipi: {} + reenlightenment: {} + relaxed: {} + reset: {} + runtime: {} + spinlocks: + spinlocks: 8191 + synic: {} + synictimer: + direct: {} + tlbflush: {} + vapic: {} + vpindex: {} + preferredSmm: {} + firmware: + preferredEfi: + secureBoot: true + preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-windows + openshift.io/display-name: Microsoft Windows Server 2019 (virtio) + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,windows + labels: + instancetype.kubevirt.io/os-type: windows + instancetype.kubevirt.io/vendor: kubevirt.io + name: windows.2k19.virtio +spec: + annotations: + vm.kubevirt.io/os: windows + clock: + preferredClockOffset: + utc: {} + preferredTimer: + hpet: + present: false + hyperv: {} + pit: + tickPolicy: delay + rtc: + tickPolicy: catchup + cpu: + preferredCPUTopology: sockets + devices: + preferredAutoattachInputDevice: true + preferredDiskBus: virtio + preferredInputBus: virtio + preferredInputType: tablet + preferredInterfaceModel: virtio + features: + preferredAcpi: {} + preferredApic: {} + preferredHyperv: + frequencies: {} + ipi: {} + reenlightenment: {} + relaxed: {} + reset: {} + runtime: {} + spinlocks: + spinlocks: 8191 + synic: {} + synictimer: + direct: {} + tlbflush: {} + vapic: {} + vpindex: {} + preferredSmm: {} + firmware: + preferredEfi: + secureBoot: true + preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-windows + openshift.io/display-name: Microsoft Windows Server 2022 + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,windows + labels: + instancetype.kubevirt.io/os-type: windows + instancetype.kubevirt.io/vendor: kubevirt.io + name: windows.2k22 +spec: + annotations: + vm.kubevirt.io/os: windows + clock: + preferredClockOffset: + utc: {} + preferredTimer: + hpet: + present: false + hyperv: {} + pit: + tickPolicy: delay + rtc: + tickPolicy: catchup + cpu: + preferredCPUTopology: sockets + devices: + preferredAutoattachInputDevice: true + preferredDiskBus: sata + preferredInterfaceModel: e1000e + preferredTPM: + persistent: true + features: + preferredAcpi: {} + preferredApic: {} + preferredHyperv: + frequencies: {} + ipi: {} + reenlightenment: {} + relaxed: {} + reset: {} + runtime: {} + spinlocks: + spinlocks: 8191 + synic: {} + synictimer: + direct: {} + tlbflush: {} + vapic: {} + vpindex: {} + preferredSmm: {} + firmware: + preferredEfi: + persistent: true + secureBoot: true + preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-windows + openshift.io/display-name: Microsoft Windows Server 2022 (virtio) + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,windows + labels: + instancetype.kubevirt.io/os-type: windows + instancetype.kubevirt.io/vendor: kubevirt.io + name: windows.2k22.virtio +spec: + annotations: + vm.kubevirt.io/os: windows + clock: + preferredClockOffset: + utc: {} + preferredTimer: + hpet: + present: false + hyperv: {} + pit: + tickPolicy: delay + rtc: + tickPolicy: catchup + cpu: + preferredCPUTopology: sockets + devices: + preferredAutoattachInputDevice: true + preferredDiskBus: virtio + preferredInputBus: virtio + preferredInputType: tablet + preferredInterfaceModel: virtio + preferredTPM: + persistent: true + features: + preferredAcpi: {} + preferredApic: {} + preferredHyperv: + frequencies: {} + ipi: {} + reenlightenment: {} + relaxed: {} + reset: {} + runtime: {} + spinlocks: + spinlocks: 8191 + synic: {} + synictimer: + direct: {} + tlbflush: {} + vapic: {} + vpindex: {} + preferredSmm: {} + firmware: + preferredEfi: + persistent: true + secureBoot: true + preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-windows + openshift.io/display-name: Microsoft Windows Server 2025 + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,windows + labels: + instancetype.kubevirt.io/os-type: windows + instancetype.kubevirt.io/vendor: kubevirt.io + name: windows.2k25 +spec: + annotations: + vm.kubevirt.io/os: windows + clock: + preferredClockOffset: + utc: {} + preferredTimer: + hpet: + present: false + hyperv: {} + pit: + tickPolicy: delay + rtc: + tickPolicy: catchup + cpu: + preferredCPUTopology: sockets + devices: + preferredAutoattachInputDevice: true + preferredDiskBus: sata + preferredInterfaceModel: e1000e + preferredTPM: + persistent: true + features: + preferredAcpi: {} + preferredApic: {} + preferredHyperv: + frequencies: {} + ipi: {} + reenlightenment: {} + relaxed: {} + reset: {} + runtime: {} + spinlocks: + spinlocks: 8191 + synic: {} + synictimer: + direct: {} + tlbflush: {} + vapic: {} + vpindex: {} + preferredSmm: {} + firmware: + preferredEfi: + persistent: true + secureBoot: true + preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi +--- +apiVersion: instancetype.kubevirt.io/v1beta1 +kind: VirtualMachineClusterPreference +metadata: + annotations: + iconClass: icon-windows + openshift.io/display-name: Microsoft Windows Server 2025 (virtio) + openshift.io/documentation-url: https://github.com/kubevirt/common-instancetypes + openshift.io/provider-display-name: KubeVirt + openshift.io/support-url: https://github.com/kubevirt/common-instancetypes/issues + tags: hidden,kubevirt,windows + labels: + instancetype.kubevirt.io/os-type: windows + instancetype.kubevirt.io/vendor: kubevirt.io + name: windows.2k25.virtio +spec: + annotations: + vm.kubevirt.io/os: windows + clock: + preferredClockOffset: + utc: {} + preferredTimer: + hpet: + present: false + hyperv: {} + pit: + tickPolicy: delay + rtc: + tickPolicy: catchup + cpu: + preferredCPUTopology: sockets + devices: + preferredAutoattachInputDevice: true + preferredDiskBus: virtio + preferredInputBus: virtio + preferredInputType: tablet + preferredInterfaceModel: virtio + preferredTPM: + persistent: true + features: + preferredAcpi: {} + preferredApic: {} + preferredHyperv: + frequencies: {} + ipi: {} + reenlightenment: {} + relaxed: {} + reset: {} + runtime: {} + spinlocks: + spinlocks: 8191 + synic: {} + synictimer: + direct: {} + tlbflush: {} + vapic: {} + vpindex: {} + preferredSmm: {} + firmware: + preferredEfi: + persistent: true + secureBoot: true + preferredTerminationGracePeriodSeconds: 3600 + requirements: + cpu: + guest: 1 + memory: + guest: 2Gi diff --git a/packages/system/kubevirt-common-instancetypes/values.yaml b/packages/system/kubevirt-common-instancetypes/values.yaml new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/packages/system/kubevirt-common-instancetypes/values.yaml @@ -0,0 +1 @@ + diff --git a/packages/system/kubevirt/templates/kubevirt-cr.yaml b/packages/system/kubevirt/templates/kubevirt-cr.yaml index b98e3119..bc9c6845 100644 --- a/packages/system/kubevirt/templates/kubevirt-cr.yaml +++ b/packages/system/kubevirt/templates/kubevirt-cr.yaml @@ -7,10 +7,12 @@ metadata: spec: certificateRotateStrategy: {} configuration: + vmStateStorageClass: "replicated" developerConfiguration: featureGates: - HotplugVolumes - ExpandDisks + - VMPersistentState customizeComponents: {} imagePullPolicy: IfNotPresent workloadUpdateStrategy: {} From a31edcc8463b6d323eb41925d1ddde0fe45d146c Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Tue, 15 Oct 2024 09:59:41 +0200 Subject: [PATCH 2/7] Split Virtual Machine to vm-instance and vm-disk Signed-off-by: Andrei Kvapil --- .../{virtual-machine => vm-disk}/.helmignore | 0 packages/apps/vm-disk/Chart.yaml | 25 ++ .../{virtual-machine => vm-disk}/Makefile | 0 packages/apps/vm-disk/README.md | 259 ++++++++++++++++++ .../hack/update-instance-types.sh | 0 packages/apps/vm-disk/logos/disk.svg | 14 + packages/apps/vm-disk/templates/NOTES.txt | 5 + .../templates/dashboard-resourcemap.yaml | 12 + packages/apps/vm-disk/templates/dv.yaml | 23 ++ packages/apps/vm-disk/values.schema.json | 128 +++++++++ packages/apps/vm-disk/values.yaml | 13 + packages/apps/vm-disk/values2.yaml | 12 + packages/apps/vm-disk/values3.yaml | 13 + packages/apps/vm-instance/.helmignore | 3 + .../Chart.yaml | 4 +- packages/apps/vm-instance/Makefile | 9 + .../README.md | 0 .../vm-instance/hack/update-instance-types.sh | 1 + .../logos/vm.svg | 0 .../templates/_helpers.tpl | 0 .../templates/secret.yaml | 0 .../templates/service.yaml | 0 .../templates/vm.yaml | 50 ++-- .../values.schema.json | 0 .../values.yaml | 9 +- 25 files changed, 545 insertions(+), 35 deletions(-) rename packages/apps/{virtual-machine => vm-disk}/.helmignore (100%) create mode 100644 packages/apps/vm-disk/Chart.yaml rename packages/apps/{virtual-machine => vm-disk}/Makefile (100%) create mode 100644 packages/apps/vm-disk/README.md rename packages/apps/{virtual-machine => vm-disk}/hack/update-instance-types.sh (100%) create mode 100644 packages/apps/vm-disk/logos/disk.svg create mode 100644 packages/apps/vm-disk/templates/NOTES.txt create mode 100644 packages/apps/vm-disk/templates/dashboard-resourcemap.yaml create mode 100644 packages/apps/vm-disk/templates/dv.yaml create mode 100644 packages/apps/vm-disk/values.schema.json create mode 100644 packages/apps/vm-disk/values.yaml create mode 100644 packages/apps/vm-disk/values2.yaml create mode 100644 packages/apps/vm-disk/values3.yaml create mode 100644 packages/apps/vm-instance/.helmignore rename packages/apps/{virtual-machine => vm-instance}/Chart.yaml (96%) create mode 100644 packages/apps/vm-instance/Makefile rename packages/apps/{virtual-machine => vm-instance}/README.md (100%) create mode 100755 packages/apps/vm-instance/hack/update-instance-types.sh rename packages/apps/{virtual-machine => vm-instance}/logos/vm.svg (100%) rename packages/apps/{virtual-machine => vm-instance}/templates/_helpers.tpl (100%) rename packages/apps/{virtual-machine => vm-instance}/templates/secret.yaml (100%) rename packages/apps/{virtual-machine => vm-instance}/templates/service.yaml (100%) rename packages/apps/{virtual-machine => vm-instance}/templates/vm.yaml (72%) rename packages/apps/{virtual-machine => vm-instance}/values.schema.json (100%) rename packages/apps/{virtual-machine => vm-instance}/values.yaml (94%) diff --git a/packages/apps/virtual-machine/.helmignore b/packages/apps/vm-disk/.helmignore similarity index 100% rename from packages/apps/virtual-machine/.helmignore rename to packages/apps/vm-disk/.helmignore diff --git a/packages/apps/vm-disk/Chart.yaml b/packages/apps/vm-disk/Chart.yaml new file mode 100644 index 00000000..19b39328 --- /dev/null +++ b/packages/apps/vm-disk/Chart.yaml @@ -0,0 +1,25 @@ +apiVersion: v2 +name: vm-disk +description: Virtual Machine disk +icon: /logos/disk.svg + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: 0.1.0 diff --git a/packages/apps/virtual-machine/Makefile b/packages/apps/vm-disk/Makefile similarity index 100% rename from packages/apps/virtual-machine/Makefile rename to packages/apps/vm-disk/Makefile diff --git a/packages/apps/vm-disk/README.md b/packages/apps/vm-disk/README.md new file mode 100644 index 00000000..a1752e05 --- /dev/null +++ b/packages/apps/vm-disk/README.md @@ -0,0 +1,259 @@ +# Virtual Machine + +A Virtual Machine (VM) simulates computer hardware, enabling various operating systems and applications to run in an isolated environment. + +## Deployment Details + +The virtual machine is managed and hosted through KubeVirt, allowing you to harness the benefits of virtualization within your Kubernetes ecosystem. + +- Docs: [KubeVirt User Guide](https://kubevirt.io/user-guide/) +- GitHub: [KubeVirt Repository](https://github.com/kubevirt/kubevirt) + +## Accessing virtual machine + +You can access the virtual machine using the virtctl tool: +- [KubeVirt User Guide - Virtctl Client Tool](https://kubevirt.io/user-guide/user_workloads/virtctl_client_tool/) + +To access the serial console: + +``` +virtctl console +``` + +To access the VM using VNC: + +``` +virtctl vnc +``` + +To SSH into the VM: + +``` +virtctl ssh @ +``` + +## Parameters + +### Common parameters + +| Name | Description | Value | +| -------------- | ------------------------------------------------------ | ------------ | +| `source` | The source image location used to create a disk | `{}` | +| `optical` | Defines is disk should be considered as optical | `false` | +| `storage` | The size of the disk allocated for the virtual machine | `5Gi` | +| `storageClass` | StorageClass used to store the data | `replicated` | + +## U Series + +The U Series is quite neutral and provides resources for +general purpose applications. + +*U* is the abbreviation for "Universal", hinting at the universal +attitude towards workloads. + +VMs of instance types will share physical CPU cores on a +time-slice basis with other VMs. + +### U Series Characteristics + +Specific characteristics of this series are: +- *Burstable CPU performance* - The workload has a baseline compute + performance but is permitted to burst beyond this baseline, if + excess compute resources are available. +- *vCPU-To-Memory Ratio (1:4)* - A vCPU-to-Memory ratio of 1:4, for less + noise per node. + +## O Series + +The O Series is based on the U Series, with the only difference +being that memory is overcommitted. + +*O* is the abbreviation for "Overcommitted". + +### UO Series Characteristics + +Specific characteristics of this series are: +- *Burstable CPU performance* - The workload has a baseline compute + performance but is permitted to burst beyond this baseline, if + excess compute resources are available. +- *Overcommitted Memory* - Memory is over-committed in order to achieve + a higher workload density. +- *vCPU-To-Memory Ratio (1:4)* - A vCPU-to-Memory ratio of 1:4, for less + noise per node. + +## CX Series + +The CX Series provides exclusive compute resources for compute +intensive applications. + +*CX* is the abbreviation of "Compute Exclusive". + +The exclusive resources are given to the compute threads of the +VM. In order to ensure this, some additional cores (depending +on the number of disks and NICs) will be requested to offload +the IO threading from cores dedicated to the workload. +In addition, in this series, the NUMA topology of the used +cores is provided to the VM. + +### CX Series Characteristics + +Specific characteristics of this series are: +- *Hugepages* - Hugepages are used in order to improve memory + performance. +- *Dedicated CPU* - Physical cores are exclusively assigned to every + vCPU in order to provide fixed and high compute guarantees to the + workload. +- *Isolated emulator threads* - Hypervisor emulator threads are isolated + from the vCPUs in order to reduce emaulation related impact on the + workload. +- *vNUMA* - Physical NUMA topology is reflected in the guest in order to + optimize guest sided cache utilization. +- *vCPU-To-Memory Ratio (1:2)* - A vCPU-to-Memory ratio of 1:2. + +## M Series + +The M Series provides resources for memory intensive +applications. + +*M* is the abbreviation of "Memory". + +### M Series Characteristics + +Specific characteristics of this series are: +- *Hugepages* - Hugepages are used in order to improve memory + performance. +- *Burstable CPU performance* - The workload has a baseline compute + performance but is permitted to burst beyond this baseline, if + excess compute resources are available. +- *vCPU-To-Memory Ratio (1:8)* - A vCPU-to-Memory ratio of 1:8, for much + less noise per node. + +## RT Series + +The RT Series provides resources for realtime applications, like Oslat. + +*RT* is the abbreviation for "realtime". + +This series of instance types requires nodes capable of running +realtime applications. + +### RT Series Characteristics + +Specific characteristics of this series are: +- *Hugepages* - Hugepages are used in order to improve memory + performance. +- *Dedicated CPU* - Physical cores are exclusively assigned to every + vCPU in order to provide fixed and high compute guarantees to the + workload. +- *Isolated emulator threads* - Hypervisor emulator threads are isolated + from the vCPUs in order to reduce emaulation related impact on the + workload. +- *vCPU-To-Memory Ratio (1:4)* - A vCPU-to-Memory ratio of 1:4 starting from + the medium size. + +## Development + +To get started with customizing or creating your own instancetypes and preferences +see [DEVELOPMENT.md](./DEVELOPMENT.md). + +## Resources + +The following instancetype resources are provided by Cozystack: + +Name | vCPUs | Memory +-----|-------|------- +cx1.2xlarge | 8 | 16Gi +cx1.4xlarge | 16 | 32Gi +cx1.8xlarge | 32 | 64Gi +cx1.large | 2 | 4Gi +cx1.medium | 1 | 2Gi +cx1.xlarge | 4 | 8Gi +gn1.2xlarge | 8 | 32Gi +gn1.4xlarge | 16 | 64Gi +gn1.8xlarge | 32 | 128Gi +gn1.xlarge | 4 | 16Gi +m1.2xlarge | 8 | 64Gi +m1.4xlarge | 16 | 128Gi +m1.8xlarge | 32 | 256Gi +m1.large | 2 | 16Gi +m1.xlarge | 4 | 32Gi +n1.2xlarge | 16 | 32Gi +n1.4xlarge | 32 | 64Gi +n1.8xlarge | 64 | 128Gi +n1.large | 4 | 8Gi +n1.medium | 4 | 4Gi +n1.xlarge | 8 | 16Gi +o1.2xlarge | 8 | 32Gi +o1.4xlarge | 16 | 64Gi +o1.8xlarge | 32 | 128Gi +o1.large | 2 | 8Gi +o1.medium | 1 | 4Gi +o1.micro | 1 | 1Gi +o1.nano | 1 | 512Mi +o1.small | 1 | 2Gi +o1.xlarge | 4 | 16Gi +rt1.2xlarge | 8 | 32Gi +rt1.4xlarge | 16 | 64Gi +rt1.8xlarge | 32 | 128Gi +rt1.large | 2 | 8Gi +rt1.medium | 1 | 4Gi +rt1.micro | 1 | 1Gi +rt1.small | 1 | 2Gi +rt1.xlarge | 4 | 16Gi +u1.2xlarge | 8 | 32Gi +u1.2xmedium | 2 | 4Gi +u1.4xlarge | 16 | 64Gi +u1.8xlarge | 32 | 128Gi +u1.large | 2 | 8Gi +u1.medium | 1 | 4Gi +u1.micro | 1 | 1Gi +u1.nano | 1 | 512Mi +u1.small | 1 | 2Gi +u1.xlarge | 4 | 16Gi + +The following preference resources are provided by Cozystack: + +Name | Guest OS +-----|--------- +alpine | Alpine +centos.7 | CentOS 7 +centos.7.desktop | CentOS 7 +centos.stream10 | CentOS Stream 10 +centos.stream10.desktop | CentOS Stream 10 +centos.stream8 | CentOS Stream 8 +centos.stream8.desktop | CentOS Stream 8 +centos.stream8.dpdk | CentOS Stream 8 +centos.stream9 | CentOS Stream 9 +centos.stream9.desktop | CentOS Stream 9 +centos.stream9.dpdk | CentOS Stream 9 +cirros | Cirros +fedora | Fedora (amd64) +fedora.arm64 | Fedora (arm64) +opensuse.leap | OpenSUSE Leap +opensuse.tumbleweed | OpenSUSE Tumbleweed +rhel.10 | Red Hat Enterprise Linux 10 Beta (amd64) +rhel.10.arm64 | Red Hat Enterprise Linux 10 Beta (arm64) +rhel.7 | Red Hat Enterprise Linux 7 +rhel.7.desktop | Red Hat Enterprise Linux 7 +rhel.8 | Red Hat Enterprise Linux 8 +rhel.8.desktop | Red Hat Enterprise Linux 8 +rhel.8.dpdk | Red Hat Enterprise Linux 8 +rhel.9 | Red Hat Enterprise Linux 9 (amd64) +rhel.9.arm64 | Red Hat Enterprise Linux 9 (arm64) +rhel.9.desktop | Red Hat Enterprise Linux 9 Desktop (amd64) +rhel.9.dpdk | Red Hat Enterprise Linux 9 DPDK (amd64) +rhel.9.realtime | Red Hat Enterprise Linux 9 Realtime (amd64) +sles | SUSE Linux Enterprise Server +ubuntu | Ubuntu +windows.10 | Microsoft Windows 10 +windows.10.virtio | Microsoft Windows 10 (virtio) +windows.11 | Microsoft Windows 11 +windows.11.virtio | Microsoft Windows 11 (virtio) +windows.2k16 | Microsoft Windows Server 2016 +windows.2k16.virtio | Microsoft Windows Server 2016 (virtio) +windows.2k19 | Microsoft Windows Server 2019 +windows.2k19.virtio | Microsoft Windows Server 2019 (virtio) +windows.2k22 | Microsoft Windows Server 2022 +windows.2k22.virtio | Microsoft Windows Server 2022 (virtio) +windows.2k25 | Microsoft Windows Server 2025 +windows.2k25.virtio | Microsoft Windows Server 2025 (virtio) diff --git a/packages/apps/virtual-machine/hack/update-instance-types.sh b/packages/apps/vm-disk/hack/update-instance-types.sh similarity index 100% rename from packages/apps/virtual-machine/hack/update-instance-types.sh rename to packages/apps/vm-disk/hack/update-instance-types.sh diff --git a/packages/apps/vm-disk/logos/disk.svg b/packages/apps/vm-disk/logos/disk.svg new file mode 100644 index 00000000..175f5b92 --- /dev/null +++ b/packages/apps/vm-disk/logos/disk.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/packages/apps/vm-disk/templates/NOTES.txt b/packages/apps/vm-disk/templates/NOTES.txt new file mode 100644 index 00000000..73d07cc5 --- /dev/null +++ b/packages/apps/vm-disk/templates/NOTES.txt @@ -0,0 +1,5 @@ +{{- if and .Values.source (hasKey .Values.source "upload") }} +To upload your disk run: + +virtctl image-upload dv -n {{ .Release.Namespace }} {{ .Release.Name }} --image-path +{{- end }} diff --git a/packages/apps/vm-disk/templates/dashboard-resourcemap.yaml b/packages/apps/vm-disk/templates/dashboard-resourcemap.yaml new file mode 100644 index 00000000..a0bd5604 --- /dev/null +++ b/packages/apps/vm-disk/templates/dashboard-resourcemap.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ .Release.Name }}-dashboard-resources +rules: +- apiGroups: + - cdi.kubevirt.io + resources: + - datavolumes + resourceNames: + - {{ .Release.Name }} + verbs: ["get", "list", "watch"] diff --git a/packages/apps/vm-disk/templates/dv.yaml b/packages/apps/vm-disk/templates/dv.yaml new file mode 100644 index 00000000..06894c71 --- /dev/null +++ b/packages/apps/vm-disk/templates/dv.yaml @@ -0,0 +1,23 @@ +apiVersion: cdi.kubevirt.io/v1beta1 +kind: DataVolume +metadata: + annotations: + cdi.kubevirt.io/storage.bind.immediate.requested: "" + vm-disk.cozystack.io/optical: "{{ .Values.optical }}" + name: {{ .Release.Name }} +spec: + contentType: kubevirt + {{- if .Values.source }} + source: + {{- toYaml .Values.source | nindent 4 }} + {{- else }} + source: + blank: {} + {{- end }} + storage: + resources: + requests: + storage: {{ .Values.storage }} + {{- with .Values.storageClass }} + storageClassName: {{ . }} + {{- end }} diff --git a/packages/apps/vm-disk/values.schema.json b/packages/apps/vm-disk/values.schema.json new file mode 100644 index 00000000..ea038273 --- /dev/null +++ b/packages/apps/vm-disk/values.schema.json @@ -0,0 +1,128 @@ +{ + "title": "Chart Values", + "type": "object", + "properties": { + "optical": { + "type": "boolean", + "description": "Defines is disk should be considered as optical", + "default": false + }, + "storage": { + "type": "string", + "description": "The size of the disk allocated for the virtual machine", + "default": "5Gi" + }, + "storageClass": { + "type": "string", + "description": "StorageClass used to store the data", + "default": "replicated" + }, + "instanceType": { + "optional": true, + "enum": [ + "cx1.2xlarge", + "cx1.4xlarge", + "cx1.8xlarge", + "cx1.large", + "cx1.medium", + "cx1.xlarge", + "gn1.2xlarge", + "gn1.4xlarge", + "gn1.8xlarge", + "gn1.xlarge", + "m1.2xlarge", + "m1.4xlarge", + "m1.8xlarge", + "m1.large", + "m1.xlarge", + "n1.2xlarge", + "n1.4xlarge", + "n1.8xlarge", + "n1.large", + "n1.medium", + "n1.xlarge", + "o1.2xlarge", + "o1.4xlarge", + "o1.8xlarge", + "o1.large", + "o1.medium", + "o1.micro", + "o1.nano", + "o1.small", + "o1.xlarge", + "rt1.2xlarge", + "rt1.4xlarge", + "rt1.8xlarge", + "rt1.large", + "rt1.medium", + "rt1.micro", + "rt1.small", + "rt1.xlarge", + "u1.2xlarge", + "u1.2xmedium", + "u1.4xlarge", + "u1.8xlarge", + "u1.large", + "u1.medium", + "u1.micro", + "u1.nano", + "u1.small", + "u1.xlarge", + "" + ] + }, + "instanceProfile": { + "optional": true, + "enum": [ + "alpine", + "centos.7", + "centos.7.desktop", + "centos.stream10", + "centos.stream10.desktop", + "centos.stream8", + "centos.stream8.desktop", + "centos.stream8.dpdk", + "centos.stream9", + "centos.stream9.desktop", + "centos.stream9.dpdk", + "cirros", + "fedora", + "fedora.arm64", + "opensuse.leap", + "opensuse.tumbleweed", + "rhel.10", + "rhel.10.arm64", + "rhel.7", + "rhel.7.desktop", + "rhel.8", + "rhel.8.desktop", + "rhel.8.dpdk", + "rhel.9", + "rhel.9.arm64", + "rhel.9.desktop", + "rhel.9.dpdk", + "rhel.9.realtime", + "sles", + "ubuntu", + "windows.10", + "windows.10.virtio", + "windows.11", + "windows.11.virtio", + "windows.2k16", + "windows.2k16.virtio", + "windows.2k19", + "windows.2k19.virtio", + "windows.2k22", + "windows.2k22.virtio", + "windows.2k25", + "windows.2k25.virtio", + "" + ] + }, + "externalPorts": { + "items": { + "type": "integer" + } + } + } +} diff --git a/packages/apps/vm-disk/values.yaml b/packages/apps/vm-disk/values.yaml new file mode 100644 index 00000000..1bf4febf --- /dev/null +++ b/packages/apps/vm-disk/values.yaml @@ -0,0 +1,13 @@ +## @section Common parameters + +## @param source [object] The source image location used to create a disk +## @param optical Defines is disk should be considered as optical +## @param storage The size of the disk allocated for the virtual machine +## @param storageClass StorageClass used to store the data +## +source: + #http: {} + #upload: {} +optical: false +storage: 5Gi +storageClass: replicated diff --git a/packages/apps/vm-disk/values2.yaml b/packages/apps/vm-disk/values2.yaml new file mode 100644 index 00000000..4026841c --- /dev/null +++ b/packages/apps/vm-disk/values2.yaml @@ -0,0 +1,12 @@ +## @section Common parameters + +## @param source [object] The source image location used to create a disk +## @param optical Defines is disk should be considered as optical +## @param storage The size of the disk allocated for the virtual machine +## @param storageClass StorageClass used to store the data +## +source: + upload: {} +optical: true +storage: 10Gi +storageClass: replicated diff --git a/packages/apps/vm-disk/values3.yaml b/packages/apps/vm-disk/values3.yaml new file mode 100644 index 00000000..57759e8f --- /dev/null +++ b/packages/apps/vm-disk/values3.yaml @@ -0,0 +1,13 @@ +## @section Common parameters + +## @param source [object] The source image location used to create a disk +## @param optical Defines is disk should be considered as optical +## @param storage The size of the disk allocated for the virtual machine +## @param storageClass StorageClass used to store the data +## +source: + #http: {} + #upload: {} +optical: false +storage: 50Gi +storageClass: replicated diff --git a/packages/apps/vm-instance/.helmignore b/packages/apps/vm-instance/.helmignore new file mode 100644 index 00000000..1ea0ae84 --- /dev/null +++ b/packages/apps/vm-instance/.helmignore @@ -0,0 +1,3 @@ +.helmignore +/logos +/Makefile diff --git a/packages/apps/virtual-machine/Chart.yaml b/packages/apps/vm-instance/Chart.yaml similarity index 96% rename from packages/apps/virtual-machine/Chart.yaml rename to packages/apps/vm-instance/Chart.yaml index b176fe7b..03f704d2 100644 --- a/packages/apps/virtual-machine/Chart.yaml +++ b/packages/apps/vm-instance/Chart.yaml @@ -17,10 +17,10 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.5.0 +version: 0.1.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "1.16.1" +appVersion: "0.1.0" diff --git a/packages/apps/vm-instance/Makefile b/packages/apps/vm-instance/Makefile new file mode 100644 index 00000000..cf5eab3c --- /dev/null +++ b/packages/apps/vm-instance/Makefile @@ -0,0 +1,9 @@ +include ../../../scripts/package.mk + +generate: + readme-generator -v values.yaml -s values.schema.json -r README.md + INSTANCE_TYPES=$$(yq e '.metadata.name' -o=json -r ../../system/kubevirt-common-instancetypes/templates/instancetypes.yaml | yq 'split(" ") | . + [""]' -o json) \ + && yq -i -o json ".properties.instanceType.optional=true | .properties.instanceType.enum = $${INSTANCE_TYPES}" values.schema.json + PREFERENCES=$$(yq e '.metadata.name' -o=json -r ../../system/kubevirt-common-instancetypes/templates/preferences.yaml | yq 'split(" ") | . + [""]' -o json) \ + && yq -i -o json ".properties.instanceProfile.optional=true | .properties.instanceProfile.enum = $${PREFERENCES}" values.schema.json + yq -i -o json '.properties.externalPorts.items.type = "integer"' values.schema.json diff --git a/packages/apps/virtual-machine/README.md b/packages/apps/vm-instance/README.md similarity index 100% rename from packages/apps/virtual-machine/README.md rename to packages/apps/vm-instance/README.md diff --git a/packages/apps/vm-instance/hack/update-instance-types.sh b/packages/apps/vm-instance/hack/update-instance-types.sh new file mode 100755 index 00000000..1a248525 --- /dev/null +++ b/packages/apps/vm-instance/hack/update-instance-types.sh @@ -0,0 +1 @@ +#!/bin/sh diff --git a/packages/apps/virtual-machine/logos/vm.svg b/packages/apps/vm-instance/logos/vm.svg similarity index 100% rename from packages/apps/virtual-machine/logos/vm.svg rename to packages/apps/vm-instance/logos/vm.svg diff --git a/packages/apps/virtual-machine/templates/_helpers.tpl b/packages/apps/vm-instance/templates/_helpers.tpl similarity index 100% rename from packages/apps/virtual-machine/templates/_helpers.tpl rename to packages/apps/vm-instance/templates/_helpers.tpl diff --git a/packages/apps/virtual-machine/templates/secret.yaml b/packages/apps/vm-instance/templates/secret.yaml similarity index 100% rename from packages/apps/virtual-machine/templates/secret.yaml rename to packages/apps/vm-instance/templates/secret.yaml diff --git a/packages/apps/virtual-machine/templates/service.yaml b/packages/apps/vm-instance/templates/service.yaml similarity index 100% rename from packages/apps/virtual-machine/templates/service.yaml rename to packages/apps/vm-instance/templates/service.yaml diff --git a/packages/apps/virtual-machine/templates/vm.yaml b/packages/apps/vm-instance/templates/vm.yaml similarity index 72% rename from packages/apps/virtual-machine/templates/vm.yaml rename to packages/apps/vm-instance/templates/vm.yaml index f4a1471b..3ef650af 100644 --- a/packages/apps/virtual-machine/templates/vm.yaml +++ b/packages/apps/vm-instance/templates/vm.yaml @@ -23,27 +23,6 @@ spec: kind: VirtualMachineClusterPreference name: {{ . }} {{- end }} - dataVolumeTemplates: - - metadata: - name: {{ include "virtual-machine.fullname" . }} - spec: - pvc: - volumeMode: Block - accessModes: - - ReadWriteMany - resources: - requests: - storage: {{ $.Values.systemDisk.storage | quote }} - {{- with $.Values.systemDisk.storageClass }} - storageClassName: {{ . }} - {{- end }} - source: - {{- if $.Values.systemDisk.origin }} - http: - url: {{ $.Values.systemDisk.origin }} - {{- else }} - blank: {} - {{- end }} template: metadata: @@ -64,13 +43,26 @@ spec: {{- end }} devices: disks: - - disk: - bus: scsi - name: systemdisk + {{- range $i, $disk := .Values.disks }} + - name: disk-{{ .name }} + {{- $disk := (lookup "cdi.kubevirt.io/v1beta1" "DataVolume" $.Release.Namespace (printf "vm-disk-%s" .name)) }} + {{- if $disk }} + {{- if and (hasKey $disk.metadata.annotations "vm-disk.cozystack.io/optical") (eq (index $disk.metadata.annotations "vm-disk.cozystack.io/optical") "true") }} + cdrom: {} + {{- else }} + disk: {} + {{- end }} + {{- if eq $i 0 }} + bootOrder: 1 + {{- end }} + {{- else }} + {{- fail (printf "Specified disk not exists in cluster: %s" .name) }} + {{- end }} + {{- end }} {{- if or .Values.sshKeys .Values.cloudInit }} - - disk: + - name: cloudinitdisk + disk: bus: virtio - name: cloudinitdisk {{- end }} interfaces: - name: default @@ -88,9 +80,11 @@ spec: {{- end }} terminationGracePeriodSeconds: 30 volumes: - - name: systemdisk + {{- range .Values.disks }} + - name: disk-{{ .name }} dataVolume: - name: {{ include "virtual-machine.fullname" . }} + name: vm-disk-{{ .name }} + {{- end }} {{- if or .Values.sshKeys .Values.cloudInit }} - name: cloudinitdisk cloudInitNoCloud: diff --git a/packages/apps/virtual-machine/values.schema.json b/packages/apps/vm-instance/values.schema.json similarity index 100% rename from packages/apps/virtual-machine/values.schema.json rename to packages/apps/vm-instance/values.schema.json diff --git a/packages/apps/virtual-machine/values.yaml b/packages/apps/vm-instance/values.yaml similarity index 94% rename from packages/apps/virtual-machine/values.yaml rename to packages/apps/vm-instance/values.yaml index 1e6597db..59ad1c8e 100644 --- a/packages/apps/virtual-machine/values.yaml +++ b/packages/apps/vm-instance/values.yaml @@ -13,16 +13,15 @@ running: true ## @param instanceProfile Virtual Machine prefferences profile ## instanceType: "u1.medium" -instanceProfile: ubuntu +instanceProfile: windows.10.virtio ## @param systemDisk.origin The HTTP URL for source image ## @param systemDisk.storage The size of the disk allocated for the virtual machine ## @param systemDisk.storageClass StorageClass used to store the data ## -systemDisk: - origin: "" - storage: 5Gi - storageClass: replicated +disks: + - name: "win10-iso" + - name: "win10-system" ## @param resources.cpu The number of CPU cores allocated to the virtual machine ## @param resources.memory The amount of memory allocated to the virtual machine From 9d3f278cc9542eaae6ac496dabedcae8c524b33f Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Tue, 15 Oct 2024 12:53:29 +0200 Subject: [PATCH 3/7] disable persistence Signed-off-by: Andrei Kvapil --- packages/apps/versions_map | 8 ++------ packages/apps/vm-instance/Chart.yaml | 2 +- packages/core/platform/bundles/paas-full.yaml | 6 +++--- .../Chart.yaml | 2 +- .../Makefile | 1 + .../templates/instancetypes.yaml | 0 .../templates/preferences.yaml | 12 ------------ .../values.yaml | 0 8 files changed, 8 insertions(+), 23 deletions(-) rename packages/system/{kubevirt-common-instancetypes => kubevirt-instancetypes}/Chart.yaml (77%) rename packages/system/{kubevirt-common-instancetypes => kubevirt-instancetypes}/Makefile (90%) rename packages/system/{kubevirt-common-instancetypes => kubevirt-instancetypes}/templates/instancetypes.yaml (100%) rename packages/system/{kubevirt-common-instancetypes => kubevirt-instancetypes}/templates/preferences.yaml (99%) rename packages/system/{kubevirt-common-instancetypes => kubevirt-instancetypes}/values.yaml (100%) diff --git a/packages/apps/versions_map b/packages/apps/versions_map index 38cebde5..ea806f74 100644 --- a/packages/apps/versions_map +++ b/packages/apps/versions_map @@ -74,12 +74,8 @@ tenant 1.2.0 15478a88 tenant 1.3.0 ceefae03 tenant 1.3.1 c56e5769 tenant 1.4.0 HEAD -virtual-machine 0.1.4 f2015d6 -virtual-machine 0.1.5 7cd7de7 -virtual-machine 0.2.0 5ca8823 -virtual-machine 0.3.0 b908400 -virtual-machine 0.4.0 4746d51 -virtual-machine 0.5.0 HEAD +vm-disk 0.1.0 HEAD +vm-instance 0.1.0 HEAD vpn 0.1.0 f642698 vpn 0.2.0 7151424 vpn 0.3.0 HEAD diff --git a/packages/apps/vm-instance/Chart.yaml b/packages/apps/vm-instance/Chart.yaml index 03f704d2..faa8d79f 100644 --- a/packages/apps/vm-instance/Chart.yaml +++ b/packages/apps/vm-instance/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 #name: Virtual Machine -name: virtual-machine +name: vm-instance description: Virtual machine instance icon: /logos/vm.svg diff --git a/packages/core/platform/bundles/paas-full.yaml b/packages/core/platform/bundles/paas-full.yaml index 0397933c..89cea0f0 100644 --- a/packages/core/platform/bundles/paas-full.yaml +++ b/packages/core/platform/bundles/paas-full.yaml @@ -79,9 +79,9 @@ releases: privileged: true dependsOn: [cilium,kubeovn,kubevirt-operator] -- name: kubevirt-common-instancetypes - releaseName: kubevirt-common-instancetypes - chart: cozy-kubevirt-common-instancetypes +- name: kubevirt-instancetypes + releaseName: kubevirt-instancetypes + chart: cozy-kubevirt-instancetypes namespace: cozy-kubevirt dependsOn: [cilium,kubeovn,kubevirt-operator,kubevirt] diff --git a/packages/system/kubevirt-common-instancetypes/Chart.yaml b/packages/system/kubevirt-instancetypes/Chart.yaml similarity index 77% rename from packages/system/kubevirt-common-instancetypes/Chart.yaml rename to packages/system/kubevirt-instancetypes/Chart.yaml index 6a352088..11a6b5dd 100644 --- a/packages/system/kubevirt-common-instancetypes/Chart.yaml +++ b/packages/system/kubevirt-instancetypes/Chart.yaml @@ -1,3 +1,3 @@ apiVersion: v2 -name: cozy-kubevirt +name: cozy-kubevirt-instancetypes version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process diff --git a/packages/system/kubevirt-common-instancetypes/Makefile b/packages/system/kubevirt-instancetypes/Makefile similarity index 90% rename from packages/system/kubevirt-common-instancetypes/Makefile rename to packages/system/kubevirt-instancetypes/Makefile index ced6c784..adc17909 100644 --- a/packages/system/kubevirt-common-instancetypes/Makefile +++ b/packages/system/kubevirt-instancetypes/Makefile @@ -10,3 +10,4 @@ update: yq -i 'select(.kind != "VirtualMachinePreference")' templates/preferences.yaml kustomize build https://github.com/kubevirt/common-instancetypes/instancetypes > templates/instancetypes.yaml yq -i 'select(.kind != "VirtualMachineInstancetype")' templates/instancetypes.yaml + sed -i '/persistent: true/d' templates/preferences.yaml diff --git a/packages/system/kubevirt-common-instancetypes/templates/instancetypes.yaml b/packages/system/kubevirt-instancetypes/templates/instancetypes.yaml similarity index 100% rename from packages/system/kubevirt-common-instancetypes/templates/instancetypes.yaml rename to packages/system/kubevirt-instancetypes/templates/instancetypes.yaml diff --git a/packages/system/kubevirt-common-instancetypes/templates/preferences.yaml b/packages/system/kubevirt-instancetypes/templates/preferences.yaml similarity index 99% rename from packages/system/kubevirt-common-instancetypes/templates/preferences.yaml rename to packages/system/kubevirt-instancetypes/templates/preferences.yaml index 5931e9f8..67af459a 100644 --- a/packages/system/kubevirt-common-instancetypes/templates/preferences.yaml +++ b/packages/system/kubevirt-instancetypes/templates/preferences.yaml @@ -1070,7 +1070,6 @@ spec: preferredDiskBus: sata preferredInterfaceModel: e1000e preferredTPM: - persistent: true features: preferredAcpi: {} preferredApic: {} @@ -1092,7 +1091,6 @@ spec: preferredSmm: {} firmware: preferredEfi: - persistent: true secureBoot: true preferredTerminationGracePeriodSeconds: 3600 requirements: @@ -1138,7 +1136,6 @@ spec: preferredInputType: tablet preferredInterfaceModel: virtio preferredTPM: - persistent: true features: preferredAcpi: {} preferredApic: {} @@ -1160,7 +1157,6 @@ spec: preferredSmm: {} firmware: preferredEfi: - persistent: true secureBoot: true preferredTerminationGracePeriodSeconds: 3600 requirements: @@ -1460,7 +1456,6 @@ spec: preferredDiskBus: sata preferredInterfaceModel: e1000e preferredTPM: - persistent: true features: preferredAcpi: {} preferredApic: {} @@ -1482,7 +1477,6 @@ spec: preferredSmm: {} firmware: preferredEfi: - persistent: true secureBoot: true preferredTerminationGracePeriodSeconds: 3600 requirements: @@ -1528,7 +1522,6 @@ spec: preferredInputType: tablet preferredInterfaceModel: virtio preferredTPM: - persistent: true features: preferredAcpi: {} preferredApic: {} @@ -1550,7 +1543,6 @@ spec: preferredSmm: {} firmware: preferredEfi: - persistent: true secureBoot: true preferredTerminationGracePeriodSeconds: 3600 requirements: @@ -1594,7 +1586,6 @@ spec: preferredDiskBus: sata preferredInterfaceModel: e1000e preferredTPM: - persistent: true features: preferredAcpi: {} preferredApic: {} @@ -1616,7 +1607,6 @@ spec: preferredSmm: {} firmware: preferredEfi: - persistent: true secureBoot: true preferredTerminationGracePeriodSeconds: 3600 requirements: @@ -1662,7 +1652,6 @@ spec: preferredInputType: tablet preferredInterfaceModel: virtio preferredTPM: - persistent: true features: preferredAcpi: {} preferredApic: {} @@ -1684,7 +1673,6 @@ spec: preferredSmm: {} firmware: preferredEfi: - persistent: true secureBoot: true preferredTerminationGracePeriodSeconds: 3600 requirements: diff --git a/packages/system/kubevirt-common-instancetypes/values.yaml b/packages/system/kubevirt-instancetypes/values.yaml similarity index 100% rename from packages/system/kubevirt-common-instancetypes/values.yaml rename to packages/system/kubevirt-instancetypes/values.yaml From 832c94b9404d85214ba5ff94311d11ea5faa84b6 Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Tue, 15 Oct 2024 16:57:11 +0200 Subject: [PATCH 4/7] refactor templates Signed-off-by: Andrei Kvapil --- packages/apps/vm-disk/Makefile | 5 - packages/apps/vm-disk/README.md | 249 +------------------ packages/apps/vm-disk/templates/dv.yaml | 10 +- packages/apps/vm-disk/values.schema.json | 145 ++--------- packages/apps/vm-disk/values.yaml | 25 +- packages/apps/vm-instance/Makefile | 5 +- packages/apps/vm-instance/README.md | 28 +-- packages/apps/vm-instance/templates/vm.yaml | 4 +- packages/apps/vm-instance/values.schema.json | 26 +- packages/apps/vm-instance/values.yaml | 13 +- 10 files changed, 81 insertions(+), 429 deletions(-) diff --git a/packages/apps/vm-disk/Makefile b/packages/apps/vm-disk/Makefile index cf5eab3c..264adfcf 100644 --- a/packages/apps/vm-disk/Makefile +++ b/packages/apps/vm-disk/Makefile @@ -2,8 +2,3 @@ include ../../../scripts/package.mk generate: readme-generator -v values.yaml -s values.schema.json -r README.md - INSTANCE_TYPES=$$(yq e '.metadata.name' -o=json -r ../../system/kubevirt-common-instancetypes/templates/instancetypes.yaml | yq 'split(" ") | . + [""]' -o json) \ - && yq -i -o json ".properties.instanceType.optional=true | .properties.instanceType.enum = $${INSTANCE_TYPES}" values.schema.json - PREFERENCES=$$(yq e '.metadata.name' -o=json -r ../../system/kubevirt-common-instancetypes/templates/preferences.yaml | yq 'split(" ") | . + [""]' -o json) \ - && yq -i -o json ".properties.instanceProfile.optional=true | .properties.instanceProfile.enum = $${PREFERENCES}" values.schema.json - yq -i -o json '.properties.externalPorts.items.type = "integer"' values.schema.json diff --git a/packages/apps/vm-disk/README.md b/packages/apps/vm-disk/README.md index a1752e05..c6258006 100644 --- a/packages/apps/vm-disk/README.md +++ b/packages/apps/vm-disk/README.md @@ -1,36 +1,6 @@ -# Virtual Machine +# Virtual Machine Disk -A Virtual Machine (VM) simulates computer hardware, enabling various operating systems and applications to run in an isolated environment. - -## Deployment Details - -The virtual machine is managed and hosted through KubeVirt, allowing you to harness the benefits of virtualization within your Kubernetes ecosystem. - -- Docs: [KubeVirt User Guide](https://kubevirt.io/user-guide/) -- GitHub: [KubeVirt Repository](https://github.com/kubevirt/kubevirt) - -## Accessing virtual machine - -You can access the virtual machine using the virtctl tool: -- [KubeVirt User Guide - Virtctl Client Tool](https://kubevirt.io/user-guide/user_workloads/virtctl_client_tool/) - -To access the serial console: - -``` -virtctl console -``` - -To access the VM using VNC: - -``` -virtctl vnc -``` - -To SSH into the VM: - -``` -virtctl ssh @ -``` +A Virtual Machine Disk ## Parameters @@ -42,218 +12,3 @@ virtctl ssh @ | `optical` | Defines is disk should be considered as optical | `false` | | `storage` | The size of the disk allocated for the virtual machine | `5Gi` | | `storageClass` | StorageClass used to store the data | `replicated` | - -## U Series - -The U Series is quite neutral and provides resources for -general purpose applications. - -*U* is the abbreviation for "Universal", hinting at the universal -attitude towards workloads. - -VMs of instance types will share physical CPU cores on a -time-slice basis with other VMs. - -### U Series Characteristics - -Specific characteristics of this series are: -- *Burstable CPU performance* - The workload has a baseline compute - performance but is permitted to burst beyond this baseline, if - excess compute resources are available. -- *vCPU-To-Memory Ratio (1:4)* - A vCPU-to-Memory ratio of 1:4, for less - noise per node. - -## O Series - -The O Series is based on the U Series, with the only difference -being that memory is overcommitted. - -*O* is the abbreviation for "Overcommitted". - -### UO Series Characteristics - -Specific characteristics of this series are: -- *Burstable CPU performance* - The workload has a baseline compute - performance but is permitted to burst beyond this baseline, if - excess compute resources are available. -- *Overcommitted Memory* - Memory is over-committed in order to achieve - a higher workload density. -- *vCPU-To-Memory Ratio (1:4)* - A vCPU-to-Memory ratio of 1:4, for less - noise per node. - -## CX Series - -The CX Series provides exclusive compute resources for compute -intensive applications. - -*CX* is the abbreviation of "Compute Exclusive". - -The exclusive resources are given to the compute threads of the -VM. In order to ensure this, some additional cores (depending -on the number of disks and NICs) will be requested to offload -the IO threading from cores dedicated to the workload. -In addition, in this series, the NUMA topology of the used -cores is provided to the VM. - -### CX Series Characteristics - -Specific characteristics of this series are: -- *Hugepages* - Hugepages are used in order to improve memory - performance. -- *Dedicated CPU* - Physical cores are exclusively assigned to every - vCPU in order to provide fixed and high compute guarantees to the - workload. -- *Isolated emulator threads* - Hypervisor emulator threads are isolated - from the vCPUs in order to reduce emaulation related impact on the - workload. -- *vNUMA* - Physical NUMA topology is reflected in the guest in order to - optimize guest sided cache utilization. -- *vCPU-To-Memory Ratio (1:2)* - A vCPU-to-Memory ratio of 1:2. - -## M Series - -The M Series provides resources for memory intensive -applications. - -*M* is the abbreviation of "Memory". - -### M Series Characteristics - -Specific characteristics of this series are: -- *Hugepages* - Hugepages are used in order to improve memory - performance. -- *Burstable CPU performance* - The workload has a baseline compute - performance but is permitted to burst beyond this baseline, if - excess compute resources are available. -- *vCPU-To-Memory Ratio (1:8)* - A vCPU-to-Memory ratio of 1:8, for much - less noise per node. - -## RT Series - -The RT Series provides resources for realtime applications, like Oslat. - -*RT* is the abbreviation for "realtime". - -This series of instance types requires nodes capable of running -realtime applications. - -### RT Series Characteristics - -Specific characteristics of this series are: -- *Hugepages* - Hugepages are used in order to improve memory - performance. -- *Dedicated CPU* - Physical cores are exclusively assigned to every - vCPU in order to provide fixed and high compute guarantees to the - workload. -- *Isolated emulator threads* - Hypervisor emulator threads are isolated - from the vCPUs in order to reduce emaulation related impact on the - workload. -- *vCPU-To-Memory Ratio (1:4)* - A vCPU-to-Memory ratio of 1:4 starting from - the medium size. - -## Development - -To get started with customizing or creating your own instancetypes and preferences -see [DEVELOPMENT.md](./DEVELOPMENT.md). - -## Resources - -The following instancetype resources are provided by Cozystack: - -Name | vCPUs | Memory ------|-------|------- -cx1.2xlarge | 8 | 16Gi -cx1.4xlarge | 16 | 32Gi -cx1.8xlarge | 32 | 64Gi -cx1.large | 2 | 4Gi -cx1.medium | 1 | 2Gi -cx1.xlarge | 4 | 8Gi -gn1.2xlarge | 8 | 32Gi -gn1.4xlarge | 16 | 64Gi -gn1.8xlarge | 32 | 128Gi -gn1.xlarge | 4 | 16Gi -m1.2xlarge | 8 | 64Gi -m1.4xlarge | 16 | 128Gi -m1.8xlarge | 32 | 256Gi -m1.large | 2 | 16Gi -m1.xlarge | 4 | 32Gi -n1.2xlarge | 16 | 32Gi -n1.4xlarge | 32 | 64Gi -n1.8xlarge | 64 | 128Gi -n1.large | 4 | 8Gi -n1.medium | 4 | 4Gi -n1.xlarge | 8 | 16Gi -o1.2xlarge | 8 | 32Gi -o1.4xlarge | 16 | 64Gi -o1.8xlarge | 32 | 128Gi -o1.large | 2 | 8Gi -o1.medium | 1 | 4Gi -o1.micro | 1 | 1Gi -o1.nano | 1 | 512Mi -o1.small | 1 | 2Gi -o1.xlarge | 4 | 16Gi -rt1.2xlarge | 8 | 32Gi -rt1.4xlarge | 16 | 64Gi -rt1.8xlarge | 32 | 128Gi -rt1.large | 2 | 8Gi -rt1.medium | 1 | 4Gi -rt1.micro | 1 | 1Gi -rt1.small | 1 | 2Gi -rt1.xlarge | 4 | 16Gi -u1.2xlarge | 8 | 32Gi -u1.2xmedium | 2 | 4Gi -u1.4xlarge | 16 | 64Gi -u1.8xlarge | 32 | 128Gi -u1.large | 2 | 8Gi -u1.medium | 1 | 4Gi -u1.micro | 1 | 1Gi -u1.nano | 1 | 512Mi -u1.small | 1 | 2Gi -u1.xlarge | 4 | 16Gi - -The following preference resources are provided by Cozystack: - -Name | Guest OS ------|--------- -alpine | Alpine -centos.7 | CentOS 7 -centos.7.desktop | CentOS 7 -centos.stream10 | CentOS Stream 10 -centos.stream10.desktop | CentOS Stream 10 -centos.stream8 | CentOS Stream 8 -centos.stream8.desktop | CentOS Stream 8 -centos.stream8.dpdk | CentOS Stream 8 -centos.stream9 | CentOS Stream 9 -centos.stream9.desktop | CentOS Stream 9 -centos.stream9.dpdk | CentOS Stream 9 -cirros | Cirros -fedora | Fedora (amd64) -fedora.arm64 | Fedora (arm64) -opensuse.leap | OpenSUSE Leap -opensuse.tumbleweed | OpenSUSE Tumbleweed -rhel.10 | Red Hat Enterprise Linux 10 Beta (amd64) -rhel.10.arm64 | Red Hat Enterprise Linux 10 Beta (arm64) -rhel.7 | Red Hat Enterprise Linux 7 -rhel.7.desktop | Red Hat Enterprise Linux 7 -rhel.8 | Red Hat Enterprise Linux 8 -rhel.8.desktop | Red Hat Enterprise Linux 8 -rhel.8.dpdk | Red Hat Enterprise Linux 8 -rhel.9 | Red Hat Enterprise Linux 9 (amd64) -rhel.9.arm64 | Red Hat Enterprise Linux 9 (arm64) -rhel.9.desktop | Red Hat Enterprise Linux 9 Desktop (amd64) -rhel.9.dpdk | Red Hat Enterprise Linux 9 DPDK (amd64) -rhel.9.realtime | Red Hat Enterprise Linux 9 Realtime (amd64) -sles | SUSE Linux Enterprise Server -ubuntu | Ubuntu -windows.10 | Microsoft Windows 10 -windows.10.virtio | Microsoft Windows 10 (virtio) -windows.11 | Microsoft Windows 11 -windows.11.virtio | Microsoft Windows 11 (virtio) -windows.2k16 | Microsoft Windows Server 2016 -windows.2k16.virtio | Microsoft Windows Server 2016 (virtio) -windows.2k19 | Microsoft Windows Server 2019 -windows.2k19.virtio | Microsoft Windows Server 2019 (virtio) -windows.2k22 | Microsoft Windows Server 2022 -windows.2k22.virtio | Microsoft Windows Server 2022 (virtio) -windows.2k25 | Microsoft Windows Server 2025 -windows.2k25.virtio | Microsoft Windows Server 2025 (virtio) diff --git a/packages/apps/vm-disk/templates/dv.yaml b/packages/apps/vm-disk/templates/dv.yaml index 06894c71..52cc8e8b 100644 --- a/packages/apps/vm-disk/templates/dv.yaml +++ b/packages/apps/vm-disk/templates/dv.yaml @@ -8,8 +8,16 @@ metadata: spec: contentType: kubevirt {{- if .Values.source }} + {{- if gt (len .Values.source) 1 }} + {{- fail "Exactly one type of source is expected!" }} + {{- end }} source: - {{- toYaml .Values.source | nindent 4 }} + {{- if hasKey .Values.source "http" }} + http: + url: {{ required "A valid .Values.source.http.url entry required!" .Values.source.http.url }} + {{- else if hasKey .Values.source "upload" }} + upload: {} + {{- end }} {{- else }} source: blank: {} diff --git a/packages/apps/vm-disk/values.schema.json b/packages/apps/vm-disk/values.schema.json index ea038273..2d820c33 100644 --- a/packages/apps/vm-disk/values.schema.json +++ b/packages/apps/vm-disk/values.schema.json @@ -1,128 +1,21 @@ { - "title": "Chart Values", - "type": "object", - "properties": { - "optical": { - "type": "boolean", - "description": "Defines is disk should be considered as optical", - "default": false - }, - "storage": { - "type": "string", - "description": "The size of the disk allocated for the virtual machine", - "default": "5Gi" - }, - "storageClass": { - "type": "string", - "description": "StorageClass used to store the data", - "default": "replicated" - }, - "instanceType": { - "optional": true, - "enum": [ - "cx1.2xlarge", - "cx1.4xlarge", - "cx1.8xlarge", - "cx1.large", - "cx1.medium", - "cx1.xlarge", - "gn1.2xlarge", - "gn1.4xlarge", - "gn1.8xlarge", - "gn1.xlarge", - "m1.2xlarge", - "m1.4xlarge", - "m1.8xlarge", - "m1.large", - "m1.xlarge", - "n1.2xlarge", - "n1.4xlarge", - "n1.8xlarge", - "n1.large", - "n1.medium", - "n1.xlarge", - "o1.2xlarge", - "o1.4xlarge", - "o1.8xlarge", - "o1.large", - "o1.medium", - "o1.micro", - "o1.nano", - "o1.small", - "o1.xlarge", - "rt1.2xlarge", - "rt1.4xlarge", - "rt1.8xlarge", - "rt1.large", - "rt1.medium", - "rt1.micro", - "rt1.small", - "rt1.xlarge", - "u1.2xlarge", - "u1.2xmedium", - "u1.4xlarge", - "u1.8xlarge", - "u1.large", - "u1.medium", - "u1.micro", - "u1.nano", - "u1.small", - "u1.xlarge", - "" - ] - }, - "instanceProfile": { - "optional": true, - "enum": [ - "alpine", - "centos.7", - "centos.7.desktop", - "centos.stream10", - "centos.stream10.desktop", - "centos.stream8", - "centos.stream8.desktop", - "centos.stream8.dpdk", - "centos.stream9", - "centos.stream9.desktop", - "centos.stream9.dpdk", - "cirros", - "fedora", - "fedora.arm64", - "opensuse.leap", - "opensuse.tumbleweed", - "rhel.10", - "rhel.10.arm64", - "rhel.7", - "rhel.7.desktop", - "rhel.8", - "rhel.8.desktop", - "rhel.8.dpdk", - "rhel.9", - "rhel.9.arm64", - "rhel.9.desktop", - "rhel.9.dpdk", - "rhel.9.realtime", - "sles", - "ubuntu", - "windows.10", - "windows.10.virtio", - "windows.11", - "windows.11.virtio", - "windows.2k16", - "windows.2k16.virtio", - "windows.2k19", - "windows.2k19.virtio", - "windows.2k22", - "windows.2k22.virtio", - "windows.2k25", - "windows.2k25.virtio", - "" - ] - }, - "externalPorts": { - "items": { - "type": "integer" - } + "title": "Chart Values", + "type": "object", + "properties": { + "optical": { + "type": "boolean", + "description": "Defines is disk should be considered as optical", + "default": false + }, + "storage": { + "type": "string", + "description": "The size of the disk allocated for the virtual machine", + "default": "5Gi" + }, + "storageClass": { + "type": "string", + "description": "StorageClass used to store the data", + "default": "replicated" + } } - } -} +} \ No newline at end of file diff --git a/packages/apps/vm-disk/values.yaml b/packages/apps/vm-disk/values.yaml index 1bf4febf..06126fd9 100644 --- a/packages/apps/vm-disk/values.yaml +++ b/packages/apps/vm-disk/values.yaml @@ -1,13 +1,28 @@ ## @section Common parameters ## @param source [object] The source image location used to create a disk +## Example upload local image: +## source: +## upload: {} +## +## Example download image from http source: +## source: +## http: +## url: "https://download.cirros-cloud.net/0.6.2/cirros-0.6.2-x86_64-disk.img" +## +## Well known public images: +## ubuntu: https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img +## fedora: https://download.fedoraproject.org/pub/fedora/linux/releases/40/Cloud/x86_64/images/Fedora-Cloud-Base-Generic.x86_64-40-1.14.qcow2 +## cirros: https://download.cirros-cloud.net/0.6.2/cirros-0.6.2-x86_64-disk.img +## alpine: https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/cloud/nocloud_alpine-3.20.2-x86_64-bios-tiny-r0.qcow2 +## talos: https://github.com/siderolabs/talos/releases/download/v1.7.6/nocloud-amd64.raw.xz + +source: {} + ## @param optical Defines is disk should be considered as optical +optical: false + ## @param storage The size of the disk allocated for the virtual machine ## @param storageClass StorageClass used to store the data -## -source: - #http: {} - #upload: {} -optical: false storage: 5Gi storageClass: replicated diff --git a/packages/apps/vm-instance/Makefile b/packages/apps/vm-instance/Makefile index cf5eab3c..f6e91ba7 100644 --- a/packages/apps/vm-instance/Makefile +++ b/packages/apps/vm-instance/Makefile @@ -2,8 +2,9 @@ include ../../../scripts/package.mk generate: readme-generator -v values.yaml -s values.schema.json -r README.md - INSTANCE_TYPES=$$(yq e '.metadata.name' -o=json -r ../../system/kubevirt-common-instancetypes/templates/instancetypes.yaml | yq 'split(" ") | . + [""]' -o json) \ + yq -o json -i '.properties.disks.items.type = "object" | .properties.disks.default = []' values.schema.json + INSTANCE_TYPES=$$(yq e '.metadata.name' -o=json -r ../../system/kubevirt-instancetypes/templates/instancetypes.yaml | yq 'split(" ") | . + [""]' -o json) \ && yq -i -o json ".properties.instanceType.optional=true | .properties.instanceType.enum = $${INSTANCE_TYPES}" values.schema.json - PREFERENCES=$$(yq e '.metadata.name' -o=json -r ../../system/kubevirt-common-instancetypes/templates/preferences.yaml | yq 'split(" ") | . + [""]' -o json) \ + PREFERENCES=$$(yq e '.metadata.name' -o=json -r ../../system/kubevirt-instancetypes/templates/preferences.yaml | yq 'split(" ") | . + [""]' -o json) \ && yq -i -o json ".properties.instanceProfile.optional=true | .properties.instanceProfile.enum = $${PREFERENCES}" values.schema.json yq -i -o json '.properties.externalPorts.items.type = "integer"' values.schema.json diff --git a/packages/apps/vm-instance/README.md b/packages/apps/vm-instance/README.md index 93e350a8..b61149b3 100644 --- a/packages/apps/vm-instance/README.md +++ b/packages/apps/vm-instance/README.md @@ -36,21 +36,19 @@ virtctl ssh @ ### Common parameters -| Name | Description | Value | -| ------------------------- | ---------------------------------------------------------------------------------- | ---------------- | -| `external` | Enable external access from outside the cluster | `false` | -| `externalPorts` | Specify ports to forward from outside the cluster | `[]` | -| `running` | Determines if the virtual machine should be running | `true` | -| `instanceType` | Virtual Machine instance type | `u1.medium` | -| `instanceProfile` | Virtual Machine prefferences profile | `ubuntu` | -| `systemDisk.origin` | The HTTP URL for source image | `""` | -| `systemDisk.storage` | The size of the disk allocated for the virtual machine | `5Gi` | -| `systemDisk.storageClass` | StorageClass used to store the data | `replicated` | -| `resources.cpu` | The number of CPU cores allocated to the virtual machine | `""` | -| `resources.memory` | The amount of memory allocated to the virtual machine | `""` | -| `sshKeys` | List of SSH public keys for authentication. Can be a single key or a list of keys. | `[]` | -| `cloudInit` | cloud-init user data config. See cloud-init documentation for more details. | `#cloud-config -` | +| Name | Description | Value | +| ------------------ | ---------------------------------------------------------------------------------- | ------------------- | +| `external` | Enable external access from outside the cluster | `false` | +| `externalPorts` | Specify ports to forward from outside the cluster | `[]` | +| `running` | Determines if the virtual machine should be running | `true` | +| `instanceType` | Virtual Machine instance type | `u1.medium` | +| `instanceProfile` | Virtual Machine prefferences profile | `windows.10.virtio` | +| `disks` | List of disks to attach | `[]` | +| `resources.cpu` | The number of CPU cores allocated to the virtual machine | `""` | +| `resources.memory` | The amount of memory allocated to the virtual machine | `""` | +| `sshKeys` | List of SSH public keys for authentication. Can be a single key or a list of keys. | `[]` | +| `cloudInit` | cloud-init user data config. See cloud-init documentation for more details. | `#cloud-config +` | ## U Series diff --git a/packages/apps/vm-instance/templates/vm.yaml b/packages/apps/vm-instance/templates/vm.yaml index 3ef650af..d6a1d007 100644 --- a/packages/apps/vm-instance/templates/vm.yaml +++ b/packages/apps/vm-instance/templates/vm.yaml @@ -45,7 +45,7 @@ spec: disks: {{- range $i, $disk := .Values.disks }} - name: disk-{{ .name }} - {{- $disk := (lookup "cdi.kubevirt.io/v1beta1" "DataVolume" $.Release.Namespace (printf "vm-disk-%s" .name)) }} + {{- $disk := lookup "cdi.kubevirt.io/v1beta1" "DataVolume" $.Release.Namespace .name }} {{- if $disk }} {{- if and (hasKey $disk.metadata.annotations "vm-disk.cozystack.io/optical") (eq (index $disk.metadata.annotations "vm-disk.cozystack.io/optical") "true") }} cdrom: {} @@ -83,7 +83,7 @@ spec: {{- range .Values.disks }} - name: disk-{{ .name }} dataVolume: - name: vm-disk-{{ .name }} + name: {{ .name }} {{- end }} {{- if or .Values.sshKeys .Values.cloudInit }} - name: cloudinitdisk diff --git a/packages/apps/vm-instance/values.schema.json b/packages/apps/vm-instance/values.schema.json index c5d8daf8..c978bba8 100644 --- a/packages/apps/vm-instance/values.schema.json +++ b/packages/apps/vm-instance/values.schema.json @@ -80,7 +80,7 @@ "instanceProfile": { "type": "string", "description": "Virtual Machine prefferences profile", - "default": "ubuntu", + "default": "windows.10.virtio", "optional": true, "enum": [ "alpine", @@ -128,24 +128,12 @@ "" ] }, - "systemDisk": { - "type": "object", - "properties": { - "origin": { - "type": "string", - "description": "The HTTP URL for source image", - "default": "" - }, - "storage": { - "type": "string", - "description": "The size of the disk allocated for the virtual machine", - "default": "5Gi" - }, - "storageClass": { - "type": "string", - "description": "StorageClass used to store the data", - "default": "replicated" - } + "disks": { + "type": "array", + "description": "List of disks to attach", + "default": [], + "items": { + "type": "object" } }, "resources": { diff --git a/packages/apps/vm-instance/values.yaml b/packages/apps/vm-instance/values.yaml index 59ad1c8e..4063c982 100644 --- a/packages/apps/vm-instance/values.yaml +++ b/packages/apps/vm-instance/values.yaml @@ -15,13 +15,12 @@ running: true instanceType: "u1.medium" instanceProfile: windows.10.virtio -## @param systemDisk.origin The HTTP URL for source image -## @param systemDisk.storage The size of the disk allocated for the virtual machine -## @param systemDisk.storageClass StorageClass used to store the data -## -disks: - - name: "win10-iso" - - name: "win10-system" +## @param disks [array] List of disks to attach +## Example: +## disks: +## - name: vm-disk-example-system +## - name: vm-disk-example-data +disks: [] ## @param resources.cpu The number of CPU cores allocated to the virtual machine ## @param resources.memory The amount of memory allocated to the virtual machine From ca639e6124d8d5fa2a47ff5c27397284fb6f6c03 Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Tue, 15 Oct 2024 18:32:52 +0200 Subject: [PATCH 5/7] fix controller revision error --- packages/apps/vm-instance/templates/vm.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/apps/vm-instance/templates/vm.yaml b/packages/apps/vm-instance/templates/vm.yaml index d6a1d007..9518e00d 100644 --- a/packages/apps/vm-instance/templates/vm.yaml +++ b/packages/apps/vm-instance/templates/vm.yaml @@ -17,11 +17,13 @@ spec: instancetype: kind: VirtualMachineClusterInstancetype name: {{ . }} + revisionName: null {{- end }} {{- with .Values.instanceProfile }} preference: kind: VirtualMachineClusterPreference name: {{ . }} + revisionName: null {{- end }} template: From 6d864ed9486f935c9f8846556ae8a4a10af6b794 Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Wed, 16 Oct 2024 10:33:40 +0200 Subject: [PATCH 6/7] refactor Signed-off-by: Andrei Kvapil --- packages/apps/vm-disk/hack/update-instance-types.sh | 1 - packages/apps/vm-disk/values.schema.json | 5 +++++ packages/apps/vm-disk/values.yaml | 2 +- packages/apps/vm-disk/values2.yaml | 12 ------------ packages/apps/vm-disk/values3.yaml | 13 ------------- packages/system/kubevirt/templates/kubevirt-cr.yaml | 2 -- 6 files changed, 6 insertions(+), 29 deletions(-) delete mode 100755 packages/apps/vm-disk/hack/update-instance-types.sh delete mode 100644 packages/apps/vm-disk/values2.yaml delete mode 100644 packages/apps/vm-disk/values3.yaml diff --git a/packages/apps/vm-disk/hack/update-instance-types.sh b/packages/apps/vm-disk/hack/update-instance-types.sh deleted file mode 100755 index 1a248525..00000000 --- a/packages/apps/vm-disk/hack/update-instance-types.sh +++ /dev/null @@ -1 +0,0 @@ -#!/bin/sh diff --git a/packages/apps/vm-disk/values.schema.json b/packages/apps/vm-disk/values.schema.json index 2d820c33..8bc577a4 100644 --- a/packages/apps/vm-disk/values.schema.json +++ b/packages/apps/vm-disk/values.schema.json @@ -2,6 +2,11 @@ "title": "Chart Values", "type": "object", "properties": { + "source": { + "type": "object", + "description": "The source image location used to create a disk", + "default": {} + }, "optical": { "type": "boolean", "description": "Defines is disk should be considered as optical", diff --git a/packages/apps/vm-disk/values.yaml b/packages/apps/vm-disk/values.yaml index 06126fd9..d636e81a 100644 --- a/packages/apps/vm-disk/values.yaml +++ b/packages/apps/vm-disk/values.yaml @@ -1,6 +1,6 @@ ## @section Common parameters -## @param source [object] The source image location used to create a disk +## @param source The source image location used to create a disk ## Example upload local image: ## source: ## upload: {} diff --git a/packages/apps/vm-disk/values2.yaml b/packages/apps/vm-disk/values2.yaml deleted file mode 100644 index 4026841c..00000000 --- a/packages/apps/vm-disk/values2.yaml +++ /dev/null @@ -1,12 +0,0 @@ -## @section Common parameters - -## @param source [object] The source image location used to create a disk -## @param optical Defines is disk should be considered as optical -## @param storage The size of the disk allocated for the virtual machine -## @param storageClass StorageClass used to store the data -## -source: - upload: {} -optical: true -storage: 10Gi -storageClass: replicated diff --git a/packages/apps/vm-disk/values3.yaml b/packages/apps/vm-disk/values3.yaml deleted file mode 100644 index 57759e8f..00000000 --- a/packages/apps/vm-disk/values3.yaml +++ /dev/null @@ -1,13 +0,0 @@ -## @section Common parameters - -## @param source [object] The source image location used to create a disk -## @param optical Defines is disk should be considered as optical -## @param storage The size of the disk allocated for the virtual machine -## @param storageClass StorageClass used to store the data -## -source: - #http: {} - #upload: {} -optical: false -storage: 50Gi -storageClass: replicated diff --git a/packages/system/kubevirt/templates/kubevirt-cr.yaml b/packages/system/kubevirt/templates/kubevirt-cr.yaml index bc9c6845..b98e3119 100644 --- a/packages/system/kubevirt/templates/kubevirt-cr.yaml +++ b/packages/system/kubevirt/templates/kubevirt-cr.yaml @@ -7,12 +7,10 @@ metadata: spec: certificateRotateStrategy: {} configuration: - vmStateStorageClass: "replicated" developerConfiguration: featureGates: - HotplugVolumes - ExpandDisks - - VMPersistentState customizeComponents: {} imagePullPolicy: IfNotPresent workloadUpdateStrategy: {} From f81e34359b6d571b4ad13d2ddd71e0e94914811a Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Wed, 16 Oct 2024 13:36:26 +0200 Subject: [PATCH 7/7] Add resize hook --- packages/apps/vm-disk/templates/dv.yaml | 5 ++ .../vm-disk/templates/pvc-resize-hook.yaml | 68 +++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 packages/apps/vm-disk/templates/pvc-resize-hook.yaml diff --git a/packages/apps/vm-disk/templates/dv.yaml b/packages/apps/vm-disk/templates/dv.yaml index 52cc8e8b..acfbbda3 100644 --- a/packages/apps/vm-disk/templates/dv.yaml +++ b/packages/apps/vm-disk/templates/dv.yaml @@ -1,3 +1,4 @@ +{{- $existingDV := lookup "cdi.kubevirt.io/v1beta1" "DataVolume" .Release.Namespace .Release.Name }} apiVersion: cdi.kubevirt.io/v1beta1 kind: DataVolume metadata: @@ -6,6 +7,9 @@ metadata: vm-disk.cozystack.io/optical: "{{ .Values.optical }}" name: {{ .Release.Name }} spec: + {{- if $existingDV }} + {{- toYaml $existingDV.spec | nindent 2 }} + {{- else }} contentType: kubevirt {{- if .Values.source }} {{- if gt (len .Values.source) 1 }} @@ -29,3 +33,4 @@ spec: {{- with .Values.storageClass }} storageClassName: {{ . }} {{- end }} + {{- end }} diff --git a/packages/apps/vm-disk/templates/pvc-resize-hook.yaml b/packages/apps/vm-disk/templates/pvc-resize-hook.yaml new file mode 100644 index 00000000..83737452 --- /dev/null +++ b/packages/apps/vm-disk/templates/pvc-resize-hook.yaml @@ -0,0 +1,68 @@ +{{- $existingPVC := lookup "v1" "PersistentVolumeClaim" .Release.Namespace .Release.Name }} +{{- if and $existingPVC (ne ($existingPVC.spec.resources.requests.storage | toString) .Values.storage) -}} +apiVersion: batch/v1 +kind: Job +metadata: + name: "{{ .Release.Name }}-volume-resize-hook" + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "0" + helm.sh/hook-delete-policy: hook-succeeded,before-hook-creation +spec: + template: + metadata: + labels: + policy.cozystack.io/allow-to-apiserver: "true" + spec: + serviceAccountName: {{ .Release.Name }}-volume-resize-hook + restartPolicy: Never + backoffLimit: 1 + containers: + - name: resize + image: bitnami/kubectl + command: ["sh", "-xec"] + args: + - | + kubectl patch pvc {{ .Release.Name }} -p '{"spec":{"resources":{"requests":{"storage":"{{ .Values.storage }}"}}}}' +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Release.Name }}-volume-resize-hook + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "-5" + helm.sh/hook-delete-policy: before-hook-creation +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ .Release.Name }}-volume-resize-hook + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "-5" + helm.sh/hook-delete-policy: before-hook-creation +rules: + - apiGroups: ["apps"] + resources: ["statefulsets"] + verbs: ["delete", "get", "list", "watch"] + - apiGroups: [""] + resources: ["persistentvolumeclaims"] + verbs: ["patch", "get", "list", "watch"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ .Release.Name }}-volume-resize-hook + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "-5" + helm.sh/hook-delete-policy: before-hook-creation +subjects: + - kind: ServiceAccount + name: {{ .Release.Name }}-volume-resize-hook +roleRef: + kind: Role + name: {{ .Release.Name }}-volume-resize-hook + apiGroup: rbac.authorization.k8s.io +{{- end }}