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

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

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

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

coverprice opened this issue Sep 8, 2017 · 8 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. os/windows

Comments

@coverprice
Copy link

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.

@r2d4 r2d4 added the os/windows label Sep 8, 2017
@ianjoneill
Copy link

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
Copy link

secat commented Sep 8, 2017

I encountered exactly the same problem on Windows 10 using VirtualBox

@r2d4 r2d4 added the kind/bug Categorizes issue or PR as related to a bug. label Sep 8, 2017
@herozeng
Copy link

herozeng commented Sep 9, 2017

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

@alistairfay
Copy link

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
Copy link
Contributor

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 as completed Sep 11, 2017
@jbontech
Copy link

jbontech 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
Copy link

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

@damienstanton
Copy link

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
Labels
kind/bug Categorizes issue or PR as related to a bug. os/windows
Projects
None yet
Development

No branches or pull requests

9 participants