Windows "minikube start" fails with chmod permissions error. #1928

Closed
coverprice opened this Issue Sep 8, 2017 · 8 comments

Comments

Projects
None yet
9 participants
@coverprice

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.

@ianjoneill

This comment has been minimized.

Show comment
Hide comment
@ianjoneill

ianjoneill Sep 8, 2017

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'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.

@secat

This comment has been minimized.

Show comment
Hide comment
@secat

secat Sep 8, 2017

I encountered exactly the same problem on Windows 10 using VirtualBox

secat commented Sep 8, 2017

I encountered exactly the same problem on Windows 10 using VirtualBox

@herozeng

This comment has been minimized.

Show comment
Hide comment
@herozeng

herozeng Sep 9, 2017

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

herozeng commented Sep 9, 2017

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

@alistairfay

This comment has been minimized.

Show comment
Hide comment
@alistairfay

alistairfay Sep 10, 2017

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?

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?

@r2d4

This comment has been minimized.

Show comment
Hide comment
@r2d4

r2d4 Sep 11, 2017

Member

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

Sorry about that

Member

r2d4 commented Sep 11, 2017

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

Sorry about that

@r2d4 r2d4 closed this Sep 11, 2017

@oliyavan

This comment has been minimized.

Show comment
Hide comment
@oliyavan

oliyavan Sep 27, 2017

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 @

oliyavan commented Sep 27, 2017

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 @

@abejenaru

This comment has been minimized.

Show comment
Hide comment
@abejenaru

abejenaru Sep 27, 2017

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

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

@damienstanton

This comment has been minimized.

Show comment
Hide comment
@damienstanton

damienstanton Oct 2, 2017

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.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment