How to change video driver from qxl -> {virtio-gpu}

847 views
Skip to first unread message

Nirmoy

unread,
Apr 6, 2021, 8:00:13 AM4/6/21
to kubevirt-dev
So I have looked into [1] but couldn't figure out a way to change video driver in the VM.
Is there a way to have different video driver than qxl ? 

[1] https://kubevirt.io/api-reference/master/definitions.html

Regards,
Nirmoy

Roman Mohr

unread,
Apr 12, 2021, 4:46:54 AM4/12/21
to Nirmoy, kubevirt-dev
Hi,

On Tue, Apr 6, 2021 at 2:00 PM Nirmoy <nirmoy...@gmail.com> wrote:
So I have looked into [1] but couldn't figure out a way to change video driver in the VM.
Is there a way to have different video driver than qxl ? 

No, that is not possible. We add a very low-res vga card to the VM for admin-access purposes via VNC.
What would you need?

Best regards,
Roman
 
--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/55998399-f15e-40e0-b8ba-03f6e84758e9n%40googlegroups.com.

nirmoy das

unread,
Apr 12, 2021, 6:01:33 AM4/12/21
to Roman Mohr, kubevirt-dev
Hi Roman, 

Thanks for your reply. 

I am working on creating CI jobs to test kernel GPU drivers with kubevirt on Kubernetes and Zuul. Hence I was 
wondering if there is a way to change video hw in kubevirt.

Regards,
Nirmoy

Roman Mohr

unread,
Apr 12, 2021, 6:51:19 AM4/12/21
to nirmoy das, kubevirt-dev
On Mon, Apr 12, 2021 at 12:01 PM nirmoy das <nirmoy...@gmail.com> wrote:
Hi Roman, 

Thanks for your reply. 

I am working on creating CI jobs to test kernel GPU drivers with kubevirt on Kubernetes and Zuul. Hence I was 
wondering if there is a way to change video hw in kubevirt.

I am not sure if it helps, but you can pass through real GPUs from the host: https://kubevirt.io/user-guide/virtual_machines/host-devices/#host-devices-assignment.
Which exact configurations were you looking for?

Best Regards,
Roman

nirmoy das

unread,
Apr 12, 2021, 7:20:35 AM4/12/21
to Roman Mohr, kubevirt-dev
Hi Roman, 

On Mon, 12 Apr 2021 at 12:51, Roman Mohr <rm...@redhat.com> wrote:


On Mon, Apr 12, 2021 at 12:01 PM nirmoy das <nirmoy...@gmail.com> wrote:
Hi Roman, 

Thanks for your reply. 

I am working on creating CI jobs to test kernel GPU drivers with kubevirt on Kubernetes and Zuul. Hence I was 
wondering if there is a way to change video hw in kubevirt.

I am not sure if it helps, but you can pass through real GPUs from the host: https://kubevirt.io/user-guide/virtual_machines/host-devices/#host-devices-assignment.

Yes, this is something I want to use for real GPU drivers and it is in my TODO list. But kernel changes also affect virtual GPUs like qxl/virtio-gpu/Bochs[1]. So 
I want to make sure that I can boot a VM with a virtual GPU and load the kernel diver and see if something bad happened.

 
Which exact configurations were you looking for?


Something like the below configuration would be nice. I started looking into the kubevirt  codebase to see if I can come up with a quick RFC patch(looks like it might take some time for me)

devices:
  video:
    - qxl: 
         memory: 1024
     - virtio:
          memory: 1024
          virgl: on 


Regards,
Nirmoy
.....

 

Best Regards,
Roman
 

Regards,
Nirmoy

On Mon, 12 Apr 2021 at 10:46, Roman Mohr <rm...@redhat.com> wrote:
Hi,

On Tue, Apr 6, 2021 at 2:00 PM Nirmoy <nirmoy...@gmail.com> wrote:
So I have looked into [1] but couldn't figure out a way to change video driver in the VM.
Is there a way to have different video driver than qxl ? 

No, that is not possible. We add a very low-res vga card to the VM for admin-access purposes via VNC.
What would you need?

Best regards,
Roman
 

[1] https://kubevirt.io/api-reference/master/definitions.html

Regards,
Nirmoy

--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/55998399-f15e-40e0-b8ba-03f6e84758e9n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.

Roman Mohr

unread,
Apr 12, 2021, 11:41:48 AM4/12/21
to nirmoy das, kubevirt-dev
On Mon, Apr 12, 2021 at 1:20 PM nirmoy das <nirmoy...@gmail.com> wrote:
Hi Roman, 

On Mon, 12 Apr 2021 at 12:51, Roman Mohr <rm...@redhat.com> wrote:


On Mon, Apr 12, 2021 at 12:01 PM nirmoy das <nirmoy...@gmail.com> wrote:
Hi Roman, 

Thanks for your reply. 

I am working on creating CI jobs to test kernel GPU drivers with kubevirt on Kubernetes and Zuul. Hence I was 
wondering if there is a way to change video hw in kubevirt.

I am not sure if it helps, but you can pass through real GPUs from the host: https://kubevirt.io/user-guide/virtual_machines/host-devices/#host-devices-assignment.

Yes, this is something I want to use for real GPU drivers and it is in my TODO list. But kernel changes also affect virtual GPUs like qxl/virtio-gpu/Bochs[1]. So 
I want to make sure that I can boot a VM with a virtual GPU and load the kernel diver and see if something bad happened. 

 
Which exact configurations were you looking for?


Something like the below configuration would be nice. I started looking into the kubevirt  codebase to see if I can come up with a quick RFC patch(looks like it might take some time for me)

You can also define a hook-sidecar and inject your changes directly. Here an example: https://github.com/kubevirt/kubevirt/tree/master/cmd/example-hook-sidecar
 

nirmoy das

unread,
Apr 12, 2021, 11:57:02 AM4/12/21
to Roman Mohr, kubevirt-dev
Ah cool, hook-sidecar should work too. 

Thanks, Roman!

Fabian Deutsch

unread,
Apr 13, 2021, 4:43:05 AM4/13/21
to nirmoy das, Roman Mohr, kubevirt-dev
On Mon, Apr 12, 2021 at 12:01 PM nirmoy das <nirmoy...@gmail.com> wrote:
Hi Roman, 

Thanks for your reply. 

I am working on creating CI jobs to test kernel GPU drivers with kubevirt on Kubernetes and Zuul. Hence I was 
wondering if there is a way to change video hw in kubevirt.

Good to see you doing this! :)

In general we try to stay opinionated with KubeVirt in order to avoid to increase (the already high) complexity of our API.
Thus while I understand that this is helping your use-case, I would still say that this is not something that a regular ("the vast 80%") would need to do - changing the virtual video drivers.

Thus your feedback on the side car - or patches to simplify their use - would be welcome
 

Regards,
Nirmoy

On Mon, 12 Apr 2021 at 10:46, Roman Mohr <rm...@redhat.com> wrote:
Hi,

On Tue, Apr 6, 2021 at 2:00 PM Nirmoy <nirmoy...@gmail.com> wrote:
So I have looked into [1] but couldn't figure out a way to change video driver in the VM.
Is there a way to have different video driver than qxl ? 

No, that is not possible. We add a very low-res vga card to the VM for admin-access purposes via VNC.
What would you need?

Best regards,
Roman
 

[1] https://kubevirt.io/api-reference/master/definitions.html

Regards,
Nirmoy

--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/55998399-f15e-40e0-b8ba-03f6e84758e9n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages