-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
hyperv: Unable to remove machine directory: ....vmcx: The process cannot access the file because it is being used by another process. #7300
Comments
Hey @halmai - I'm very curious about what happened here, because it's not supposed to be possible, but clearly it is. From your stop output:
minikube was asked to stop a cluster that does not have any local state associated to it, so it failed. Is it possible that you accidentally deleted or moved Alternatively, is it possible that you called As far as your delete output: This is stating that Hyper-V does in fact have a virtual machine running from this directory, even if the minikube state is gone. This is recoverable by launching the Hyper-V console and shutting the minikube VM down. Then Let me know how it works out. If the instructions work, I'll make sure the error message points users to the appropriate solution. We can do a lot better here. |
@tstromberg thanks for the quick response. It is possible that the files it was unable to delete were coming from an earlier version of minikube. However, even after stopping Hyper-V Host Compute Service from the Task Manager, I was unable to delete the files, which is strange. Both |
Thanks for the info. I wonder if deleting the VM from Hyper-V would have yielded a different outcome. Can you confirm that |
we need to update this suggestion
|
I believe this is no longer an issue in more recent releases. |
I can confirm this is happening to me on v1.11.0, which is the latest release. Running Windows 10 18363.836. The only way I am able to run minikube again is by disabling hyper-v, deleting the old files, reenabling hyper-v and recreating the VM. |
I was also facing the same issue , but after Shutting down all the process related to Hyper V from task manager my problem got resolved |
happening for me in windows 10 and i am struck, |
Not Working, I am facing same issue |
Stopping the service in hyper-v manager solved the problem for me. |
My solution Windows 10 pro 1909 (os build: 18363.1256)
minikube version: v1.15.1
commit: 9f1e482427589ff8451c4723b6ba53bb9742fbb1 In my case, I installed minikube by Chocolatey. But it worked as below. So I found a process that uses the minikube directory, and I killed the process. taskkill /F /PID <PID_NUMBER> PURGE MINIKUBE. minikube delete --purge
# Successfully purged minikube directory located at - [C:\Users\csu04\.minikube] I installed minikube by Windows installer, not the Chocolatey. minikube start ❯ kubectl get po -A
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-74ff55c5b-cnn46 1/1 Running 0 22m
kube-system etcd-minikube 1/1 Running 0 22m
kube-system kube-apiserver-minikube 1/1 Running 0 22m
kube-system kube-controller-manager-minikube 1/1 Running 0 22m
kube-system kube-proxy-xk2nk 1/1 Running 0 22m
kube-system kube-scheduler-minikube 1/1 Running 0 22m
kube-system storage-provisioner 1/1 Running 1 22m |
The error still persists: Windows 10 Home; Tried Please note that both the Minikube and Oracle VMBox are installed on different drive if that makes any difference but as far I know that shouldn't be the issue.
|
stopping hyper-v service worked for me |
nice |
Stopping Hyper-V Virtual Machine Management service allowed me to remove these files |
I have the same problem and tried this:
and then
This seems to be show-stopper for me. :(
Originally posted by @halmai in #4286 (comment)
The text was updated successfully, but these errors were encountered: