Minikube: Windows "minikube start" fails with chmod permissions error.

Created on 8 Sep 2017  路  8Comments  路  Source: kubernetes/minikube

Environment: Windows 7, clean install.

Minikube version: v0.22.0

  • OS (e.g. from /etc/os-release): Windows 7 64-bit
  • VM Driver: virtualbox
  • ISO version: minikube-v0.23.3.iso

What happened:

From a clean install, after provisioning VM, multiple file errors occurred when attempting to chmod certificate files, and installation fails.

The relevant error from the log below is:
error changing file permissions for C:\Users\James\.minikube\ca.pem: chmod C:\Users\James\.minikube\ca.pem: not supported by windows

What you expected to happen:
The ca.pem files are installed without error and the installation continues successfully. This process works fine on v0.21.00.

How to reproduce it:

  • VirtualBox hypervisor, clean install of 0.22.0, no cached VM ISO, empty .minikube directory.
  • minikube start --v=3

Output of minikube logs (if applicable):

PS C:\Users\James> minikube start --v=3
Starting local Kubernetes v1.7.5 cluster...
Starting VM...
Downloading Minikube ISO
 106.36 MB / 106.36 MB [============================================] 100.00% 0s
Creating CA: C:\Users\James\.minikube\certs\ca.pem
Creating client certificate: C:\Users\James\.minikube\certs\cert.pem
Downloading C:\Users\James\.minikube\cache\boot2docker.iso from file://C:/Users/James/.minikube/cache/iso/minikube-v0.23.3.iso...
Creating VirtualBox VM...
Creating SSH key...
Starting the VM...
Check network to re-create if needed...
Waiting for an IP...
E0907 20:10:46.568543    7800 start.go:143] Error starting host: Error creating host: Error executing step: Provisioning VM.
: Temporary Error: transferring file: &{BaseAsset:{data:[] reader:0xc0420041c8 Length:0 AssetName:C:\Users\James\.minikube\certs\ca.pem TargetDir:C:\Users\James\.minikube TargetName:ca.pem Permissions:0777}}: error changing file permissions for C:\Users\James\.minikube\ca.pem: chmod C:\Users\James\.minikube\ca.pem: not supported by windows
Temporary Error: transferring file: &{BaseAsset:{data:[] reader:0xc0424960b0 Length:0 AssetName:C:\Users\James\.minikube\certs\ca.pem TargetDir:C:\Users\James\.minikube TargetName:ca.pem Permissions:0777}}: error removing file C:\Users\James\.minikube\ca.pem: remove C:\Users\James\.minikube\ca.pem: The process cannot access the file because it is being used by another process.
Temporary Error: transferring file: &{BaseAsset:{data:[] reader:0xc042496168 Length:0 
AssetName:C:\Users\James\.minikube\certs\ca.pem TargetDir:C:\Users\James\.minikube TargetName:ca.pem Permissions:0777}}: error removing file C:\Users\James\.minikube\ca.pem: remove C:\Users\James\.minikube\ca.pem: The process cannot access the file because it is being used
by another process.
Temporary Error: transferring file: &{BaseAsset:{data:[] reader:0xc0420040b8 Length:0 AssetName:C:\Users\James\.minikube\certs\ca.pem TargetDir:C:\Users\James\.minikube TargetName:ca.pem Permissions:0777}}: error changing file permissions for C:\Users\James\.minikube\ca.pem: chmod C:\Users\James\.minikube\ca.pem: not supported by windows
Temporary Error: transferring file: &{BaseAsset:{data:[] reader:0xc042054130 Length:0 AssetName:C:\Users\James\.minikube\certs\ca.pem TargetDir:C:\Users\James\.minikube TargetName:ca.pem Permissions:0777}}: error removing file C:\Users\James\.minikube\ca.pem: remove C:\Users\James\.minikube\ca.pem: The process cannot access the file because it is being used by another process..

Anything else do we need to know:
Possibly related to this line which does the Chmod, which is not supported under Windows.

kinbug owindows

Most helpful comment

I deleted the Minikube profile (.minikube folder) and then it worked properly again.

All 8 comments

I've also seen this on an upgrade from version 0.21.0 to 0.22.0. Thankfully the cluster still worked on downgrade back to 0.21.0.

I encountered exactly the same problem on Windows 10 using VirtualBox

I also have the issue in the new version v0.22.0 on wndows10

yip, same here. previous comment to use os.Chmod rather than File.Chmod. Is this something I can do when running minikube start or is it more a note for how to fix the bug?

This should be fixed in the latest point release
https://github.com/kubernetes/minikube/releases/tag/v0.22.1

Sorry about that

I am using Minikube v0.21.0.
Operating system: windows 10
still, I am getting the error permission to copy the CA to the VM.
Could you please provide any workaround for this.

Error:

`Starting local Kubernetes v1.7.5 cluster...
Starting VM...
I0927 08:56:03.410001    2792 downloader.go:56] Not caching ISO, using https://storage.googleapis.com/minikube/iso/minikube-v0.23.0.iso
E0927 08:57:51.060245    2792 start.go:129] Error starting host: Error creating host: Error executing step: Provisioning VM.
: Temporary Error: Copying ca.pem to machine dir failed: open C:\Users\User01\.minikube\ca.pem: Access is denied.
Temporary Error: Copying ca.pem to machine dir failed: open C:\Users\User01\.minikube\ca.pem: Access is denied.
Temporary Error: Copying ca.pem to machine dir failed: open C:\Users\User01\.minikube\ca.pem: Access is denied.
Temporary Error: Copying ca.pem to machine dir failed: open C:\Users\User01\.minikube\ca.pem: Access is denied.
Temporary Error: Copying ca.pem to machine dir failed: open C:\Users\User01\.minikube\ca.pem: Access is denied..

 Retrying.
E0927 08:57:51.068012    2792 start.go:135] Error starting host:  Error creating host: Error executing step: Provisioning VM.
: Temporary Error: Copying ca.pem to machine dir failed: open C:\Users\User01\.minikube\ca.pem: Access is denied.
Temporary Error: Copying ca.pem to machine dir failed: open C:\Users\User01\.minikube\ca.pem: Access is denied.
Temporary Error: Copying ca.pem to machine dir failed: open C:\Users\User01\.minikube\ca.pem: Access is denied.
Temporary Error: Copying ca.pem to machine dir failed: open C:\Users\User01\.minikube\ca.pem: Access is denied.
Temporary Error: Copying ca.pem to machine dir failed: open C:\Users\User01\.minikube\ca.pem: Access is denied.`

@herozeng @r2d4 @

I deleted the Minikube profile (.minikube folder) and then it worked properly again.

I experienced the same on macOS after a manual downgrade from 0.22.x to 0.20.0. Per @abejenaru, deleting the .minikube dir resolved the issue.

It may be worth looking at an adjustment to the error message that indicates that the .minikube dir needs to be recreated, rather than a generic permissions error.

Was this page helpful?
0 / 5 - 0 ratings