-
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
profiles don't work with kvm2 driver? #2274
Comments
I found exactly the same problem kvm2 driver no profile defaults to a minikube VM. Any profile other than minikube results in a VM with that name - as seen in Virtual Machine manager but it hangs. |
Hi @eric-am / @don57hpe, |
I stopped trying to use minikube with kvm. |
I think I have found the root cause of this issue, but I have no idea to fix it since we would need to manipulate the ISO used to boot the minikube image. The issue has to do with the fact that both kvm2 domains uses the same hostname. If we look at the status file generated by KVM, we can see that dhcp leases generated for both VM worked, but shares the same hostname.
When booting a 2nd image, it polls indefinitely since the ip is always set to minikube/pkg/drivers/kvm/network.go Lines 135 to 141 in 8f91c37
If anyone has an idea on how we could change the hostname, I'm all in to implement a fix for it. |
@maximebedard I've actually done this before, so its doable. I can't find the branch right now, but the driver accepts the machine name, which is the profile. So it should be easy to plumb through here. |
That's what I was looking for, but at first look I didn't find anything in libvirt that allowed me to change it. We currently use the profile name for the machine's One way to do it would be to ssh into it when we have the IP, however since it's generated via DHCP, it gets a bit tricky. We could bruteforce and try every ip for that given hostname, but that does not feel right at all 😅 If you ever find that branch back, I'm pretty curious on how you've done it! |
I've pushed a fix here, however now I'm getting an error in kubeadm init for the 2nd profile:
|
The driver relies on a hostname to lookup the correct information, but seems something is either not correctly passed in, or not working as expected from the DHCP Request: minikube/pkg/provision/buildroot.go Lines 145 to 148 in f5d9455
|
I am still not able to bringup minikube using profile with v0.28.1 release. below is the log.
|
0.28.1 Release * tag 'v0.28.1': (36 commits) Cut 0.28.1 release. Bump the iso version to 0.28.1. Remove untainting logic. Fix vboxsf host mounting. Update cri-tools to 1.11.1. Reuse the FeatureGates field to parse kubeadm and component feature gates Update kubeadm config template Fix generate config failed Add feature gates support for Kubeadm Keep both sets of instructions Prefer choco over manual installation for windows Add heketi and gluster dependencies to minikube.iso Add documentation. Add nvidia-driver-installer and nvidia-gpu-device-plugin addons. Add GPU support to minikube. enquotes PATH to guard against spaces Fixes kubernetes#2274 Make builds work with no GOPATH env var explicitly set - this is not needed since 1.8 but the build required it to be set Add missing controlPlaneEndpoint to fix kubeadm templates test Code review feedback. ...
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
BUG REPORT
Please provide the following details:
Environment:
Minikube version (use
minikube version
): v0.24.1cat ~/.minikube/machines/minikube/config.json | grep DriverName
): kvm2cat ~/.minikube/machines/minikube/config.json | grep -i ISO
orminikube ssh cat /etc/VERSION
): minikube-v0.23.6.isoWhat happened:
It appears minikube profiles don't work with the kvm2 driver...?
./minikube start --profile any-changed-value
does not work, failing with the error:E1205 16:03:36.824791 12899 start.go:150] Error starting host: Error creating host: Error creating machine: Error in driver during machine creation: Machine didn't return an IP after 120 seconds.
(
virsh list --all
does say a machine is up, and a reasonable-lookingqemu-system-x86_64
process is inps
.)./minikube start --profile minikube
-- e.g. explicitly stating the default value -- works fine.What you expected to happen:
Profiles should work.
How to reproduce it (as minimally and precisely as possible):
See above. I've done everything I can fathom to clean up qemu state (reboots,
virsh destroy
,virsh undefine
, simple process kills, blowing away minikube's state, and pretty much all combinations of orders the above) -- it doesn't seem like anything stateful on my machine matters. I'm also having reproducible success with--profile minikube
and consistent failure for any other--profile wat{1..20}
.It was a shot in the dark, but switching to
--bootstrapper kubeadm
also made no difference.Output of
minikube logs
(if applicable):E1205 16:03:36.824791 12899 start.go:150] Error starting host: Error creating host: Error creating machine: Error in driver during machine creation: Machine didn't return an IP after 120 seconds.
Anything else do we need to know:
Happy to run more introspection commands, kinda new to kvm. (Have been running vbox minikube for quite a while...)
The text was updated successfully, but these errors were encountered: