-
-
Notifications
You must be signed in to change notification settings - Fork 122
Clarification needed regarding building/running Virtualbox-KVM #8
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
Comments
That's awesome! I will try my best to assist with this effort.
That's odd. I have a faint memory of a case where the Also, if there is a way to give us access to the packaging scripts or a finished package, we could also take a closer look into what's happening.
Generally speaking, KVM must be available to the VMM. I would imagine this needs to be done similar to when Qemu is used as the VMM. It seems like sometimes, suid is used (#6), but so far, "just running the VM" worked fine for me when I tested this on Ubuntu.
Yes, that can be ignored. I'd have to take a closer look if there is a way to prevent the kernel part build from being prepared, but for the package, it should not matter.
Yes, thanks to #3 we noticed that we did not include any information about the networking limitations. We will provide those in the next update. For now, just using standard NAT should work fine.
There should be no change to the guest extensions. The relevant emulated devices are still all provided by VirtualBox and so the standard guest additions available through VirtualBox should work just fine. Anything regarding |
It seems that several distros, such as Debian's virtualbox-qt, Arch Linux's virtualbox, and openSUSE's virtualbox, apply setuid to the binaries. |
It works so far, using the current Gentoo ebuild. All I did was unloading the kernel modules, uninstalling the virtualbox and virtualbox-modules packages, then install the new virtualbox-kvm package. But the warnings created by Virtualbox are kind of an issue, as I use virtualbox with vagrant, which seems to scan the Virtualbox output and then exits with the following error message:
But the VM I created before switching to virtualbox-kvm is running so far if I start it manually. I reconfigured it to use virtio-scsi, virtio-net and KVM paravirtualization interface and change a bridged network to NAT though, as the network configuration prevented the VM to be started at first. |
@parthy
Machine log is not created and VBoxSVC.log contains the following relevant lines:
I wonder if KVM code fails for some reason and it just shows Virtualbox's default error msg regarding VboxDRV or KVM code is not active at all?
|
Could you share your ebuild for me to study? |
The ebuild is part of the gentoo repository since today (but I did not create it), here is the github PR: gentoo/gentoo#35258 |
cc @ceamac |
@eugenesan With your package, I was able to run the VM with |
Thank you for testing. |
Chiming in, currently adapting the openSUSE build script for the regular Virtualbox to this and I have a few doubts:
So far the package builds (still finding my way through the numerous patches added over the years), will let you know how it works. EDIT:
|
Thank you for your interest and work on packaging!
As far as I know, the pass-through functionality has always been handled by the user-space part of VirtualBox. This remains unchanged when using KVM as the hypervisor. Together with the udev rules that get deployed with distributed packages, this should work as expected. We are also currently updating the readme to include some information about this topic.
As mentioned in #3, there are limitations to the networking capabilities (which we will also include in the readme with the next update). Other than that, all convenience features (e.g., file sharing, USB, clipboard) should work as usual, at least we have not observed and restrictions. If there is anything odd, feel free to create an issue and we can look into it.
Guest additions and host extensions should work fine as well, of course provided the license agreement conditions are observed. We might not have covered all aspects out there, so if there is anything in particular you are referring to or encounter problems with, we are eager to hear about it as well.
The goal is to operate VirtualBox without any additional kernel modules. So yes, none of the drivers you mentioned are needed and would probably in fact interfere or not work anyway. I hope this helps, if there is anything else, don't hesitate to reach out again here or in a separate issue, if that's appropriate! |
And thank you for your work on KVM, it definitely fills a gap.
Then what I saw in virt-manager must have been managed by qemu-kvm. It's a bit of a disappointment, since it appears to work better in that regard and it doesn't require closed-source extensions for USB 3.0 support.
Will I still need to ship VBoxNetNAT, VBoxNetDHCP and VBoxNetAdpCtl with the host package? Perhaps it's obvious, but I haven't tested the whole setup, yet.
Well then, since I'm here I'll ask a broader question: do you plan on following upstream Virtualbox in the long term and re-integrate your changes for each new release or fork it outright? |
Just to clarify: since VirtualBox 7.x, no closed source extensions are required for USB 3.0 support. It's now part of the open source release. See: https://github.com/cyberus-technology/virtualbox-kvm/blob/dev/src/VBox/Devices/USB/DevXHCI.cpp |
Just an observation, we do set
When using the KVM backend the binaries should probably not be installed with setuid. There might be some other things governed by the hardening that I currently missed, but they seem to mostly concern the sane invocation of the privileged binaries. |
We are not planning to fork and diverge from upstream VirtualBox. Speaking about long-term plans is always a bit of a gamble, of course, but for now we are expecting to rebase our changes onto new versions as they are released. |
Just to let everyone know, we have now included more information in the readme. Feel free to have a look and let us know if that clarifies things! |
I have a question about using the VirtualBox KVM Backend. What are the differences and advantages of using it compared to using qemu/kvm directly (or the virt-manager graphical frontend)? |
Thanks for your interest! The goal of this project is not to convince people to use VirtualBox over qemu/kvm (or any other virtualization solution, for that matter). What we provide is an alternative backend for existing VirtualBox users that allows them to leverage KVM hypervisor functionality (with the benefits mentioned in the readme, such as running qemu and VirtualBox side by side), while maintaining the majority of the convenience aspects provided by VirtualBox. Analysing particular requirements and recommending a fitting virtualization solution is outside the scope of this backend project. But feel free to reach out to us directly if you have any further questions! |
I was able to add KVM patches to latest version 7.0.14 on Debian Unstable and get binary packages. It's pretty easy. My
VirtualBox GUI still complains about missing At the same time I can start VM from CLI:
So I'm 100% sure that I'm using patched VirtualBox and it works. Is something important missing here? Should it be possible to start VM from usual VirtualBox UI? Another question: Can this patched VirtualBox binary run using standard Thanks for this really good stuff! |
@dionorgua can you try building it with |
@tpressure it works with |
@tpressure So should we assume that |
@dionorgua this is correct. The KVM-Backend only works with |
Ok thanks. For me it feels like just some minor bug somewhere. As I said I was able to run VM with hardening enabled. Just not from UI because I need to pass |
@dionorgua I agree. Maybe you could open another ticket for this specific issue so we can track this correctly? |
I am working on packaging virtualbox-kvm for Debian/Ubuntu and I have a few questions:
This is the configure command my package utilizes:
I tried to remove "--ose" but it made no difference and I guess we can ignore missing --disable-hardening since it's not an issues with distro packages.
The text was updated successfully, but these errors were encountered: