-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add windows 11 template Signed-off-by: fossedihelm <[email protected]> opensuse: Add cloud-init images to 15.2 and 15.3 Signed-off-by: Felix Matouschek <[email protected]> Signed-off-by: fossedihelm <[email protected]> * Fix typo Signed-off-by: fossedihelm <[email protected]>
- Loading branch information
1 parent
b881fff
commit 3437dd6
Showing
9 changed files
with
263 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0"?> | ||
<libosinfo version="0.0.1"> | ||
<!-- Licensed under the GNU General Public License version 2 or later. | ||
See http://www.gnu.org/licenses/ for a copy of the license text --> | ||
<os id="http://microsoft.com/win/11"> | ||
<short-id>win11</short-id> | ||
<name>Microsoft Windows 11</name> | ||
<version>11.0</version> | ||
<vendor>Microsoft Corporation</vendor> | ||
<vendor xml:lang="ko">Microsoft Corporation</vendor> | ||
<vendor xml:lang="uk">Корпорація Microsoft</vendor> | ||
<vendor xml:lang="tr">Microsoft Corporation</vendor> | ||
<vendor xml:lang="pt_BR">Microsoft Corporation</vendor> | ||
<vendor xml:lang="pl">Microsoft Corporation</vendor> | ||
<vendor xml:lang="ja">Microsoft Corporation</vendor> | ||
<vendor xml:lang="it">Microsoft Corporation</vendor> | ||
<vendor xml:lang="id">Microsoft Corporation</vendor> | ||
<vendor xml:lang="fr">Microsoft Corporation</vendor> | ||
<vendor xml:lang="es">Microsoft Corporation</vendor> | ||
<vendor xml:lang="de">Microsoft Corporation</vendor> | ||
<vendor xml:lang="ca">Microsoft Corporation</vendor> | ||
<family>winnt</family> | ||
<distro>win</distro> | ||
<derives-from id="http://microsoft.com/win/10"/> | ||
<upgrades id="http://microsoft.com/win/10"/> | ||
<release-date>2021-10-05</release-date> | ||
<firmware arch="x86_64" type="efi"/> | ||
<firmware arch="x86_64" type="bios" supported="false"/> | ||
<resources arch="x86_64"> | ||
<minimum> | ||
<cpu>1000000000</cpu> | ||
<n-cpus>2</n-cpus> | ||
<ram>4294967296</ram> | ||
<storage>68719476736</storage> | ||
</minimum> | ||
</resources> | ||
</os> | ||
</libosinfo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,202 @@ | ||
apiVersion: template.openshift.io/v1 | ||
kind: Template | ||
metadata: | ||
name: windows11-{{ item.workload }}-{{ item.flavor }} | ||
annotations: | ||
openshift.io/display-name: "Microsoft Windows 11 VM" | ||
description: >- | ||
Template for Microsoft Windows 11 VM. | ||
A PVC with the Windows disk image must be available. | ||
tags: "hidden,kubevirt,virtualmachine,windows" | ||
iconClass: "icon-windows" | ||
openshift.io/provider-display-name: "KubeVirt" | ||
openshift.io/documentation-url: "https://github.com/kubevirt/common-templates" | ||
openshift.io/support-url: "https://github.com/kubevirt/common-templates/issues" | ||
template.openshift.io/bindable: "false" | ||
template.kubevirt.io/version: v1alpha1 | ||
defaults.template.kubevirt.io/disk: rootdisk | ||
defaults.template.kubevirt.io/network: default | ||
template.kubevirt.io/editable: | | ||
/objects[0].spec.template.spec.domain.cpu.cores | ||
/objects[0].spec.template.spec.domain.resources.requests.memory | ||
/objects[0].spec.template.spec.domain.devices.disks | ||
/objects[0].spec.template.spec.volumes | ||
/objects[0].spec.template.spec.networks | ||
name.os.template.kubevirt.io/win11: {{ lookup('osinfo', osinfoname).name }} | ||
labels: | ||
os.template.kubevirt.io/win11: "true" | ||
workload.template.kubevirt.io/{{ item.workload }}: "true" | ||
flavor.template.kubevirt.io/{{ item.flavor }}: "true" | ||
template.kubevirt.io/type: "base" | ||
template.kubevirt.io/version: "{{ lookup('env', 'VERSION') | default('devel', true) }}" | ||
{% if item.default %} | ||
template.kubevirt.io/default-os-variant: "true" | ||
{% endif %} | ||
objects: | ||
- apiVersion: kubevirt.io/v1 | ||
kind: VirtualMachine | ||
metadata: | ||
name: ${NAME} | ||
labels: | ||
vm.kubevirt.io/template: windows11-{{ item.workload }}-{{ item.flavor }} | ||
vm.kubevirt.io/template.version: "{{ lookup('env', 'VERSION') | default('devel', true) }}" | ||
vm.kubevirt.io/template.revision: "{{ lookup('env', 'REVISION') | default(1, true) }}" | ||
app: ${NAME} | ||
annotations: | ||
vm.kubevirt.io/validations: | | ||
[ | ||
{ | ||
"name": "minimal-required-memory", | ||
"path": "jsonpath::.spec.domain.resources.requests.memory", | ||
"rule": "integer", | ||
"message": "This VM requires more memory.", | ||
"min": {{ lookup('osinfo', osinfoname)["minimum_resources.architecture=x86_64.ram"] }} | ||
}, { | ||
"name": "windows-virtio-bus", | ||
"path": "jsonpath::.spec.domain.devices.disks[*].disk.bus", | ||
"valid": "jsonpath::.spec.domain.devices.disks[*].disk.bus", | ||
"rule": "enum", | ||
"message": "virtio disk bus type has better performance, install virtio drivers in VM and change bus type", | ||
"values": ["virtio"], | ||
"justWarning": true | ||
}, { | ||
"name": "windows-disk-bus", | ||
"path": "jsonpath::.spec.domain.devices.disks[*].disk.bus", | ||
"valid": "jsonpath::.spec.domain.devices.disks[*].disk.bus", | ||
"rule": "enum", | ||
"message": "disk bus has to be either virtio or sata or scsi", | ||
"values": ["virtio", "sata", "scsi"] | ||
}, { | ||
"name": "windows-cd-bus", | ||
"path": "jsonpath::.spec.domain.devices.disks[*].cdrom.bus", | ||
"valid": "jsonpath::.spec.domain.devices.disks[*].cdrom.bus", | ||
"rule": "enum", | ||
"message": "cd bus has to be sata", | ||
"values": ["sata"] | ||
}, { | ||
"name": "minimal-required-cores", | ||
"path": "jsonpath::.spec.domain.cpu.cores", | ||
"rule": "integer", | ||
"message": "This VM requires more cores.", | ||
"min": 2 | ||
} | ||
] | ||
spec: | ||
dataVolumeTemplates: | ||
- apiVersion: cdi.kubevirt.io/v1beta1 | ||
kind: DataVolume | ||
metadata: | ||
name: ${NAME} | ||
spec: | ||
storage: | ||
resources: | ||
requests: | ||
storage: 64Gi | ||
sourceRef: | ||
kind: DataSource | ||
name: ${DATA_SOURCE_NAME} | ||
namespace: ${DATA_SOURCE_NAMESPACE} | ||
running: false | ||
template: | ||
metadata: | ||
annotations: | ||
vm.kubevirt.io/os: "windows11" | ||
vm.kubevirt.io/workload: "{{ item.workload }}" | ||
vm.kubevirt.io/flavor: "{{ item.flavor }}" | ||
labels: | ||
kubevirt.io/domain: ${NAME} | ||
kubevirt.io/size: {{ item.flavor }} | ||
spec: | ||
domain: | ||
clock: | ||
utc: {} | ||
timer: | ||
hpet: | ||
present: false | ||
pit: | ||
tickPolicy: delay | ||
rtc: | ||
tickPolicy: catchup | ||
hyperv: {} | ||
cpu: | ||
sockets: {{ item.cpus }} | ||
cores: 2 | ||
threads: 1 | ||
{% if item.iothreads or item.emulatorthread %} | ||
dedicatedCpuPlacement: True | ||
{% endif %} | ||
{% if item.emulatorthread %} | ||
isolateEmulatorThread: True | ||
{% endif %} | ||
resources: | ||
requests: | ||
memory: {{ item.memsize }} | ||
features: | ||
acpi: {} | ||
apic: {} | ||
smm: {} | ||
hyperv: | ||
relaxed: {} | ||
vapic: {} | ||
vpindex: {} | ||
spinlocks: | ||
spinlocks: 8191 | ||
synic: {} | ||
synictimer: | ||
direct: {} | ||
tlbflush: {} | ||
frequencies: {} | ||
reenlightenment: {} | ||
ipi: {} | ||
runtime: {} | ||
reset: {} | ||
firmware: | ||
bootloader: | ||
efi: | ||
secureBoot: true | ||
devices: | ||
{% if item.multiqueue %} | ||
networkInterfaceMultiqueue: True | ||
{% endif %} | ||
disks: | ||
- disk: | ||
{% if item.workload == "highperformance" %} | ||
bus: virtio | ||
{% else %} | ||
bus: sata | ||
{% endif %} | ||
name: rootdisk | ||
interfaces: | ||
- masquerade: {} | ||
{% if item.multiqueue %} | ||
model: virtio | ||
{% else %} | ||
model: e1000e | ||
{% endif %} | ||
name: default | ||
{% if item.tablet %} | ||
inputs: | ||
- type: tablet | ||
bus: usb | ||
name: tablet | ||
{% endif %} | ||
tpm: {} | ||
terminationGracePeriodSeconds: 3600 | ||
volumes: | ||
- dataVolume: | ||
name: ${NAME} | ||
name: rootdisk | ||
networks: | ||
- name: default | ||
pod: {} | ||
parameters: | ||
- name: NAME | ||
description: VM name | ||
generate: expression | ||
from: "windows-[a-z0-9]{6}" | ||
- name: DATA_SOURCE_NAME | ||
description: Name of the DataSource to clone | ||
value: win11 | ||
- name: DATA_SOURCE_NAMESPACE | ||
description: Namespace of the DataSource | ||
value: kubevirt-os-images |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters