Skip to content

Commit 4aa4c47

Browse files
committed
Split Virtual Machine to vm-instance and vm-disk
1 parent 31873e3 commit 4aa4c47

25 files changed

Lines changed: 543 additions & 32 deletions

‎packages/apps/vm-disk/Chart.yaml‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
apiVersion: v2
2+
name: vm-disk
3+
description: Virtual Machine disk
4+
icon: /logos/disk.svg
5+
6+
# A chart can be either an 'application' or a 'library' chart.
7+
#
8+
# Application charts are a collection of templates that can be packaged into versioned archives
9+
# to be deployed.
10+
#
11+
# Library charts provide useful utilities or functions for the chart developer. They're included as
12+
# a dependency of application charts to inject those utilities and functions into the rendering
13+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
14+
type: application
15+
16+
# This is the chart version. This version number should be incremented each time you make changes
17+
# to the chart and its templates, including the app version.
18+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
19+
version: 0.1.0
20+
21+
# This is the version number of the application being deployed. This version number should be
22+
# incremented each time you make changes to the application. Versions are not expected to
23+
# follow Semantic Versioning. They should reflect the version the application is using.
24+
# It is recommended to use it with quotes.
25+
appVersion: 0.1.0

‎packages/apps/vm-disk/README.md‎

Lines changed: 259 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,259 @@
1+
# Virtual Machine
2+
3+
A Virtual Machine (VM) simulates computer hardware, enabling various operating systems and applications to run in an isolated environment.
4+
5+
## Deployment Details
6+
7+
The virtual machine is managed and hosted through KubeVirt, allowing you to harness the benefits of virtualization within your Kubernetes ecosystem.
8+
9+
- Docs: [KubeVirt User Guide](https://kubevirt.io/user-guide/)
10+
- GitHub: [KubeVirt Repository](https://github.com/kubevirt/kubevirt)
11+
12+
## Accessing virtual machine
13+
14+
You can access the virtual machine using the virtctl tool:
15+
- [KubeVirt User Guide - Virtctl Client Tool](https://kubevirt.io/user-guide/user_workloads/virtctl_client_tool/)
16+
17+
To access the serial console:
18+
19+
```
20+
virtctl console <vm>
21+
```
22+
23+
To access the VM using VNC:
24+
25+
```
26+
virtctl vnc <vm>
27+
```
28+
29+
To SSH into the VM:
30+
31+
```
32+
virtctl ssh <user>@<vm>
33+
```
34+
35+
## Parameters
36+
37+
### Common parameters
38+
39+
| Name | Description | Value |
40+
| -------------- | ------------------------------------------------------ | ------------ |
41+
| `source` | The source image location used to create a disk | `{}` |
42+
| `optical` | Defines is disk should be considered as optical | `false` |
43+
| `storage` | The size of the disk allocated for the virtual machine | `5Gi` |
44+
| `storageClass` | StorageClass used to store the data | `replicated` |
45+
46+
## U Series
47+
48+
The U Series is quite neutral and provides resources for
49+
general purpose applications.
50+
51+
*U* is the abbreviation for "Universal", hinting at the universal
52+
attitude towards workloads.
53+
54+
VMs of instance types will share physical CPU cores on a
55+
time-slice basis with other VMs.
56+
57+
### U Series Characteristics
58+
59+
Specific characteristics of this series are:
60+
- *Burstable CPU performance* - The workload has a baseline compute
61+
performance but is permitted to burst beyond this baseline, if
62+
excess compute resources are available.
63+
- *vCPU-To-Memory Ratio (1:4)* - A vCPU-to-Memory ratio of 1:4, for less
64+
noise per node.
65+
66+
## O Series
67+
68+
The O Series is based on the U Series, with the only difference
69+
being that memory is overcommitted.
70+
71+
*O* is the abbreviation for "Overcommitted".
72+
73+
### UO Series Characteristics
74+
75+
Specific characteristics of this series are:
76+
- *Burstable CPU performance* - The workload has a baseline compute
77+
performance but is permitted to burst beyond this baseline, if
78+
excess compute resources are available.
79+
- *Overcommitted Memory* - Memory is over-committed in order to achieve
80+
a higher workload density.
81+
- *vCPU-To-Memory Ratio (1:4)* - A vCPU-to-Memory ratio of 1:4, for less
82+
noise per node.
83+
84+
## CX Series
85+
86+
The CX Series provides exclusive compute resources for compute
87+
intensive applications.
88+
89+
*CX* is the abbreviation of "Compute Exclusive".
90+
91+
The exclusive resources are given to the compute threads of the
92+
VM. In order to ensure this, some additional cores (depending
93+
on the number of disks and NICs) will be requested to offload
94+
the IO threading from cores dedicated to the workload.
95+
In addition, in this series, the NUMA topology of the used
96+
cores is provided to the VM.
97+
98+
### CX Series Characteristics
99+
100+
Specific characteristics of this series are:
101+
- *Hugepages* - Hugepages are used in order to improve memory
102+
performance.
103+
- *Dedicated CPU* - Physical cores are exclusively assigned to every
104+
vCPU in order to provide fixed and high compute guarantees to the
105+
workload.
106+
- *Isolated emulator threads* - Hypervisor emulator threads are isolated
107+
from the vCPUs in order to reduce emaulation related impact on the
108+
workload.
109+
- *vNUMA* - Physical NUMA topology is reflected in the guest in order to
110+
optimize guest sided cache utilization.
111+
- *vCPU-To-Memory Ratio (1:2)* - A vCPU-to-Memory ratio of 1:2.
112+
113+
## M Series
114+
115+
The M Series provides resources for memory intensive
116+
applications.
117+
118+
*M* is the abbreviation of "Memory".
119+
120+
### M Series Characteristics
121+
122+
Specific characteristics of this series are:
123+
- *Hugepages* - Hugepages are used in order to improve memory
124+
performance.
125+
- *Burstable CPU performance* - The workload has a baseline compute
126+
performance but is permitted to burst beyond this baseline, if
127+
excess compute resources are available.
128+
- *vCPU-To-Memory Ratio (1:8)* - A vCPU-to-Memory ratio of 1:8, for much
129+
less noise per node.
130+
131+
## RT Series
132+
133+
The RT Series provides resources for realtime applications, like Oslat.
134+
135+
*RT* is the abbreviation for "realtime".
136+
137+
This series of instance types requires nodes capable of running
138+
realtime applications.
139+
140+
### RT Series Characteristics
141+
142+
Specific characteristics of this series are:
143+
- *Hugepages* - Hugepages are used in order to improve memory
144+
performance.
145+
- *Dedicated CPU* - Physical cores are exclusively assigned to every
146+
vCPU in order to provide fixed and high compute guarantees to the
147+
workload.
148+
- *Isolated emulator threads* - Hypervisor emulator threads are isolated
149+
from the vCPUs in order to reduce emaulation related impact on the
150+
workload.
151+
- *vCPU-To-Memory Ratio (1:4)* - A vCPU-to-Memory ratio of 1:4 starting from
152+
the medium size.
153+
154+
## Development
155+
156+
To get started with customizing or creating your own instancetypes and preferences
157+
see [DEVELOPMENT.md](./DEVELOPMENT.md).
158+
159+
## Resources
160+
161+
The following instancetype resources are provided by Cozystack:
162+
163+
Name | vCPUs | Memory
164+
-----|-------|-------
165+
cx1.2xlarge | 8 | 16Gi
166+
cx1.4xlarge | 16 | 32Gi
167+
cx1.8xlarge | 32 | 64Gi
168+
cx1.large | 2 | 4Gi
169+
cx1.medium | 1 | 2Gi
170+
cx1.xlarge | 4 | 8Gi
171+
gn1.2xlarge | 8 | 32Gi
172+
gn1.4xlarge | 16 | 64Gi
173+
gn1.8xlarge | 32 | 128Gi
174+
gn1.xlarge | 4 | 16Gi
175+
m1.2xlarge | 8 | 64Gi
176+
m1.4xlarge | 16 | 128Gi
177+
m1.8xlarge | 32 | 256Gi
178+
m1.large | 2 | 16Gi
179+
m1.xlarge | 4 | 32Gi
180+
n1.2xlarge | 16 | 32Gi
181+
n1.4xlarge | 32 | 64Gi
182+
n1.8xlarge | 64 | 128Gi
183+
n1.large | 4 | 8Gi
184+
n1.medium | 4 | 4Gi
185+
n1.xlarge | 8 | 16Gi
186+
o1.2xlarge | 8 | 32Gi
187+
o1.4xlarge | 16 | 64Gi
188+
o1.8xlarge | 32 | 128Gi
189+
o1.large | 2 | 8Gi
190+
o1.medium | 1 | 4Gi
191+
o1.micro | 1 | 1Gi
192+
o1.nano | 1 | 512Mi
193+
o1.small | 1 | 2Gi
194+
o1.xlarge | 4 | 16Gi
195+
rt1.2xlarge | 8 | 32Gi
196+
rt1.4xlarge | 16 | 64Gi
197+
rt1.8xlarge | 32 | 128Gi
198+
rt1.large | 2 | 8Gi
199+
rt1.medium | 1 | 4Gi
200+
rt1.micro | 1 | 1Gi
201+
rt1.small | 1 | 2Gi
202+
rt1.xlarge | 4 | 16Gi
203+
u1.2xlarge | 8 | 32Gi
204+
u1.2xmedium | 2 | 4Gi
205+
u1.4xlarge | 16 | 64Gi
206+
u1.8xlarge | 32 | 128Gi
207+
u1.large | 2 | 8Gi
208+
u1.medium | 1 | 4Gi
209+
u1.micro | 1 | 1Gi
210+
u1.nano | 1 | 512Mi
211+
u1.small | 1 | 2Gi
212+
u1.xlarge | 4 | 16Gi
213+
214+
The following preference resources are provided by Cozystack:
215+
216+
Name | Guest OS
217+
-----|---------
218+
alpine | Alpine
219+
centos.7 | CentOS 7
220+
centos.7.desktop | CentOS 7
221+
centos.stream10 | CentOS Stream 10
222+
centos.stream10.desktop | CentOS Stream 10
223+
centos.stream8 | CentOS Stream 8
224+
centos.stream8.desktop | CentOS Stream 8
225+
centos.stream8.dpdk | CentOS Stream 8
226+
centos.stream9 | CentOS Stream 9
227+
centos.stream9.desktop | CentOS Stream 9
228+
centos.stream9.dpdk | CentOS Stream 9
229+
cirros | Cirros
230+
fedora | Fedora (amd64)
231+
fedora.arm64 | Fedora (arm64)
232+
opensuse.leap | OpenSUSE Leap
233+
opensuse.tumbleweed | OpenSUSE Tumbleweed
234+
rhel.10 | Red Hat Enterprise Linux 10 Beta (amd64)
235+
rhel.10.arm64 | Red Hat Enterprise Linux 10 Beta (arm64)
236+
rhel.7 | Red Hat Enterprise Linux 7
237+
rhel.7.desktop | Red Hat Enterprise Linux 7
238+
rhel.8 | Red Hat Enterprise Linux 8
239+
rhel.8.desktop | Red Hat Enterprise Linux 8
240+
rhel.8.dpdk | Red Hat Enterprise Linux 8
241+
rhel.9 | Red Hat Enterprise Linux 9 (amd64)
242+
rhel.9.arm64 | Red Hat Enterprise Linux 9 (arm64)
243+
rhel.9.desktop | Red Hat Enterprise Linux 9 Desktop (amd64)
244+
rhel.9.dpdk | Red Hat Enterprise Linux 9 DPDK (amd64)
245+
rhel.9.realtime | Red Hat Enterprise Linux 9 Realtime (amd64)
246+
sles | SUSE Linux Enterprise Server
247+
ubuntu | Ubuntu
248+
windows.10 | Microsoft Windows 10
249+
windows.10.virtio | Microsoft Windows 10 (virtio)
250+
windows.11 | Microsoft Windows 11
251+
windows.11.virtio | Microsoft Windows 11 (virtio)
252+
windows.2k16 | Microsoft Windows Server 2016
253+
windows.2k16.virtio | Microsoft Windows Server 2016 (virtio)
254+
windows.2k19 | Microsoft Windows Server 2019
255+
windows.2k19.virtio | Microsoft Windows Server 2019 (virtio)
256+
windows.2k22 | Microsoft Windows Server 2022
257+
windows.2k22.virtio | Microsoft Windows Server 2022 (virtio)
258+
windows.2k25 | Microsoft Windows Server 2025
259+
windows.2k25.virtio | Microsoft Windows Server 2025 (virtio)

packages/apps/virtual-machine/hack/update-instance-types.sh renamed to packages/apps/vm-disk/hack/update-instance-types.sh

File renamed without changes.

‎packages/apps/vm-disk/logos/disk.svg‎

Lines changed: 14 additions & 0 deletions
Loading
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{{- if and .Values.source (hasKey .Values.source "upload") }}
2+
To upload your disk run:
3+
4+
virtctl image-upload dv -n {{ .Release.Namespace }} {{ .Release.Name }} --image-path your-image.qcow2
5+
{{- end }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: Role
3+
metadata:
4+
name: {{ .Release.Name }}-dashboard-resources
5+
rules:
6+
- apiGroups:
7+
- cdi.kubevirt.io
8+
resources:
9+
- datavolumes
10+
resourceNames:
11+
- {{ .Release.Name }}
12+
verbs: ["get", "list", "watch"]
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: cdi.kubevirt.io/v1beta1
2+
kind: DataVolume
3+
metadata:
4+
annotations:
5+
cdi.kubevirt.io/storage.bind.immediate.requested: ""
6+
vm-disk.cozystack.io/optical: "{{ .Values.optical }}"
7+
name: {{ .Release.Name }}
8+
spec:
9+
contentType: kubevirt
10+
{{- if .Values.source }}
11+
source:
12+
{{- toYaml .Values.source | nindent 4 }}
13+
{{- else }}
14+
source:
15+
blank: {}
16+
{{- end }}
17+
storage:
18+
resources:
19+
requests:
20+
storage: {{ .Values.storage }}
21+
{{- with .Values.storageClass }}
22+
storageClassName: {{ . }}
23+
{{- end }}

0 commit comments

Comments
 (0)