Skip to content
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

How Do You Set the QEMU Driver Flags From Minikube #18895

Open
Dala0 opened this issue May 15, 2024 · 8 comments
Open

How Do You Set the QEMU Driver Flags From Minikube #18895

Dala0 opened this issue May 15, 2024 · 8 comments
Labels
co/qemu-driver QEMU related issues kind/feature Categorizes issue or PR as related to a new feature.

Comments

@Dala0
Copy link

Dala0 commented May 15, 2024

What Happened?

I am trying to get Minikube to start up a QEMU based x86 emulator on an ARM CPU under macOS.

It would be useful to access flags such as 'qemu-program', 'qemu-machine', and 'qemu-cpu'. I have been unable to work out how to do this from 'minikube start'.

  1. Is 'minikube start' the correct place to set these flags? If so, what is the syntax?
  2. If 'minikube start' is not the correct place to set the flags, where do you set them?

@afbjorklund

Attach the log file

log.txt

Operating System

macOS (Default)

Driver

QEMU

@spowelljr
Copy link
Member

spowelljr commented May 15, 2024

Hi @Dala0, currently those fields are not configurable in minikube, they are automatically chosen depending on the architecture of the machine. However allowing those field to be configurable on start using flags would be a good feature addition.

@spowelljr spowelljr added co/qemu-driver QEMU related issues kind/feature Categorizes issue or PR as related to a new feature. labels May 15, 2024
@spowelljr
Copy link
Member

I created a quick 10 minute implementation: #18906

@nnzv
Copy link

nnzv commented May 16, 2024

Looking forward to seeing this feature in the next release.

@Dala0
Copy link
Author

Dala0 commented May 16, 2024

Wow, that was quick! Thank you.

@spowelljr

@afbjorklund
Copy link
Collaborator

It would be useful to access flags such as 'qemu-program', 'qemu-machine', and 'qemu-cpu'. I have been unable to work out how to do this from 'minikube start'.

The flags are only available in docker-machine, minikube hardcodes all config in the driver "registry" - no plugins

I am trying to get Minikube to start up a QEMU based x86 emulator on an ARM CPU under macOS.

This is not something that is supported in minikube, since it is too slow to run Kubernetes under emulation

@afbjorklund
Copy link
Collaborator

Using the docker driver and qemu-user is faster:

But hopefully there will "soon" be a new tutorial:

@medyagh
Copy link
Member

medyagh commented May 20, 2024

It would be useful to access flags such as 'qemu-program', 'qemu-machine', and 'qemu-cpu'. I have been unable to work out how to do this from 'minikube start'.

The flags are only available in docker-machine, minikube hardcodes all config in the driver "registry" - no plugins

I am trying to get Minikube to start up a QEMU based x86 emulator on an ARM CPU under macOS.

This is not something that is supported in minikube, since it is too slow to run Kubernetes under emulation

@afbjorklund does that mean we need to modify the minikube-machine org code?

@afbjorklund
Copy link
Collaborator

does that mean we need to modify the minikube-machine org code?

Not really, minikube has its own fork of all the drivers (e.g. "qemu2")

So there are different ways of setting the Config, whether Flags or not

https://github.com/minikube-machine/machine/blob/main/drivers/qemu/qemu.go#L199

https://github.com/kubernetes/minikube/blob/master/pkg/minikube/registry/drvs/qemu2/qemu2.go#L117

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/qemu-driver QEMU related issues kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

5 participants