You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/ADMIN_GUIDE.md
+76-16
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ weight: 40
5
5
6
6
## Introduction
7
7
8
-
This guide is intended for [administrators](./README.md#role-model) of Deckhouse Virtualization Platform and describes how to create and modify cluster resources.
8
+
This guide is intended for administrators of Deckhouse Virtualization Platform and describes how to create and modify cluster resources.
9
9
10
10
The administrator also has rights to manage project resources, which are described in the [“User Guide”](./USER_GUIDE.md) document.
11
11
@@ -63,7 +63,11 @@ Check the result of the `ClusterVirtualImage` creation:
63
63
d8 k get clustervirtualimage ubuntu-22.04
64
64
# or shorter
65
65
d8 k get cvi ubuntu-22.04
66
+
```
67
+
68
+
Example output:
66
69
70
+
```txt
67
71
# NAME PHASE CDROM PROGRESS AGE
68
72
# ubuntu-22.04 Ready false 100% 23h
69
73
```
@@ -83,7 +87,11 @@ You can trace the image creation process by adding the `-w` key to the previous
83
87
84
88
```bash
85
89
d8 k get cvi ubuntu-22.04 -w
90
+
```
86
91
92
+
Example output:
93
+
94
+
```txt
87
95
# NAME PHASE CDROM PROGRESS AGE
88
96
# ubuntu-22.04 Provisioning false 4s
89
97
# ubuntu-22.04 Provisioning false 0.0% 4s
@@ -169,7 +177,11 @@ There are two options available for uploading from a cluster node and from an ar
169
177
170
178
```bash
171
179
d8 k get cvi some-image -o jsonpath="{.status.imageUploadURLs}"| jq
@@ -192,6 +204,11 @@ After the upload is complete, the image should be created and enter the `Ready`
192
204
193
205
```bash
194
206
d8 k get cvi some-image
207
+
```
208
+
209
+
Example output:
210
+
211
+
```txt
195
212
# NAME PHASE CDROM PROGRESS AGE
196
213
# some-image Ready false 100% 1m
197
214
```
@@ -200,10 +217,43 @@ d8 k get cvi some-image
200
217
201
218
The `VirtualMachineClass` resource is designed for centralized configuration of preferred virtual machine settings. It allows you to define CPU instructions and configuration policies for CPU and memory resources for virtual machines, as well as define ratios of these resources. In addition, `VirtualMachineClass` provides management of virtual machine placement across platform nodes. This allows administrators to effectively manage virtualization platform resources and optimally place virtual machines on platform nodes.
202
219
220
+
The structure of the `VirtualMachineClass` resource is as follows:
221
+
222
+
```yaml
223
+
apiVersion: virtualization.deckhouse.io/v1alpha2
224
+
kind: VirtualMachineClass
225
+
metadata:
226
+
name: <vmclass-name>
227
+
spec:
228
+
# The block describes the virtual processor parameters for virtual machines.
229
+
# This block cannot be changed after the resource has been created.
230
+
cpu: ...
231
+
232
+
# (optional) Describes the rules for node placement of virtual machines.
233
+
# When changed, it is automatically applied to all virtual machines using this VirtualMachineClass.
234
+
nodeSelector: ...
235
+
236
+
# (optional) Describes the sizing policy for configuring virtual machine resources.
237
+
# When changed, it is automatically applied to all virtual machines using this VirtualMachineClass.
238
+
sizingPolicies: ...
239
+
```
240
+
241
+
{{< alert level="warning" >}}
242
+
Warning. Since changing the `.spec.nodeSelector` parameter affects all virtual machines using this `VirtualMachineClass`, the following should be considered:
243
+
244
+
For Enterprise-edition: this may cause virtual machines to be migrated to new destination nodes if the current nodes do not meet placement requirements.
245
+
For Community edition: this may cause virtual machines to restart according to the automatic change application policy set in the `.spec.disruptions.restartApprovalMode` parameter.
246
+
{{< /alert >}}
247
+
203
248
The virtualization platform provides 3 predefined `VirtualMachineClass` resources:
204
249
205
250
```bash
206
-
kubectl get virtualmachineclass
251
+
d8 k get virtualmachineclass
252
+
```
253
+
254
+
Example output:
255
+
256
+
```txt
207
257
NAME PHASE AGE
208
258
host Ready 6d1h
209
259
host-passthrough Ready 6d1h
@@ -226,8 +276,8 @@ spec:
226
276
...
227
277
```
228
278
229
-
{{< alert level="warning" >}}
230
-
Warning. It is recommended to create at least one `VirtualMachineClass` resource in the cluster with the Discovery type immediately after all nodes are configured and added to the cluster. This will allow the virtual machines to utilize a generic CPU with the highest possible CPU performance given the CPUs on the cluster nodes, allowing the virtual machines to utilize the maximum CPU capabilities and migrate seamlessly between cluster nodes if necessary.
279
+
{{< alert level="info" >}}
280
+
It is recommended to create at least one `VirtualMachineClass` resource in the cluster with the Discovery type immediately after all nodes are configured and added to the cluster. This will allow the virtual machines to utilize a generic CPU with the highest possible CPU performance given the CPUs on the cluster nodes, allowing the virtual machines to utilize the maximum CPU capabilities and migrate seamlessly between cluster nodes if necessary.
231
281
{{< /alert >}}
232
282
233
283
Platform administrators can create the required classes of virtual machines according to their needs, but it is recommended to create the minimum required. Consider the following example:
@@ -398,7 +448,7 @@ spec:
398
448
- to create a vCPU of a specific CPU with a pre-defined instruction set, we use `type: Model`. In advance, to get a list of supported CPU names for the cluster node, run the command:
@@ -436,33 +486,43 @@ The following is an example of migrating a selected virtual machine:
436
486
Before starting the migration, see the current status of the virtual machine:
437
487
438
488
```bash
439
-
kubectl get vm
489
+
d8 k get vm
490
+
```
491
+
492
+
Example output:
493
+
494
+
```txt
440
495
# NAME PHASE NODE IPADDRESS AGE
441
496
# linux-vm Running virtlab-pt-1 10.66.10.14 79m
442
497
```
443
498
444
499
We can see that it is currently running on the `virtlab-pt-1` node.
445
500
446
-
To migrate a virtual machine from one host to another, taking into account the virtual machine placement requirements, the `VirtualMachineOperations` (`vmop`) resource with the migrate type is used.
501
+
To migrate a virtual machine from one host to another, taking into account the virtual machine placement requirements, the `VirtualMachineOperation` (`vmop`) resource with the `Evict` type is used.
447
502
448
503
```yaml
449
-
d8 k apply -f - <<EOF
504
+
d8 k create -f - <<EOF
450
505
apiVersion: virtualization.deckhouse.io/v1alpha2
451
506
kind: VirtualMachineOperation
452
507
metadata:
453
-
name: migrate-linux-vm-$(date +%s)
508
+
generateName: evict-linux-vm-
454
509
spec:
455
510
# virtual machine name
456
511
virtualMachineName: linux-vm
457
512
# operation for migration
458
-
type: Migrate
513
+
type: Evict
459
514
EOF
460
515
```
461
516
462
517
Immediately after creating the `vmop` resource, run the command:
463
518
464
519
```bash
465
-
kubectl get vm -w
520
+
d8 k get vm -w
521
+
```
522
+
523
+
Example output:
524
+
525
+
```txt
466
526
# NAME PHASE NODE IPADDRESS AGE
467
527
# linux-vm Running virtlab-pt-1 10.66.10.14 79m
468
528
# linux-vm Migrating virtlab-pt-1 10.66.10.14 79m
@@ -477,21 +537,21 @@ When performing work on nodes with running virtual machines, there is a risk of
d8 k drain <nodename> --pod-selector vm.kubevirt.internal.virtualization.deckhouse.io/name --delete-emptydir-data
489
549
```
490
550
491
-
After running the `kubectl drain` conmade, the node will go into maintenance mode and no virtual machines will be able to start on it. To take it out of maintenance mode, run the following command:
551
+
After running the `d8 k drain` command, the node will go into maintenance mode and no virtual machines will be able to start on it. To take it out of maintenance mode, run the following command:
492
552
493
553
```bash
494
-
kubectl uncordon <nodename>
554
+
d8 k uncordon <nodename>
495
555
```
496
556
497
557

@@ -523,7 +583,7 @@ For storing disks (`VirtualDisk`) and images (`VirtualImage`) with the `Persiste
523
583
The list of storage supported by the platform can be listed by executing the command to view storage classes (`StorageClass`)
0 commit comments