I am trying to run KVM on the VIM4 SBC. i’ve tried both the stock ubuntu server image provided on oowow and building my own custom ubuntu server with virtualization and kvm support by enabling them in menuconfig and saving it in fenix, but running kvm-ok on the resulting images always says /dev/kvm is not present and modprobe won’t let me load it. Is there any way to run KVM on these SBCs?
Edit:
I fixed it by adding the following lines to /build/linux/arch/arm64/configs/defconfig
Hi! What about experience with KVM?
Were you able to start virtual machines?
How about control through libvirt and Virt-Manager?
What OS did you run?
Have you tried running Windows 10/11?
I was trying to run Android Cuttlefish on CrosVM, so kind of a niche use case. KVM works with the kernel config I wrote above, however VGICv2 is broken for guests. To fix that I had to modify the amlogic dtb, I used this kernel patch to guide me through the process of getting the VGICv2 working in KVM, I can upstream on the Amlogic linux kernel repo if it would be useful. This would make KVM enabled Fenix builds to work out of the box, I just haven’t bothered yet. In the end I managed to get two virtualised android phones running, sadly no GPU acceleration so I have to use swiftshader for now.
Any way to get GPU acceleration on a custom ubuntu server build? I can’t get virglrenderer to work. I’ll keep debugging it on my own once I have the time but tips are always appreciated. Thanks
The current issue with GPU acceleration is that I’m trying to use virglrenderer, which requires OpenGL. Running glxinfo errors out due to not having a display, I’m sure there’s a public solution for this tho, OpenCL works perfectly so I assume GPU drivers are present and just getting an X server up should fix it. To test if the KVM patch worked correctly checking dmesg is the way. In a KVM build without the updated dts grepping dmesg for KVM will result in
I haven’t tried it with anything except CrosVM and a custom fork of it, but it should enable virtualization for anything that uses KVM, like qemu/libvirt. Some extra defconfigs might be required to get everything working but that’s easier to debug. Btw Fenix is amazing to debug things like these, thanks for making it all OSS and easy to use
Starting an Xvfb display before trying to use OpenGL fixed it, sorry for the bother but I’m just not used to working with gpu related things. For anyone else having the same problem run this: