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

hyperv: Default to disabling dynamic memory (pass --hyperv-disable-dynamic-memory to driver) #2331

Closed
AceHack opened this issue Dec 18, 2017 · 20 comments
Labels
co/hyperv HyperV related issues good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. os/windows priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. triage/duplicate Indicates an issue is a duplicate of other open issue.

Comments

@AceHack
Copy link

AceHack commented Dec 18, 2017

I keep running into issues the first time I do minikube start with kubeadm and hyper-v. It seems to be releated to dynamic memory. I can stop things, disable dynamic memory, then restart but I think it's messed up by then. I'm tyring to work though it now.

@kwaazaar
Copy link

kwaazaar commented Jan 6, 2018

I can confirm that dynamic memory enabled causes problems. Everything starts fine, but after a while it just stops working. See my own issue here: #2298

@alexandervantrijffel
Copy link

It would be nice if minikube start supports an option to disable dynamic memory for hyper-v.

@r2d4 r2d4 added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 5, 2018
@shahiddev
Copy link
Contributor

Hi, I've been bitten by this problem a few times so would like to implement this.
I'm having a few issues trying to build the source code (wsl on Windows machine), trying to follow the contrib guide.
I'm at Kubecon, if someone could give me a few pointers that would be awesome, I'm probably just being a noob :/

@dlorenc
Copy link
Contributor

dlorenc commented May 3, 2018

I'm here as well, come by the Minikube Intro session this afternoon and we can get your build sorted out :)

@shahiddev
Copy link
Contributor

Fantastic, I am attending that session and was going to ask you :-)

@dlorenc
Copy link
Contributor

dlorenc commented May 3, 2018

Hey @shahiddev, could you try doing the build with:

MINIKUBE_BUILD_IN_DOCKER=y make

My guess is that we're not building in docker because WSL looks like linux, but it doesn't look enough like it to actually work. That flag should force the build to run in a container.

@shahiddev
Copy link
Contributor

Hi @dlorenc that still fails

shahid@SI-SP4:~/projects/go/src/k8s.io/minikube$ MINIKUBE_BUILD_IN_DOCKER=y make
docker run --rm -e IN_DOCKER=1 --user 1000:1000 -w /go/src/k8s.io/minikube -v /home/shahid/projects/go:/go --entrypoint /bin/bash k8s.gcr.io/kube-cross:v1.9.1-1 -c '/usr/bin/make out/minikube-linux-amd64'
make: *** No rule to make target 'out/minikube-linux-amd64'.  Stop.
Makefile:120: recipe for target 'out/minikube-linux-amd64' failed
make: *** [out/minikube-linux-amd64] Error 2

@dlorenc
Copy link
Contributor

dlorenc commented May 3, 2018

Ah, that error usually has something to do with the volume mounts to the docker container not working correctly. I'm not terribly familiar with WSL or Docker for Windows, but my guess is that the part of the command:

-v /home/Shahid/projects/go:/go

isn't working correctly. Do you know how Docker for Windows mounts work with WSL? Essentially we need the minikube directory from your laptop mounted into the container at /go.

@shahiddev
Copy link
Contributor

Thanks, that's a useful hint, I can dig a bit deeper to figure that out.
I'll update the docs once I get to the bottom of it.

@shahiddev
Copy link
Contributor

Seems like I can get minikube building in the Windows Subsystem for Linux now without needing to use the docker approach.

I'm trying to build the Windows binaries using GOOS=windows make which isn't working, is this the correct way to build the windows binaries? Output I get is this:

$ GOOS=windows make
make: *** No rule to make target 'out/minikube-windows-amd64".exe"', needed by 'out/minikube".exe"'.  Stop.

@shahiddev
Copy link
Contributor

I got a way to test what I've been doing that's fine for now.

I have a question about best approach for implementing.
At the moment I'm implementing this as an optional flag to disable the dynamic memory option, this way current behaviour is unchanged, I would prefer to enable it by default but feels like giving the option for disable first is better before making a potentially breaking change by setting the default to be disabled.

Does that sound like a sensible approach?

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 6, 2018
@shahiddev
Copy link
Contributor

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 6, 2018
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 4, 2018
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Dec 4, 2018
@AceHack
Copy link
Author

AceHack commented Dec 5, 2018

Please keep active

@pbuhrmann
Copy link

This would be really useful, I'm going through this right now too

@chrislyonod
Copy link

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Jan 7, 2019
@tstromberg tstromberg added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. os/windows co/hyperv HyperV related issues good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. labels Jan 23, 2019
@tstromberg
Copy link
Contributor

I'd never heard of dynamic memory before, but read up a little on it:

https://blogs.technet.microsoft.com/virtualization/2015/05/26/when-to-use-hyper-v-dynamic-memory-versus-runtime-memory-resize/

I don't know much about HyperV, but I would definitely be happy to help someone implement this if they want to tackle it. It seems like the --hyperv-disable-dynamic-memory option is supported already by the hyperv driver:

https://docs.docker.com/machine/drivers/hyper-v/#4-create-the-nodes-with-docker-machine-and-the-microsoft-hyper-v-driver

@tstromberg tstromberg added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Jan 23, 2019
@tstromberg tstromberg changed the title Add ability to disable dynamic memory on hyper-v on frist start hyperv: Default to disabling dynamic memory (pass --hyperv-disable-dynamic-memory to driver) Jan 23, 2019
@tstromberg tstromberg added the triage/duplicate Indicates an issue is a duplicate of other open issue. label Jan 24, 2019
@tstromberg
Copy link
Contributor

Dupe of #1766

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/hyperv HyperV related issues good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. os/windows priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. triage/duplicate Indicates an issue is a duplicate of other open issue.
Projects
None yet
Development

No branches or pull requests