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

Add hyperv support #467

Merged
merged 1 commit into from
Aug 24, 2016
Merged

Add hyperv support #467

merged 1 commit into from
Aug 24, 2016

Conversation

jimmidyson
Copy link
Member

Fixes #465

@RaeesBhatti Would you be willing to try this branch out locally & see if hyperv support works for you? Would be much appreciated if you could.

@RaeesBhatti
Copy link
Contributor

RaeesBhatti commented Aug 9, 2016

@jimmidyson Can you please guide me to the build instructions?

@dlorenc
Copy link
Contributor

dlorenc commented Aug 9, 2016

You can find build steps here: https://github.com/kubernetes/minikube#development-guide

But they haven't been tested extensively from windows. Our CI server stores builds for each PR though, so you could grab the one from this PR here:
https://storage.googleapis.com/minikube-builds/logs/467/build.txt

You can see the upload if you click "details" next to "Jenkins Cross Buiild" in the Checks dialog, then click "Build Logs".

@dlorenc
Copy link
Contributor

dlorenc commented Aug 9, 2016

LGTM, but let's hold off until someone has a chance to test. @aaron-prindle has a Windows machine he can test with too.

@aaron-prindle
Copy link
Contributor

aaron-prindle commented Aug 9, 2016

I am having issues using hyperv with minikube, here is a gist showing the steps I took and the error that I am getting when running minikube start --vm-driver="hyperv" --show-libmachine-logs:

https://gist.github.com/aaron-prindle/4454d0941cfb095f23408c6f3035990f

@aaron-prindle
Copy link
Contributor

aaron-prindle commented Aug 9, 2016

I am getting this same issue when using docker-machine with the hyperv driver:
https://gist.github.com/aaron-prindle/feb8316e89ff26dd133ad280e35ba59d

@cosminilie
Copy link

I wanted to share some finding, maybe they can help you debug.

I also tested today with the PR. With docker machine when you enable connection sharing i was able to make it work (docker-machine version 0.8) http://www.packet6.com/allowing-windows-8-1-hyper-v-vm-to-work-with-wifi/ (this is mentioned in the hyper-v driver documentation -https://github.com/docker/machine/blob/8141874120abdc5c9056b6dbeb09bfb76a3eb290/docs/drivers/hyper-v.md). With minikube it remains stuck at:

Starting local Kubernetes cluster...
Waiting for SSH to be available...
E0817 06:50:21.093893 6956 start.go:81] Error starting host: Error configuring auth on host: Too many retries waiting
for SSH to be available. Last error: Maximum number of retries (60) exceeded. Retrying.
Waiting for SSH to be available...

Manually i'm able to SSH into the boot2docker vm using the minikube key(C:\Users\user.minikube\machines\minikubeVM\id_rsa).

One thing i noticed is that the boot2docker image for machine is version 1.12 while the minikube one is 1.11. It might not help but figured it might.

@RaeesBhatti
Copy link
Contributor

Is anyone still working on this?

@jimmidyson
Copy link
Member Author

I'm back next week to try to get this in. Would love feedback on any info on how to get this working.

@aaron-prindle
Copy link
Contributor

aaron-prindle commented Aug 18, 2016

I am currently looking into getting the hyperv driver working with minikube. Right
now there is an issue where once minikube provisions the vm through
libmachine it is not able to ssh into the machine.

On Thu, Aug 18, 2016 at 2:11 PM, Jimmi Dyson notifications@github.com
wrote:

I'm back next week to try to get this in. Would love feedback on any info
on how to get this working.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#467 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB3HqrEH8iSjMOvQKM2KDL-1XvjwAah8ks5qhMpwgaJpZM4JgI5G
.

@aaron-prindle
Copy link
Contributor

aaron-prindle commented Aug 19, 2016

Hey @jimmidyson,
In investigating the issue with minikube not being able to ssh into the minikubeVM with hyperv, there seems to be an issue with using SetConfigFromFlags. We do not call SetConfigFromFlags in minikube so the d.SSHUser="docker" call is not being run and as such d.SSHUser is actually being set to "root" and not "docker". I believe the fix for this is to append this line to createHypervHost in cluster_windows.go:
d.SSHUser = "docker"

Edit:
I can confirm this works, I made the change and tried it locally

func createHypervHost(config MachineConfig) drivers.Driver {
    d := hyperv.NewDriver(constants.MachineName, constants.Minipath)
    d.Boot2DockerURL = config.GetISOFileURI()
    d.MemSize = config.Memory
    d.CPU = config.CPUs
    d.DiskSize = int(config.DiskSize)
    d.SSHUser = "docker" // <-- added
    return d
}

@jimmidyson
Copy link
Member Author

@aaron-prindle Thanks! Updated.

@codecov-io
Copy link

codecov-io commented Aug 24, 2016

Current coverage is 29.84% (diff: 0.00%)

Merging #467 into master will decrease coverage by 0.11%

@@             master       #467   diff @@
==========================================
  Files            38         39     +1   
  Lines          1562       1568     +6   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits            468        468          
- Misses          991        997     +6   
  Partials        103        103          

Powered by Codecov. Last update 98086ea...abbb0f1

@dlorenc
Copy link
Contributor

dlorenc commented Aug 24, 2016

LGTM

@dlorenc dlorenc merged commit d82f428 into kubernetes:master Aug 24, 2016
@RaeesBhatti
Copy link
Contributor

Having some problems with this, I've attached the log file. Please take a look. I stopped and started again, even deleted and created the vm again but the results were same.
minikube.zip

@jimmidyson
Copy link
Member Author

That's an IPv6 address. Perhaps the hyperv driver doesn't support IPv6?

@jimmidyson
Copy link
Member Author

@RaeesBhatti Try docker/machine#1203

@dlorenc
Copy link
Contributor

dlorenc commented Aug 24, 2016

@aaron-prindle had some trouble with ipv6 as well

@RaeesBhatti
Copy link
Contributor

Yes, I changed the DockerNAT network interface type to public and bridged it to my WiFi and it has started working. Thanks.

However, it seems that only Administrator can create or start the minikube VM.

@aaron-prindle
Copy link
Contributor

I believe this is because by default only the Administrator account has
access to hyperv. It looks like you can add non-administrators to
the Hyper-V Administrators account, as shown here:
https://blogs.msdn.microsoft.com/virtual_pc_guy/2014/06/11/allowing-non-administrators-to-control-hyper-vupdated/

From this article though it appears that there might be issues in doing
this with Windows 10. It seems that Windows 8 works correctly though.

On Wed, Aug 24, 2016 at 12:47 PM, Raees Bhatti notifications@github.com
wrote:

Yes, I changed the DockerNAT network interface type to public and bridged
it to my WiFi and it has started working. Thanks.

However, it seems that only Administrator can create or start the minikube
VM.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#467 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB3HqmN6RQcwY0SkEnV2dkg0veXPmM2lks5qjJ_egaJpZM4JgI5G
.

@RaeesBhatti
Copy link
Contributor

It doesn't work with Windows 10 but thanks 👍

@RaeesBhatti
Copy link
Contributor

Found another problem. No, host directory is being shared in the VM, not event the Users directory. I think its the same as the xhyve problem. Should be easy to fix.

@dlorenc
Copy link
Contributor

dlorenc commented Aug 24, 2016

Could you open a separate bug to track that fix? It might be more work depending on the hyper-v driver.

@RaeesBhatti
Copy link
Contributor

@jimmidyson can you please take a look at #518

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants