Skip to content

Commit ecd1946

Browse files
committed
CNV-71192: Add TP support for custom video device selection when creating a VM
1 parent 1933f94 commit ecd1946

File tree

3 files changed

+60
-11
lines changed

3 files changed

+60
-11
lines changed

modules/virt-creating-vm-cli.adoc

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,29 +35,30 @@ This example manifest does not configure VM authentication.
3535
apiVersion: kubevirt.io/v1
3636
kind: VirtualMachine
3737
metadata:
38-
name: rhel-9-minimal # <1>
38+
name: rhel-9-minimal
3939
spec:
4040
dataVolumeTemplates:
4141
- metadata:
4242
name: imported-volume-mk4lj
4343
spec:
4444
sourceRef:
4545
kind: DataSource
46-
name: rhel9 # <2>
47-
namespace: openshift-virtualization-os-images # <3>
46+
name: rhel9
47+
namespace: openshift-virtualization-os-images
4848
storage:
4949
resources: {}
5050
instancetype:
51-
inferFromVolume: imported-volume-mk4lj # <4>
51+
inferFromVolume: imported-volume-mk4lj
5252
inferFromVolumeFailurePolicy: Ignore
5353
preference:
54-
inferFromVolume: imported-volume-mk4lj # <5>
54+
inferFromVolume: imported-volume-mk4lj
5555
inferFromVolumeFailurePolicy: Ignore
5656
runStrategy: Always
5757
template:
5858
spec:
5959
domain:
60-
devices: {}
60+
devices: video
61+
type: virtio
6162
memory:
6263
guest: 512Mi
6364
resources: {}
@@ -67,11 +68,15 @@ spec:
6768
name: imported-volume-mk4lj
6869
name: imported-volume-mk4lj
6970
----
70-
<1> The VM name.
71-
<2> The boot source for the guest operating system.
72-
<3> The namespace for the boot source. Golden images are stored in the `openshift-virtualization-os-images` namespace.
73-
<4> The instance type is inferred from the selected `DataSource` object.
74-
<5> The preference is inferred from the selected `DataSource` object.
71+
+
72+
73+
* `name: rhel-9-minimal` specifies the name of the VM.
74+
* `name: rhel9` specifies the boot source for the guest operating system in the `sourceRef` section.
75+
* `namespace: openshift-virtualization-os-images` specifies the namespace for the boot source. Golden images are stored in the `openshift-virtualization-os-images` namespace.
76+
* `instancetype: inferFromVolume: imported-volume-mk4lj` specifies the instance type inferred from the selected `DataSource` object.
77+
* `preference: inferFromVolume: imported-volume-mk4lj` specifies that the preference is inferred from the selected `DataSource` object.
78+
* `devices: video` specifies the use of a custom video device to enable hardware graphics acceleration. Enabling a custom video device is in Technology Preview for {VirtProductName} 4.21.
79+
* `type: virtio` specifies the type of custom video device.
7580
7681
. Create a virtual machine by using the manifest file:
7782
+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/creating_vms_advanced/creating_vms_cli/virt-creating-vms-from-cli.adoc
4+
5+
:_mod-docs-content-type: REFERENCE
6+
[id="virt-supported-custom-video-devices_{context}"]
7+
= Supported custom video device types
8+
9+
[role="_abstract"]
10+
When creating a virtual machine (VM), you can configure a custom video device type to override the default video configuration.
11+
12+
Configuring a custom video device allows you to specify different video devices, based on your guest operating system requirements and performance needs.
13+
14+
[IMPORTANT]
15+
====
16+
Custom video device support is a Technology Preview feature only. Technology Preview features are not supported with Red{nbsp}Hat production service level agreements (SLAs) and might not be functionally complete. Red{nbsp}Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
17+
18+
For more information about the support scope of Red{nbsp}Hat Technology Preview features, see link:https://access.redhat.com/support/offerings/techpreview/[Technology Preview Features Support Scope].
19+
====
20+
21+
Using a custom video device provides several advantages:
22+
23+
Performance:: Certain video devices provide better performance compared to legacy VGA emulation.
24+
Resolution flexibility:: You can set custom display resolutions that aren't limited by VGA constraints.
25+
Memory efficiency:: Some video types are more memory efficient for headless or console-only operations.
26+
27+
You can configure the following video device types:
28+
29+
* VirtIO: provides improved performance, and hardware-accelerated video decoding and encoding by offloading tasks to the host. Recommended for modern guest operating systems with available `VirtIO` drivers.
30+
* VGA: the standard for analog video display (default on AMD/x86_64 with BIOS).
31+
* Bochs: an emulated graphics adapter that provides a simple interface for guest operating systems to manage display settings (default on AMD/x86_64 with EFI).
32+
* Cirrus: a legacy video device that provides stable video output.
33+
* ramfb: a simple, unaccelerated virtual display device primarily used in the QEMU emulator, and useful for ARM architecture.
34+
35+
.Video device support by architecture
36+
[cols="1,1,1,1",options="header"]
37+
|====
38+
|Architecture |Boot mode |Default type |Supported types
39+
| AMD/x86_64 | BIOS | `vga` | `virtio`, `vga`, `bochs`, `cirrus`, `ramfb``
40+
| AMD/x86_64 | EFI | `bochs` | `virtio`, `vga`, `bochs`, `cirrus`, `ramfb``
41+
| ARM64 | BIOS/EFI | `virtio` | `virtio`, `ramfb`
42+
| s390x | BIOS/EFI | `virtio` | `virtio`
43+
|====

virt/creating_vms_advanced/creating_vms_cli/virt-creating-vms-from-cli.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ You can also xref:../../../virt/creating_vm/virt-creating-vms-from-instance-type
1414
====
1515

1616
include::modules/virt-creating-vm-cli.adoc[leveloffset=+1]
17+
include::modules/virt-supported-custom-video-devices.adoc[leveloffset=+2]
1718

1819
.Next steps
1920

0 commit comments

Comments
 (0)