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

delete: remove VBox.log: The process cannot access the file because it is being used by another process. #4286

Closed
anton-haldin opened this issue May 18, 2019 · 4 comments · Fixed by #5106
Labels
co/virtualbox kind/bug Categorizes issue or PR as related to a bug. os/windows priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. r/2019q2 Issue was last reviewed 2019q2

Comments

@anton-haldin
Copy link

Hi
It is great to use minukube. Thank you.
But looks like sometimes minikube is not able to delete cluster on Windows 10 with VirtualBox. I think potential cause can be slow work of VirtualBox: file with logs are still in use when minikube is trying to clean up resource in file system.
Please find detail below. All steps to reproduce in attached txt file.

The exact command to reproduce the issue:
minikube delete

The full output of the command that failed:
C:\Windows\system32>minikube delete
x Deleting "minikube" from virtualbox ...

! Failed to delete cluster: remove C:\Users\Anton.minikube\machines\minikube\minikube\Logs\VBox.log: The process cannot access the file because it is being used by another process.

  • Sorry that minikube crashed. If this was unexpected, we would love to hear from you:

The output of the minikube logs command:
C:\Windows\system32>minikube logs

! api load: filestore: open C:\Users\Anton.minikube\machines\minikube\config.json: The system cannot find the file specified.

  • Sorry that minikube crashed. If this was unexpected, we would love to hear from you:

The operating system version:
Microsoft Windows [Version 10.0.17763.475]

This issue looks like #4137 but I don't know shweta9651's previous commands.

Oracle VirtualBox Version 5.2.8 r121009 (Qt5.6.2)
minikube_crash_clean.txt

@anton-haldin
Copy link
Author

Removing or moving directory ~/.minikube/machines/minikube helps to return back to initial state of minikube, state after installation.

@tstromberg tstromberg changed the title Failed to delete cluster && Sorry that minikube crashed. Windows 10 with VirtualBox vbox delete: The process cannot access the file because it is being used by another process. May 22, 2019
@tstromberg tstromberg added co/virtualbox os/windows kind/bug Categorizes issue or PR as related to a bug. labels May 22, 2019
@tstromberg
Copy link
Contributor

Interesting. I suspect than on Windows, you may need to run minikube stop before minikube delete. Do you mind testing this theory?

If that fixes it, we should just make that step automatic.

@tstromberg tstromberg added triage/needs-information Indicates an issue needs more information in order to work on it. priority/backlog Higher priority than priority/awaiting-more-evidence. r/2019q2 Issue was last reviewed 2019q2 labels May 22, 2019
@tstromberg tstromberg changed the title vbox delete: The process cannot access the file because it is being used by another process. delete: remove VBox.log: The process cannot access the file because it is being used by another process. Jul 17, 2019
@tstromberg tstromberg added priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. and removed priority/backlog Higher priority than priority/awaiting-more-evidence. triage/needs-information Indicates an issue needs more information in order to work on it. labels Jul 17, 2019
@halmai
Copy link
Contributor

halmai commented Mar 28, 2020

I have the same problem and tried this:

> minikube stop
*
X Unable to stop VM: open C:\Users\Csongor Halmai\.minikube\machines\minikube\config.json: The system cannot find the file specified.
*
* minikube is exiting due to an error. If the above message is not useful, open an issue:
  - https://github.com/kubernetes/minikube/issues/new/choose

and then

> minikube delete
* Removing C:\Users\Csongor Halmai\.minikube\machines\minikube ...
*
X Unable to remove machine directory: remove C:\Users\Csongor Halmai\.minikube\machines\minikube\minikube\Snapshots\0113C205-19E6-4E44-9903-D0AA9C750A39.vmcx: The process cannot access the file because it is being used by another process.
*
* minikube is exiting due to an error. If the above message is not useful, open an issue:
  - https://github.com/kubernetes/minikube/issues/new/choose

This seems to be show-stopper for me. :(

> minikube version
minikube version: v1.9.0
commit: 48fefd43444d2f8852f527c78f0141b377b1e42a

@tstromberg
Copy link
Contributor

@halmai - I've moved your issue to #7300 - as it affects a different hypervisor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/virtualbox kind/bug Categorizes issue or PR as related to a bug. os/windows priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. r/2019q2 Issue was last reviewed 2019q2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants