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

vbox: Cannot delete or start minikube if VM is deleted outside of minikube #5509

Closed
woodcockjosh opened this issue Oct 1, 2019 · 8 comments · Fixed by #5730
Closed

vbox: Cannot delete or start minikube if VM is deleted outside of minikube #5509

woodcockjosh opened this issue Oct 1, 2019 · 8 comments · Fixed by #5730
Assignees
Labels
co/virtualbox help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@woodcockjosh
Copy link
Contributor

woodcockjosh commented Oct 1, 2019

The exact command to reproduce the issue:

minikube start
😄  minikube v1.4.0 on Darwin 10.14.6
🔥  Creating virtualbox VM (CPUs=2, Memory=6500MB, Disk=20000MB) ...
^C

Cancelled the start with Ctrl+c

minikube start

Failed:

😄  minikube v1.4.0 on Darwin 10.14.6
💡  Tip: Use 'minikube start -p <name>' to create a new cluster, or 'minikube delete' to delete this one.
🔄  Retriable failure: Error getting state for host: machine does not exist

Try to delete

minikube delete

Failed

💣  Unable to get the status of the cluster.

To fix the problem

rm -r ~/.minikube/machines/minikube

You can reproduce the issue if you run minikube start and then delete the vm in the hypervisor GUI.

The output of the minikube logs command:

💣 command runner: getting ssh client for bootstrapper: Error dialing tcp via ssh client: dial tcp 127.0.0.1:22: connect: connection refused

😿 Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
👉 https://github.com/kubernetes/minikube/issues/new/choose

The operating system version:
Mac OS 10.14.6

@tstromberg tstromberg changed the title Cannot delete or start minikube vbox: Cannot delete or start minikube if VM is deleted outside of minikube Oct 2, 2019
@tstromberg tstromberg added co/virtualbox help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. labels Oct 2, 2019
@tstromberg
Copy link
Contributor

Ugh. minikube delete is supposed to deal with missing VM's, but clearly it's not working as intended.

@nanikjava
Copy link
Contributor

Stepping through the code when doing this noticed that the executed command

/usr/bin/VBoxManage showvminfo minikube --machinereadable

returned with the following error

VBoxManage: error: Could not find a registered machine named 'minikube'
VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "FindMachine(Bstr(VMNameOrUuid).raw(), machine.asOutParam())" at line 2621 of file VBoxManageInfo.cpp

and it is returned as part of the err object however the DeleteHost(..) is printing out as a generic error as 'Unable to get the status of the cluster.'

Is the requirement to report the error as what is returned to DeleteHost(..) or thinking of something else.

Happy to take this on if required.

@govargo
Copy link
Contributor

govargo commented Oct 10, 2019

Can I work on this?
I'll take.

@govargo
Copy link
Contributor

govargo commented Oct 10, 2019

I'm checking the code about this error.
I found following code section.

s, err := h.Driver.GetState()

status, err := GetHostStatus(api)

Now there is not "machine does not exist" error handling in startHost func and DeleteHost func.
So, I would add error handling when "machine does not exist" error occurs.

@govargo
Copy link
Contributor

govargo commented Oct 10, 2019

/assign

@govargo
Copy link
Contributor

govargo commented Oct 19, 2019

I'm now fixing this.

And I noticed the minikube delete failure is solved by #5654!
So, I'll fix error about minikube start failure.

@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 Jan 17, 2020
@govargo
Copy link
Contributor

govargo commented Jan 17, 2020

/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 Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/virtualbox help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants