-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
design-proposal: VM video device type configuration #371
base: main
Are you sure you want to change the base?
design-proposal: VM video device type configuration #371
Conversation
/cc @enp0s3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dasionov!
### Option 1: Annotation-Based Toggle | ||
**Description:** Introduce an annotation on the KubeVirt CR to specify the default video device type. The annotation kubevirt.io/default-video-device: vga can be used to default all VMs to VGA unless overridden in individual VMIs. | ||
|
||
**Pros:** | ||
|
||
- Minimal changes to the API schema. | ||
- Easy to implement and maintain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH I don't understand these pros.
Such an annotation would demand backward compatibility anyhow, and it's not much easier to implement AFAICT. To me it's equivalent to adding a non-visible field.
The proposed changes have no anticipated impact on scalability capabilities of the KubeVirt framework | ||
|
||
## Update/Rollback Compatibility | ||
cluster admins and vm-owners that have old vms that supports only vga video device. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can VMs change video type between reboots / live-migrations? Will it break the guest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK as long as the domain capabilities supports virtio as video type, switching between vga
to virtio
should not break the guest at all, (e.g in upgrade scenario)
unless of course the launcher image doesn't have the qemu-kvm-device-display-virtio-gpu
(which provide support for virtio
) installed, in that case the guest will break immediately at the first sync.
8e566ba
to
0ce94dd
Compare
0ce94dd
to
7928683
Compare
0596398
to
f51aee9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @dasionov! Looks good in general
A bit off topic, but I think this PR raises an interesting question around defaults. Do we want to generally default to the most-compatible option, or the most optimized one? In any case, I think that in some point in the future we'd need to consider defaulting to virtio as I think it makes sense to do so when supported on vast majority of guests.
|
||
**Cons:** | ||
- API Complexity: Requires schema changes to the VM template API, introducing additional fields that need maintenance and testing. | ||
- Administrative Effort: Per-VM configuration may lead to higher administrative overhead if many VMs require toggling. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, perhaps this con can be addressed with instance types & preferences
FYI @lyarwood
video: | ||
type: virtio |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Libvirt supports multiple video devices [1]:
<devices>
<video>
<model type='vga'/>
</video>
<video>
<model type='virtio'/>
</video>
</devices>
They also have the "primary" field to indicate which is the primary volume.
Since that's the case, I think we want to turn the video
field to a slice, and perhaps add the primary
field. In libvirt, if the primary field is not supplied, than the first video device is set as the primary, perhaps we can follow this approach.
f51aee9
to
452d86c
Compare
New changes are detected. LGTM label has been removed. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kubevirt doesn't strive to provide any/every option available (be it by qemu/libvirt...) and rather we have sidecars that allows you to do what we don't make explicitly available. I am not convinced we should support this unless good use cases are provided and available alternative (sidecars) shows major negatives compare to have this in core.
VM-owners who require specific configurations for VMIs in their environments. | ||
|
||
## User Stories | ||
- As a VM owner, I want to be able to set a better video device like `virtio` instead of the standard `vga`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not really an use case imho. There should be why one needs virtio or anything other than vga/bosh(partial compatibility of vga)
``` | ||
|
||
## Scalability | ||
The proposed changes have no anticipated impact on the scalability capabilities of the KubeVirt framework. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overhead of the virt-launcher(or rather qemu I should say) may be impacted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW I would guess the using virtio would demand less memory if anything. But this is just an educated guess :)
Sidecars are problematic in many ways. They're alpha, not really supported, hard to use and do not fit production use-cases. As most virtio drivers, I'd guess that also in this case the On the other hand, I agree this proposal lacks the use-cases and research necessary to back up these assumptions. |
452d86c
to
ba747c0
Compare
About the side-cars, I would you say you just point out that we should work towards graduation of it and improving it. For the virtio, well it is The virtualization "hw" so it better be better than emulating whatever ;)
|
We want to allow VM-owners to explicitly set the video device type when needed. Signed-off-by: Daniel Sionov <[email protected]>
ba747c0
to
f5bcbcd
Compare
What this PR does / why we need it:
This PR introduces a design proposal to discuss about the optimal implementation for introducing a dedicated field for a video device to be used.
We want to allow VM-owners to explicitly set the video device type when needed.
Fixes #
Special notes for your reviewer:
Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.
Release note: