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

minikube VM on Hyper-V is in "Shutting Down" state since 30+ minutes #4661

Closed
blueelvis opened this issue Jul 2, 2019 · 5 comments · Fixed by #4758
Closed

minikube VM on Hyper-V is in "Shutting Down" state since 30+ minutes #4661

blueelvis opened this issue Jul 2, 2019 · 5 comments · Fixed by #4758
Assignees
Labels
co/hyperv HyperV related issues triage/duplicate Indicates an issue is a duplicate of other open issue.

Comments

@blueelvis
Copy link
Contributor

blueelvis commented Jul 2, 2019

The exact command to reproduce the issue:
Ensure that there is no cluster already on the machine.
.\minikube-windows-amd64.exe start --vm-driver=hyperv --hyperv-virtual-switch="Default Switch" --v=8
.\minikube-windows-amd64.exe stop

The full output of the command that failed:

Output
PS C:\utilities> .\minikube-windows-amd64.exe stop
* Stopping "minikube" in hyperv ...
* Stopping "minikube" in hyperv ...
* Stopping "minikube" in hyperv ...
* Stopping "minikube" in hyperv ...
* Stopping "minikube" in hyperv ...

X Unable to stop VM: Temporary Error: Stop: minikube: exit status 1
Temporary Error: Stop: minikube: exit status 1
Temporary Error: Stop: minikube: exit status 1
Temporary Error: Stop: minikube: exit status 1
Temporary Error: Stop: minikube: exit status 1

The output of the minikube logs command:

minikube logs
PS C:\utilities> .\minikube-windows-amd64.exe logs

X command runner: getting ssh client for bootstrapper: Error creating new ssh host from driver: Error getting ssh host name for driver: Host is not running

The operating system version:
Windows 10 Enterprise.

The VM in Hyper-V has been in Shutting down state since 35 minutes -
image

This seems as if something has blocked the shutting down process inside the minikube virtual machine. I haven't seen this happening with any other Linux machines.

I have the following questions as well -

  • Do we know what is the username/password to login to the minikube virtual machine so that I can check the logs?
  • How many times does Minikube retry and for many seconds does it wait?
  • Do we have a logic to force turn off the VM if the VM is still in Shutting down phase?

Related to #2914

-Pranav

@blueelvis
Copy link
Contributor Author

blueelvis commented Jul 2, 2019

/cc: @gbraad
Also, I just noticed that the VM created by minikube is Gen 1. Is there any reason why we are creating a Gen 1 VM? I have the Docker installed on my machine as well (as you can see from the above screenshot) and that is a Gen 2 Virtual Machine.

Seems like minikube VM is a boot2docker VM which is now in maintenance mode. Are there any plans to migrate to a newer one?

EDIT -- I tried stop command again but this time with verbose logging and seems like minikube is deleting the config even before the VM is shut down. If the VM is not shut down, we should not delete config? (Right?). Following are the logs -

PS C:\utilities> .\minikube-windows-amd64.exe stop --v=8 --alsologtostderr
W0702 14:23:21.116860    2832 root.go:151] Error reading config file at C:\Users\Pranav.Jituri\.minikube\config\config.json: open C:\Users\Pranav.Jituri\.minikube\config\config.json: The system cannot find the file specified.
I0702 14:23:21.121361    2832 notify.go:128] Checking for updates...
* Stopping "minikube" in hyperv ...
Stopping "minikube"...
[executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM minikube ).state
[stdout =====>] : Running

[stderr =====>] :
[executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive Hyper-V\Stop-VM minikube

@michaelbaranov
Copy link

I use solution from here for shutting down minikube #2914 (comment)

@blueelvis
Copy link
Contributor Author

I was just typing this. I did the following and it worked as well but we need to have some fall back where if the Hypervisor call doesn't return back in few minutes, we should shut down from within the VM itself.

minikube ssh
sudo shutdown

That shut down the machine after a minute.

@blueelvis
Copy link
Contributor Author

/assign

@tstromberg
Copy link
Contributor

This issue appears to be a duplicate of #2914, so I will close this one so that we may centralize the content relating to the issue. If you feel that this issue is not in fact a duplicate, please feel free to re-open it.

Thank you for reporting this!

@tstromberg tstromberg added the triage/duplicate Indicates an issue is a duplicate of other open issue. label Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/hyperv HyperV related issues triage/duplicate Indicates an issue is a duplicate of other open issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants