-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add the qemu2 driver to the minikube registry #13639
Conversation
45acbec
to
d00b8b8
Compare
@afbjorklund How can I help to progress this PR? |
@mprimeaux : first of all, thanks for volunteering! This particular PR is more about adding "qemu" to the hard-coded list of allowed machine drivers for minikube There are two issues going on here, at the same time... First we need an ISO that we can test with, and second we need an (Open Source) VM driver that can run it. Ideally, we would want a solution (for But that is secondary, working for minikube is primary... Docker stopped all development on the project in 2019. Our current buildroot is based on BIOS and isolinux, and needs to be changed to use UEFI and grub to boot up. The current drivers are based on VirtualBox or on HyperKit, which are only available for the |
Hi @mprimeaux, were you able to review @afbjorklund's comments? |
@afbjorklund @klaases Thanks for the overall context and related details. Tactically, I am unsure where to begin as I am not as familiar with the Minikube code base (yet). Seems focusing on a buildroot that uses UEFI and grub is a logical first foray. Thoughts? |
It is pretty much two separate projects. And it is possible to start with x86_64, and move on to aarch64. You will find that this PR is mostly about the minikube driver "registry", and doesn't really have any code. The main reason why it is so big, is that the config part has been forked from libmachine (for some reason) https://github.com/machine-drivers/docker-machine-driver-qemu/blob/master/qemu.go#L247_L256 The docker-machine drivers use the driver GetCreateFlags and SetConfigFromFlags methods instead. That means that the drivers can be decoupled (using gRPC), and doesn't have to be included/linked... So most likely we will end up having to fork "qemu" into a "qemu2", and then adopt it to minikube ? Note that the driver doesn't really work at the moment, it barely compiles and only for amd64 at that. |
The driver actually works now, if you upgrade docker-machine and boot2docker and compile it from source...
|
I have added flags to the driver, so that it will be possible to boot different architectures (beyond amd64). There is a truckload of them, but they can be defaulted. Both machine and cpu are mandatory for arm64. qemu-program |
Since the machine drivers are hardcoded in minikube, drivers need to be added to the registry to be tested. Add a basic sanity check for the qemu-system binary, and set up the basic configuration such as cpus/memory.
Copy some of the default values from the regular setup, that is not used when not using docker-machine config.
Only the SSH and the Docker port (2376) are available with the slirp network, everything else needs tunneling.
It is still ancient, so there is bound to be issues with the vendored code from libmachine and drivers.
This is an internal driver, with the new driver config rather than the machine flags of the external driver.
Assume "user" networking, for now at least.
Now this has both the QEMU (docker-machine) and QEMU2 (new minikube) drivers. Briefly tested on Linux, needs some more parameters before it works on Darwin too. Uses SSH for apiserver (8443) tunneling Basic support for ARM64 parameters... |
/ok-to-test |
kvm2 driver with docker runtime
Times for minikube ingress: 30.2s 30.8s 30.7s 31.2s 30.7s Times for minikube start: 52.6s 52.9s 55.0s 54.2s 54.6s docker driver with docker runtime
Times for minikube ingress: 22.9s 22.4s 22.4s 22.9s 22.9s Times for minikube start: 26.0s 23.4s 24.9s 23.9s 23.3s docker driver with containerd runtime
Times for minikube start: 29.7s 28.2s 28.1s 32.0s 44.0s Times for minikube ingress: 22.4s 22.4s 32.4s 17.9s 27.9s |
These are the flake rates of all failed tests.
Too many tests failed - See test logs for more details. To see the flake rates of all tests by environment, click here. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afbjorklund, sharifelgamal The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Since the machine drivers are hardcoded in minikube,
drivers need to be added to the registry to be tested.
Add a basic sanity check for the qemu-system binary,
and set up the basic configuration such as cpus/memory.
Most likely needs an updated version of the upstream driver...
https://github.com/machine-drivers/docker-machine-driver-qemu
Note: this driver uses qemu and runs in userspace but can use kvm
There is another driver called kvm2, which uses the libvirt library