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

Unable to provision VM when OpenSSH-Win32 is used #1537

Closed
gbraad opened this issue May 30, 2017 · 5 comments
Closed

Unable to provision VM when OpenSSH-Win32 is used #1537

gbraad opened this issue May 30, 2017 · 5 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. os/windows

Comments

@gbraad
Copy link
Contributor

gbraad commented May 30, 2017

Minikube version (use minikube version):
v0.19.0

Environment:

  • OS (e.g. from /etc/os-release):
    Windows
  • VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName):
    Hyper-V (as tested)
  • ISO version (e.g. cat ~/.minikube/machines/minikube/config.json | grep -i ISO or minikube ssh cat /etc/VERSION):
    not relevant for the issue
  • Install tools:
    choco install openssh (from https://github.com/PowerShell/Win32-OpenSSH)
  • Others:

What happened:
When trying to start minikube with openssh-win32 on path, the provisioning of the VM will fail because minikube is unable to communicate using ssh.

What you expected to happen:
Successful deployment

How to reproduce it (as minimally and precisely as possible):

PS> choco install openssh  # or
PS> $env:PATH += "path to openssh-win32"
PS> .\minikube-windows-amd64.exe start --vm-driver hyperv --hyperv-virtual-switch "Wireless" -v 5
Starting local Kubernetes v1.6.0 cluster...
Starting VM...
Running pre-create checks...
Creating machine...
(minikube) Downloading C:\Users\gbraad\.minikube\cache\boot2docker.iso from file://C:/Users/gbraad/.minikube/cache/iso/minikube-v0.18.0.iso...
(minikube) Creating SSH key...
(minikube) Creating VM...
(minikube) Using switch "Wireless"
(minikube) Creating VHD
(minikube) Starting VM...
(minikube) Waiting for host to start...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
E0530 15:51:33.740040   11324 start.go:119] Error starting host: Error creating host: Error creating machine: Error detecting OS: Too many retries waiting for SSH to be available.  Last error: Maximum number of retries (60) exceeded.
 Retrying.
E0530 15:51:33.741971   11324 start.go:125] Error starting host:  Error creating host: Error creating machine: Error detecting OS: Too many retries waiting for SSH to be available.  Last error: Maximum number of retries (60) exceeded

Anything else do we need to know:
Deployment succeeds using cygwin openssh or the native implementation

@gbraad
Copy link
Contributor Author

gbraad commented May 30, 2017

This is a duplicate of: #1086, #1311, and should have been fixed by #1141 "Force libmachine to use Native Go SSH client" (but this only fixes the client, and not the provisioner)

Note: forcing the native client is a workaround in my opinion. At best it should have been configurable to force to native client.

@dlorenc
Copy link
Contributor

dlorenc commented May 30, 2017

Thanks for the detailed report. A quick look at the code leads me to believe #1141 should have fixed this, like you said. I don't see anything obvious missed by that. Do you have a pointer on where the provisioner is grabbing the wrong client type?

Making this configurable SGTM too.

@aaron-prindle aaron-prindle added kind/bug Categorizes issue or PR as related to a bug. os/windows labels May 30, 2017
@gbraad
Copy link
Contributor Author

gbraad commented May 30, 2017

It seems that openssh-win32 will work targeting the end-May release. This was caused due to "certain Unix specific elements in the command line (/dev/null) that are not mapped in the Windows port yet." PowerShell/Win32-OpenSSH#666

From the following comment: docker/machine#4053 (comment) you can see that Docker Machine offers a --native-ssh option instead.

I will test this in more detail tomorrow and include the findings related to the current master of openssh-win32

@gbraad
Copy link
Contributor Author

gbraad commented Jun 9, 2017

Should be resolved with the release of new version of win32-openssh. Will test and close...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. os/windows
Projects
None yet
Development

No branches or pull requests

3 participants