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

create kic node: create container: Windows does not support privileged mode. #7352

Closed
devika-28 opened this issue Apr 1, 2020 · 15 comments · Fixed by #7984
Closed

create kic node: create container: Windows does not support privileged mode. #7352

devika-28 opened this issue Apr 1, 2020 · 15 comments · Fixed by #7984
Labels
co/docker-driver Issues related to kubernetes in container kind/support Categorizes issue or PR as a support question. needs-solution-message Issues where where offering a solution for an error would be helpful os/windows

Comments

@devika-28
Copy link

devika-28 commented Apr 1, 2020

command; minikube start --driver=docker
Steps to reproduce the issue:

step 1. choco install minikube
step 2. minikube start

the "--alsologtostderr" flag output:

W0401 14:28:03.949879 356 root.go:248] Error reading config file at C:\Users\Devika Bihani\.minikube\config\config.json: open C:\Users\Devika Bihani\.minikube\config\config.json: The system cannot find the file specified. I0401 14:28:03.952879 356 notify.go:125] Checking for updates... I0401 14:28:04.668073 356 start.go:259] hostinfo: {"hostname":"FX553VD","uptime":167305,"bootTime":1585564179,"procs":259,"os":"windows","platform":"Microsoft Windows 10 Enterprise","platformFamily":"Standalone Workstation","platformVersion":"10.0.18362 Build 18362","kernelVersion":"","virtualizationSystem":"","virtualizationRole":"","hostid":"4c0f7125-046e-4a58-8742-5227ba78ff5c"} W0401 14:28:04.669072 356 start.go:267] gopshost.Virtualization returned error: not implemented yet * minikube v1.9.0 on Microsoft Windows 10 Enterprise 10.0.18362 Build 18362 I0401 14:28:04.726059 356 driver.go:226] Setting default libvirt URI to qemu:///system * Using the docker driver based on existing profile I0401 14:28:05.069450 356 start.go:307] selected driver: docker I0401 14:28:05.069450 356 start.go:596] validating driver "docker" against &{Name:minikube KeepContext:false EmbedCerts:false MinikubeISO: Memory:2200 CPUs:2 DiskSize:20000 Driver:docker HyperkitVpnKitSock: HyperkitVSockPorts:[] DockerEnv:[] InsecureRegistry:[] RegistryMirror:[] HostOnlyCIDR:192.168.99.1/24 HypervVirtualSwitch: HypervUseExternalSwitch:false HypervExternalAdapter: KVMNetwork:default KVMQemuURI:qemu:///system KVMGPU:false KVMHidden:false DockerOpt:[] DisableDriverMounts:false NFSShare:[] NFSSharesRoot:/nfsshares UUID: NoVTXCheck:false DNSProxy:false HostDNSResolver:true HostOnlyNicType:virtio NatNicType:virtio KubernetesConfig:{KubernetesVersion:v1.18.0 ClusterName:minikube APIServerName:minikubeCA APIServerNames:[] APIServerIPs:[] DNSDomain:cluster.local ContainerRuntime:docker CRISocket: NetworkPlugin: FeatureGates: ServiceCIDR:10.96.0.0/12 ImageRepository: ExtraOptions:[{Component:kubeadm Key:pod-network-cidr Value:10.244.0.0/16}] ShouldLoadCachedImages:true EnableDefaultCNI:false NodeIP: NodePort:0 NodeName:} Nodes:[{Name:m01 IP: Port:8443 KubernetesVersion:v1.18.0 ControlPlane:true Worker:true}] Addons:map[]} I0401 14:28:05.069450 356 start.go:602] status for docker: {Installed:true Healthy:true Error: Fix: Doc:} I0401 14:28:05.070449 356 start.go:1041] auto setting extra-config to "kubeadm.pod-network-cidr=10.244.0.0/16". I0401 14:28:05.352020 356 start.go:946] Using suggested 2200MB memory alloc based on sys=8076MB, container=8076MB * Pulling base image ... I0401 14:28:05.377029 356 cache.go:104] Beginning downloading kic artifacts I0401 14:28:05.379029 356 cache.go:106] Downloading gcr.io/k8s-minikube/kicbase:v0.0.8@sha256:2f3380ebf1bb0c75b0b47160fd4e61b7b8fef0f1f32f9def108d3eada50a7a81 to local daemon I0401 14:28:05.379029 356 preload.go:81] Checking if preload exists for k8s version v1.18.0 and runtime docker I0401 14:28:05.389031 356 image.go:84] Writing gcr.io/k8s-minikube/kicbase:v0.0.8@sha256:2f3380ebf1bb0c75b0b47160fd4e61b7b8fef0f1f32f9def108d3eada50a7a81 to local daemon I0401 14:28:05.392030 356 preload.go:97] Found local preload: C:\Users\Devika Bihani\.minikube\cache\preloaded-tarball\preloaded-images-k8s-v2-v1.18.0-docker-overlay2-amd64.tar.lz4 I0401 14:28:05.414609 356 cache.go:46] Caching tarball of preloaded images I0401 14:28:05.417581 356 preload.go:123] Found C:\Users\Devika Bihani\.minikube\cache\preloaded-tarball\preloaded-images-k8s-v2-v1.18.0-docker-overlay2-amd64.tar.lz4 in cache, skipping download I0401 14:28:05.430668 356 cache.go:49] Finished downloading the preloaded tar for v1.18.0 on docker I0401 14:28:05.432635 356 profile.go:138] Saving config to C:\Users\Devika Bihani\.minikube\profiles\minikube\config.json ...

Full output of failed command:

* minikube v1.9.0 on Microsoft Windows 10 Enterprise 10.0.18362 Build 18362 * Using the docker driver based on existing profile * Pulling base image ... * docker "minikube" container is missing, will recreate. * Creating Kubernetes in docker container with (CPUs=2) (8 available), Memory=2200MB (8076MB available) ... ! StartHost failed, but will try again: recreate: creating host: create: creating: create kic node: create container: failed args: [run -d -t --privileged --security-opt seccomp=unconfined --tmpfs /tmp --tmpfs /run -v /lib/modules:/lib/modules:ro --hostname minikube --name minikube --label created_by.minikube.sigs.k8s.io=true --label name.minikube.sigs.k8s.io=minikube --label role.minikube.sigs.k8s.io= --label mode.minikube.sigs.k8s.io=minikube --volume minikube:/var --cpus=2 --memory=2200mb --expose 8443 --publish=127.0.0.1::8443 --publish=127.0.0.1::22 --publish=127.0.0.1::2376 gcr.io/k8s-minikube/kicbase:v0.0.8@sha256:2f3380ebf1bb0c75b0b47160fd4e61b7b8fef0f1f32f9def108d3eada50a7a81] output: docker: Error response from daemon: Windows does not support privileged mode. See 'docker run --help'. : exit status 125 * docker "minikube" container is missing, will recreate. * Creating Kubernetes in docker container with (CPUs=2) (8 available), Memory=2200MB (8076MB available) ... * StartHost failed again: recreate: creating host: create: creating: create kic node: create container: failed args: [run -d -t --privileged --security-opt seccomp=unconfined --tmpfs /tmp --tmpfs /run -v /lib/modules:/lib/modules:ro --hostname minikube --name minikube --label created_by.minikube.sigs.k8s.io=true --label name.minikube.sigs.k8s.io=minikube --label role.minikube.sigs.k8s.io= --label mode.minikube.sigs.k8s.io=minikube --volume minikube:/var --cpus=2 --memory=2200mb --expose 8443 --publish=127.0.0.1::8443 --publish=127.0.0.1::22 --publish=127.0.0.1::2376 gcr.io/k8s-minikube/kicbase:v0.0.8@sha256:2f3380ebf1bb0c75b0b47160fd4e61b7b8fef0f1f32f9def108d3eada50a7a81] output: docker: Error response from daemon: Windows does not support privileged mode. See 'docker run --help'. : exit status 125 - Run: "minikube delete", then "minikube start --alsologtostderr -v=1" to try again with more logging * X Unable to start VM after repeated tries. Please try {{'minikube delete' if possible: recreate: creating host: create: creating: create kic node: create container: failed args: [run -d -t --privileged --security-opt seccomp=unconfined --tmpfs /tmp --tmpfs /run -v /lib/modules:/lib/modules:ro --hostname minikube --name minikube --label created_by.minikube.sigs.k8s.io=true --label name.minikube.sigs.k8s.io=minikube --label role.minikube.sigs.k8s.io= --label mode.minikube.sigs.k8s.io=minikube --volume minikube:/var --cpus=2 --memory=2200mb --expose 8443 --publish=127.0.0.1::8443 --publish=127.0.0.1::22 --publish=127.0.0.1::2376 gcr.io/k8s-minikube/kicbase:v0.0.8@sha256:2f3380ebf1bb0c75b0b47160fd4e61b7b8fef0f1f32f9def108d3eada50a7a81] output: docker: Error response from daemon: Windows does not support privileged mode. See 'docker run --help'. : exit status 125 * * minikube is exiting due to an error.

Optional: Full output of minikube logs command:

X Unable to get machine status: state: docker inspect -f {{.State.Status}} minikube: Template parsing error: template: :1:8: executing "" at <.State.Status>: map has no entry for key "State": exit status 1 * * 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

Checked the virtualization support on windows using command "systeminfo"
the result was:
"Hyper-V Requirements: A hypervisor has been detected. Features required for Hyper-V will not be displayed."

@tstromberg tstromberg changed the title minikube cluster error create kic node: create container: Windows does not support privileged mode. Apr 1, 2020
@tstromberg tstromberg added co/docker-driver Issues related to kubernetes in container os/windows kind/support Categorizes issue or PR as a support question. labels Apr 1, 2020
@tstromberg
Copy link
Contributor

I tried looking for answers around this -- but came up short.

Can you check that your Docker for Desktop install is up-to-date? Also, can you check that Windows Containers are disabled in Docker? I heard there were some conflicts when it is enabled.

@afbjorklund
Copy link
Collaborator

Does Docker-for-Windows support running privileged containers now ? It used not to....

docker: Error response from daemon: Windows does not support privileged mode. See 'docker run --help'.

https://github.com/moby/moby/blob/v19.03.8/runconfig/hostconfig_windows.go#L80_L82

Should be easy to verify, with something like docker run --privileged busybox

@devika-28
Copy link
Author

@afbjorklund
yes, Windows doesn't support the privileged mode,
Can you please suggest some workaround.

@devika-28
Copy link
Author

@tstromberg the docker is up-to-date.
and the windows containers are enabled.

@tstromberg
Copy link
Contributor

@devika-28 - disable Windows Containers.

@devika-28
Copy link
Author

@tstromberg after disabling the container, The docker has stopped working
the error:

* minikube v1.9.0 on Microsoft Windows 10 Enterprise 10.0.18362 Build 18362 * Using the docker driver based on existing profile

! 'docker' driver reported an issue: exit status 1

  • Suggestion: Docker is not running or is responding too slow. Try: restarting docker desktop.

  • Pulling base image ...
    E0410 17:13:06.233424 14300 cache.go:114] Error downloading kic artifacts: error loading image: error during connect: This error may indicate that the docker daemon is not running.: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/images/load?quiet=0: open //./pipe/docker_engine: The system cannot find the file specified.

  • docker "minikube" container is missing, will recreate.

  • Creating Kubernetes in docker container with (CPUs=2) (0 available), Memory=2200MB (0MB available) ...
    ! StartHost failed, but will try again: recreate: creating host: create: creating: create kic node: creating volume for minikube container: output error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/volumes/create: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
    : exit status 1

  • docker "minikube" container is missing, will recreate.

  • Creating Kubernetes in docker container with (CPUs=2) (0 available), Memory=2200MB (0MB available) ...

  • StartHost failed again: recreate: creating host: create: creating: create kic node: creating volume for minikube container: output error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/volumes/create: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
    : exit status 1

    • Run: "minikube delete", then "minikube start --alsologtostderr -v=1" to try again with more logging

X Unable to start VM after repeated tries. Please try {{'minikube delete' if possible: recreate: creating host: create: creating: create kic node: creating volume for minikube container: output error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/volumes/create: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
: exit status 1
*

the docker desktop has stopped working:

Required Windows feature(s) not enabled : Containers. Docker Desktop will exit.

@medyagh
Copy link
Member

medyagh commented Apr 15, 2020

@devika-28 do you mind restarting your docker after disabling windows containers and try again ?

@medyagh
Copy link
Member

medyagh commented Apr 15, 2020

@devika-28 if you can confirm disabling windows containers and restarting fixes this. we can add this to the solution message and help user fix the problem without an ugly error message

@medyagh medyagh added the needs-solution-message Issues where where offering a solution for an error would be helpful label Apr 15, 2020
@mikalegall
Copy link

mikalegall commented Apr 24, 2020

@devika-28 if you can confirm disabling windows containers and restarting fixes this. we can add this to the solution message and help user fix the problem without an ugly error message

Windows does not support privileged mode (Azure: Microsoft Windows Server 2019 Datacenter)

Steps to reproduce the issue:
PowerShell:

  1. curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/windows/amd64/kubectl.exe

  2. Install-Module DockerMsftProvider -Force

  3. Install-Package Docker -ProviderName DockerMsftProvider -Force

  4. Restart-Computer

  5. Install-WindowsFeature -Name Hyper-V -IncludeManagementTools

  6. Start-Service docker

  7. docker run hello-world:nanoserver

  8. docker image pull mcr.microsoft.com/windows/servercore:ltsc2019

  9. docker image pull mcr.microsoft.com/windows/nanoserver:1809

  10. Docker run -it mcr.microsoft.com/windows/servercore:ltsc2019 cmd.exe
    (works just fine)

  11. choco install minikube

  12. minikube start --driver docker

There was not config.json file like in #5529 so I excecuted

  1. minikube delete
  2. minikube start --driver docker --alsologtostderr

and got config.json file

{ "Name": "minikube", "KeepContext": false, "EmbedCerts": false, "MinikubeISO": "", "Memory": 2200, "CPUs": 2, "DiskSize": 20000, "Driver": "docker", "HyperkitVpnKitSock": "", "HyperkitVSockPorts": [], "DockerEnv": null, "InsecureRegistry": null, "RegistryMirror": null, "HostOnlyCIDR": "192.168.99.1/24", "HypervVirtualSwitch": "", "HypervUseExternalSwitch": false, "HypervExternalAdapter": "", "KVMNetwork": "default", "KVMQemuURI": "qemu:///system", "KVMGPU": false, "KVMHidden": false, "DockerOpt": null, "DisableDriverMounts": false, "NFSShare": [], "NFSSharesRoot": "/nfsshares", "UUID": "", "NoVTXCheck": false, "DNSProxy": false, "HostDNSResolver": true, "HostOnlyNicType": "virtio", "NatNicType": "virtio", "KubernetesConfig": { "KubernetesVersion": "v1.18.0", "ClusterName": "minikube", "APIServerName": "minikubeCA", "APIServerNames": null, "APIServerIPs": null, "DNSDomain": "cluster.local", "ContainerRuntime": "docker", "CRISocket": "", "NetworkPlugin": "", "FeatureGates": "", "ServiceCIDR": "10.96.0.0/12", "ImageRepository": "", "ExtraOptions": [ { "Component": "kubeadm", "Key": "pod-network-cidr", "Value": "10.244.0.0/16" } ], "ShouldLoadCachedImages": true, "EnableDefaultCNI": false, "NodeIP": "", "NodePort": 0, "NodeName": "" }, "Nodes": [ { "Name": "m01", "IP": "", "Port": 8443, "KubernetesVersion": "v1.18.0", "ControlPlane": true, "Worker": true } ], "Addons": null, "VerifyComponents": { "apiserver": true, "system_pods": true } }
but minikube did not started
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Users\mika> minikube delete

  • Removing C:\Users\mika.minikube\machines\minikube ...
  • Removed all traces of the "minikube" cluster.
    PS C:\Users\mika> minikube start --driver docker --alsologtostderr
    I0424 17:12:51.512618 2344 notify.go:125] Checking for updates...
    I0424 17:12:51.563715 2344 start.go:262] hostinfo: {"hostname":"ikkunapalvelin","uptime":4744,"bootTime":1587743627,"procs":122,"os":"windows","platform":"Microsoft Windows Server 2019 Datacenter","platformFamily":"Server","platformVersion":"10.0.17763 Build 17763","kernelVersion":"","virtualizationSystem":"","virtualizationRole":"","hostid":"c71e4a1c-dbfc-4ed8-b882-fa6395d5e5de"}
    W0424 17:12:51.565712 2344 start.go:270] gopshost.Virtualization returned error: not implemented yet
  • minikube v1.9.2 on Microsoft Windows Server 2019 Datacenter 10.0.17763 Build 17763
    I0424 17:12:51.583812 2344 driver.go:245] Setting default libvirt URI to qemu:///system
  • Using the docker driver based on user configuration
    I0424 17:12:52.470843 2344 start.go:310] selected driver: docker
    I0424 17:12:52.470843 2344 start.go:656] validating driver "docker" against
    I0424 17:12:52.470843 2344 start.go:662] status for docker: {Installed:true Healthy:true Error: Fix: Doc:}
    I0424 17:12:52.470843 2344 start.go:1100] auto setting extra-config to "kubeadm.pod-network-cidr=10.244.0.0/16".
    I0424 17:12:53.359266 2344 start.go:1004] Using suggested 2200MB memory alloc based on sys=8191MB, container=8191MB
    I0424 17:12:53.360270 2344 start.go:1210] Wait components to verify : map[apiserver:true system_pods:true]
  • Starting control plane node m01 in cluster minikube
  • Pulling base image ...
    I0424 17:12:53.370345 2344 cache.go:104] Beginning downloading kic artifacts
    I0424 17:12:53.370345 2344 preload.go:81] Checking if preload exists for k8s version v1.18.0 and runtime docker
    I0424 17:12:53.370345 2344 cache.go:106] Downloading gcr.io/k8s-minikube/kicbase:v0.0.8@sha256:2f3380ebf1bb0c75b0b47160fd4e61b7b8fef0f1f32f9def108d3eada50a7a81 to local daemon
    I0424 17:12:53.371347 2344 image.go:84] Writing gcr.io/k8s-minikube/kicbase:v0.0.8@sha256:2f3380ebf1bb0c75b0b47160fd4e61b7b8fef0f1f32f9def108d3eada50a7a81 to local daemon
    I0424 17:12:53.371347 2344 preload.go:97] Found local preload: C:\Users\mika.minikube\cache\preloaded-tarball\preloaded-images-k8s-v2-v1.18.0-docker-overlay2-amd64.tar.lz4
    I0424 17:12:53.372349 2344 cache.go:46] Caching tarball of preloaded images
    I0424 17:12:53.372349 2344 preload.go:123] Found C:\Users\mika.minikube\cache\preloaded-tarball\preloaded-images-k8s-v2-v1.18.0-docker-overlay2-amd64.tar.lz4 in cache, skipping download
    I0424 17:12:53.372349 2344 cache.go:49] Finished downloading the preloaded tar for v1.18.0 on docker
    I0424 17:12:53.373353 2344 profile.go:138] Saving config to C:\Users\mika.minikube\profiles\minikube\config.json ...
    I0424 17:12:53.374360 2344 lock.go:35] WriteFile acquiring C:\Users\mika.minikube\profiles\minikube\config.json: {Name:mk614a56d3b3b17b045a9f2549deebc6d992aabf Clock:{} Delay:500ms Timeout:1m0s Cancel:}
    I0424 17:13:04.268893 2344 cache.go:117] Successfully downloaded all kic artifacts
    I0424 17:13:04.269882 2344 start.go:260] acquiring machines lock for minikube: {Name:mkce28365d538b7bc336bc0f1bca244adbdc9237 Clock:{} Delay:500ms Timeout:15m0s Cancel:}
    I0424 17:13:04.269882 2344 start.go:264] acquired machines lock for "minikube" in 0s
    I0424 17:13:04.270881 2344 start.go:86] Provisioning new machine with config: {Name:minikube KeepContext:false EmbedCerts:false MinikubeISO: Memory:2200 CPUs:2 DiskSize:20000 Driver:docker HyperkitVpnKitSock: HyperkitVSockPorts:[] DockerEnv:[] InsecureRegistry:[] RegistryMirror:[] HostOnlyCIDR:192.168.99.1/24 HypervVirtualSwitch: HypervUseExternalSwitch:false HypervExternalAdapter: KVMNetwork:default KVMQemuURI:qemu:///system KVMGPU:false KVMHidden:false DockerOpt:[] DisableDriverMounts:false NFSShare:[] NFSSharesRoot:/nfsshares UUID: NoVTXCheck:false DNSProxy:false HostDNSResolver:true HostOnlyNicType:virtio NatNicType:virtio KubernetesConfig:{KubernetesVersion:v1.18.0 ClusterName:minikube APIServerName:minikubeCA APIServerNames:[] APIServerIPs:[] DNSDomain:cluster.local ContainerRuntime:docker CRISocket: NetworkPlugin: FeatureGates: ServiceCIDR:10.96.0.0/12 ImageRepository: ExtraOptions:[{Component:kubeadm Key:pod-network-cidr Value:10.244.0.0/16}] ShouldLoadCachedImages:true EnableDefaultCNI:false NodeIP: NodePort:0 NodeName:} Nodes:[{Name:m01 IP: Port:8443 KubernetesVersion:v1.18.0 ControlPlane:true Worker:true}] Addons:map[] VerifyComponents:map[apiserver:true system_pods:true]} {Name:m01 IP: Port:8443 KubernetesVersion:v1.18.0 ControlPlane:true Worker:true}
    I0424 17:13:04.271878 2344 start.go:107] createHost starting for "m01" (driver="docker")
  • Creating Kubernetes in docker container with (CPUs=2) (2 available), Memory=2200MB (8191MB available) ...
    I0424 17:13:06.358969 2344 start.go:143] libmachine.API.Create for "minikube" (driver="docker")
    I0424 17:13:06.358969 2344 client.go:169] LocalClient.Create starting
    I0424 17:13:06.360047 2344 main.go:110] libmachine: Reading certificate data from C:\Users\mika.minikube\certs\ca.pem
    I0424 17:13:06.360047 2344 main.go:110] libmachine: Decoding PEM data...
    I0424 17:13:06.361020 2344 main.go:110] libmachine: Parsing certificate...
    I0424 17:13:06.361020 2344 main.go:110] libmachine: Reading certificate data from C:\Users\mika.minikube\certs\cert.pem
    I0424 17:13:06.362041 2344 main.go:110] libmachine: Decoding PEM data...
    I0424 17:13:06.362041 2344 main.go:110] libmachine: Parsing certificate...
    I0424 17:13:06.365045 2344 oci.go:250] executing with [docker ps -a --format {{.Names}}] timeout: 30s
    I0424 17:13:06.513392 2344 volumes.go:97] executing: [docker volume create minikube --label name.minikube.sigs.k8s.io=minikube --label created_by.minikube.sigs.k8s.io=true]
    I0424 17:13:06.663245 2344 oci.go:128] Successfully created a docker volume minikube
    I0424 17:13:07.683832 2344 client.go:172] LocalClient.Create took 1.3237388s
    I0424 17:13:09.699212 2344 start.go:110] createHost completed in 5.4268092s
    I0424 17:13:09.699212 2344 start.go:77] releasing machines lock for "minikube", held for 5.4291354s
    ! StartHost failed, but will try again: creating host: create: creating: create kic node: create container: failed args: [run -d -t --privileged --security-opt seccomp=unconfined --tmpfs /tmp --tmpfs /run -v /lib/modules:/lib/modules:ro --hostname minikube --name minikube --label created_by.minikube.sigs.k8s.io=true --label name.minikube.sigs.k8s.io=minikube --label role.minikube.sigs.k8s.io= --label mode.minikube.sigs.k8s.io=minikube --volume minikube:/var --cpus=2 --memory=2200mb --expose 8443 --publish=127.0.0.1::8443 --publish=127.0.0.1::22 --publish=127.0.0.1::2376 gcr.io/k8s-minikube/kicbase:v0.0.8@sha256:2f3380ebf1bb0c75b0b47160fd4e61b7b8fef0f1f32f9def108d3eada50a7a81] output: docker: Error response from daemon: Windows does not support privileged mode.
    See 'docker run --help'.
    : exit status 125
    I0424 17:13:09.706159 2344 oci.go:250] executing with [docker inspect -f {{.State.Status}} minikube] timeout: 19s
    I0424 17:13:09.861915 2344 delete.go:72] Unable to get host status for minikube, assuming it has already been deleted: state: "docker inspect -f {{.State.Status}} minikube" failed: exit status 1: Template parsing error: template: :1:8: executing "" at <.State.Status>: map has no entry for key "State"
    I0424 17:13:14.869580 2344 start.go:260] acquiring machines lock for minikube: {Name:mkce28365d538b7bc336bc0f1bca244adbdc9237 Clock:{} Delay:500ms Timeout:15m0s Cancel:}
    I0424 17:13:14.870556 2344 start.go:264] acquired machines lock for "minikube" in 0s
    I0424 17:13:14.874561 2344 start.go:90] Skipping create...Using existing machine configuration
    I0424 17:13:14.875571 2344 fix.go:53] fixHost starting: m01
    I0424 17:13:14.878555 2344 oci.go:250] executing with [docker inspect -f {{.State.Status}} minikube] timeout: 19s
    I0424 17:13:15.040107 2344 fix.go:105] recreateIfNeeded on minikube: state=Error err="docker inspect -f {{.State.Status}} minikube" failed: exit status 1: Template parsing error: template: :1:8: executing "" at <.State.Status>: map has no entry for key "State"
    I0424 17:13:15.040107 2344 fix.go:109] exists: false err=machine does not exist
    I0424 17:13:15.043109 2344 fix.go:110] "machine does not exist" vs "machine does not exist"
  • docker "minikube" container is missing, will recreate.
    I0424 17:13:15.054113 2344 delete.go:114] DEMOLISHING minikube ...
    I0424 17:13:15.055115 2344 main.go:110] libmachine: Stopping "minikube"...
    I0424 17:13:15.056113 2344 oci.go:250] executing with [docker inspect -f {{.State.Status}} minikube] timeout: 19s
    I0424 17:13:15.214881 2344 main.go:110] libmachine: Error getting machine state: "docker inspect -f {{.State.Status}} minikube" failed: exit status 1: Template parsing error: template: :1:8: executing "" at <.State.Status>: map has no entry for key "State"

I0424 17:13:15.215891 2344 kubelet.go:43] stopping kubelet ...
I0424 17:13:15.223883 2344 kic_runner.go:91] Run: sudo systemctl stop kubelet.service
I0424 17:13:16.497779 2344 kic_runner.go:91] Run: sudo systemctl stop kubelet.service
I0424 17:13:18.818310 2344 kic_runner.go:91] Run: sudo systemctl stop kubelet.service
W0424 17:13:18.965737 2344 kic.go:322] couldn't stop kubelet. will continue with stop anyways: error stopping kubelet: temporary error for "sudo systemctl stop kubelet.service" : sudo systemctl stop kubelet.service: exit status 1
stdout:

stderr:
Error: No such container: minikube
I0424 17:13:18.965737 2344 kubelet.go:43] stopping kubelet ...
I0424 17:13:18.976935 2344 kic_runner.go:91] Run: sudo systemctl stop -f kubelet.service
I0424 17:13:20.306179 2344 kic_runner.go:91] Run: sudo systemctl stop -f kubelet.service
I0424 17:13:21.874293 2344 kic_runner.go:91] Run: sudo systemctl stop -f kubelet.service
W0424 17:13:22.023111 2344 kic.go:324] couldn't force stop kubelet. will continue with stop anyways: error stopping kubelet: temporary error for "sudo systemctl stop -f kubelet.service" : sudo systemctl stop -f kubelet.service: exit status 1
stdout:

stderr:
Error: No such container: minikube
I0424 17:13:22.029123 2344 kic_runner.go:91] Run: docker ps -a --filter=name=k8s_.(kube-system|kubernetes-dashboard|storage-gluster|istio-operator) --format={{.ID}}
I0424 17:13:22.182947 2344 kic.go:335] unable list containers : docker: docker ps -a --filter=name=k8s_.
(kube-system|kubernetes-dashboard|storage-gluster|istio-operator) --format={{.ID}}: exit status 1
stdout:

stderr:
Error: No such container: minikube
I0424 17:13:22.182947 2344 kic.go:342] successfully stopped kubernetes!
I0424 17:13:22.343948 2344 stop.go:56] stop err: stopping minikube: exit status 1
I0424 17:13:22.343948 2344 delete.go:119] stophost failed (probably ok): Temporary Error: stop: stopping minikube: exit status 1
I0424 17:13:22.347957 2344 oci.go:250] executing with [docker inspect -f {{.State.Status}} minikube] timeout: 19s
I0424 17:13:22.497650 2344 delete.go:72] Unable to get host status for minikube, assuming it has already been deleted: state: "docker inspect -f {{.State.Status}} minikube" failed: exit status 1: Template parsing error: template: :1:8: executing "" at <.State.Status>: map has no entry for key "State"
I0424 17:13:22.649721 2344 main.go:110] libmachine: could not find the container minikube to remove it.
W0424 17:13:22.802196 2344 delete.go:96] remove failed, will retry: removing container minikube, output Error: No such container: minikube: exit status 1
I0424 17:13:23.948971 2344 main.go:110] libmachine: could not find the container minikube to remove it.
W0424 17:13:24.108366 2344 delete.go:129] delete failed (probably ok) host remove retry: removing container minikube, output Error: No such container: minikube: exit status 1
I0424 17:13:24.108366 2344 fix.go:116] Sleeping 1 second for extra luck!
I0424 17:13:25.114641 2344 start.go:107] createHost starting for "m01" (driver="docker")

  • Creating Kubernetes in docker container with (CPUs=2) (2 available), Memory=2200MB (8191MB available) ...
    I0424 17:13:26.010117 2344 start.go:143] libmachine.API.Create for "minikube" (driver="docker")
    I0424 17:13:26.012249 2344 client.go:169] LocalClient.Create starting
    I0424 17:13:26.014439 2344 main.go:110] libmachine: Reading certificate data from C:\Users\mika.minikube\certs\ca.pem
    I0424 17:13:26.015423 2344 main.go:110] libmachine: Decoding PEM data...
    I0424 17:13:26.015423 2344 main.go:110] libmachine: Parsing certificate...
    I0424 17:13:26.016427 2344 main.go:110] libmachine: Reading certificate data from C:\Users\mika.minikube\certs\cert.pem
    I0424 17:13:26.017473 2344 main.go:110] libmachine: Decoding PEM data...
    I0424 17:13:26.018424 2344 main.go:110] libmachine: Parsing certificate...
    I0424 17:13:26.023442 2344 oci.go:250] executing with [docker ps -a --format {{.Names}}] timeout: 30s
    I0424 17:13:26.181485 2344 volumes.go:97] executing: [docker volume create minikube --label name.minikube.sigs.k8s.io=minikube --label created_by.minikube.sigs.k8s.io=true]
    I0424 17:13:26.331793 2344 oci.go:128] Successfully created a docker volume minikube
    I0424 17:13:27.350202 2344 client.go:172] LocalClient.Create took 1.3356305s
    I0424 17:13:29.357746 2344 start.go:110] createHost completed in 4.2424526s
    I0424 17:13:29.358021 2344 fix.go:55] fixHost completed within 14.4813708s
    I0424 17:13:29.362011 2344 start.go:77] releasing machines lock for "minikube", held for 14.4863708s
    W0424 17:13:29.362992 2344 exit.go:101] Failed to start docker container. "minikube start" may fix it.: recreate: creating host: create: creating: create kic node: create container: failed args: [run -d -t --privileged --security-opt seccomp=unconfined --tmpfs /tmp --tmpfs /run -v /lib/modules:/lib/modules:ro --hostname minikube --name minikube --label created_by.minikube.sigs.k8s.io=true --label name.minikube.sigs.k8s.io=minikube --label role.minikube.sigs.k8s.io= --label mode.minikube.sigs.k8s.io=minikube --volume minikube:/var --cpus=2 --memory=2200mb --expose 8443 --publish=127.0.0.1::8443 --publish=127.0.0.1::22 --publish=127.0.0.1::2376 gcr.io/k8s-minikube/kicbase:v0.0.8@sha256:2f3380ebf1bb0c75b0b47160fd4e61b7b8fef0f1f32f9def108d3eada50a7a81] output: docker: Error response from daemon: Windows does not support privileged mode.
    See 'docker run --help'.
    : exit status 125

X Failed to start docker container. "minikube start" may fix it.: recreate: creating host: create: creating: create kic node: create container: failed args: [run -d -t --privileged --security-opt seccomp=unconfined --tmpfs /tmp --tmpfs /run -v /lib/modules:/lib/modules:ro --hostname minikube --name minikube --label created_by.minikube.sigs.k8s.io=true --label name.minikube.sigs.k8s.io=minikube --label role.minikube.sigs.k8s.io= --label mode.minikube.sigs.k8s.io=minikube --volume minikube:/var --cpus=2 --memory=2200mb --expose 8443 --publish=127.0.0.1::8443 --publish=127.0.0.1::22 --publish=127.0.0.1::2376 gcr.io/k8s-minikube/kicbase:v0.0.8@sha256:2f3380ebf1bb0c75b0b47160fd4e61b7b8fef0f1f32f9def108d3eada50a7a81] output: docker: Error response from daemon: Windows does not support privileged mode.
See 'docker run --help'.
: exit status 125
*

@medyagh, I also disabled Windows Containers but it did not change the situation
  1. Uninstall-WindowsFeature Containers
  2. Restart-Computer
  3. Stop-Service docker
  4. Start-Service docker
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Users\mika> Stop-Service docker
PS C:\Users\mika> Start-Service docker
Start-Service : Failed to start service 'Docker Engine (docker)'.
At line:1 char:1

  • Start-Service docker
  •   + CategoryInfo          : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service], ServiceCommandException
      + FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand
    
    

PS C:\Users\mika>

  1. Install-WindowsFeature Containers
  2. Restart-Computer
  3. Start-Service docker
  4. minikube start --driver docker --alsologtostderr
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Users\mika> Start-Service docker
PS C:\Users\mika> minikube start --driver docker --alsologtostderr
I0424 17:51:23.539722 7040 notify.go:125] Checking for updates...
I0424 17:51:23.621629 7040 start.go:262] hostinfo: {"hostname":"ikkunapalvelin","uptime":143,"bootTime":1587750540,"procs":128,"os":"windows","platform":"Microsoft Windows Server 2019 Datacenter","platformFamily":"Server","platformVersion":"10.0.17763 Build 17763","kernelVersion":"","virtualizationSystem":"","virtualizationRole":"","hostid":"c71e4a1c-dbfc-4ed8-b882-fa6395d5e5de"}
W0424 17:51:23.627630 7040 start.go:270] gopshost.Virtualization returned error: not implemented yet

  • minikube v1.9.2 on Microsoft Windows Server 2019 Datacenter 10.0.17763 Build 17763
    I0424 17:51:23.664229 7040 driver.go:245] Setting default libvirt URI to qemu:///system
  • Using the docker driver based on existing profile
    I0424 17:51:26.686230 7040 start.go:310] selected driver: docker
    I0424 17:51:26.687233 7040 start.go:656] validating driver "docker" against &{Name:minikube KeepContext:false EmbedCerts:false MinikubeISO: Memory:2200 CPUs:2 DiskSize:20000 Driver:docker HyperkitVpnKitSock: HyperkitVSockPorts:[] DockerEnv:[] InsecureRegistry:[] RegistryMirror:[] HostOnlyCIDR:192.168.99.1/24 HypervVirtualSwitch: HypervUseExternalSwitch:false HypervExternalAdapter: KVMNetwork:default KVMQemuURI:qemu:///system KVMGPU:false KVMHidden:false DockerOpt:[] DisableDriverMounts:false NFSShare:[] NFSSharesRoot:/nfsshares UUID: NoVTXCheck:false DNSProxy:false HostDNSResolver:true HostOnlyNicType:virtio NatNicType:virtio KubernetesConfig:{KubernetesVersion:v1.18.0 ClusterName:minikube APIServerName:minikubeCA APIServerNames:[] APIServerIPs:[] DNSDomain:cluster.local ContainerRuntime:docker CRISocket: NetworkPlugin: FeatureGates: ServiceCIDR:10.96.0.0/12 ImageRepository: ExtraOptions:[{Component:kubeadm Key:pod-network-cidr Value:10.244.0.0/16}] ShouldLoadCachedImages:true EnableDefaultCNI:false NodeIP: NodePort:0 NodeName:} Nodes:[{Name:m01 IP: Port:8443 KubernetesVersion:v1.18.0 ControlPlane:true Worker:true}] Addons:map[] VerifyComponents:map[apiserver:true system_pods:true]}
    I0424 17:51:26.688224 7040 start.go:662] status for docker: {Installed:true Healthy:false Error:exit status 1 Fix:Docker is not running or is responding too slow. Try: restarting docker desktop. Doc:}

! 'docker' driver reported an issue: exit status 1

  • Suggestion: Docker is not running or is responding too slow. Try: restarting docker desktop.

I0424 17:51:26.689215 7040 start.go:1100] auto setting extra-config to "kubeadm.pod-network-cidr=10.244.0.0/16".
I0424 17:51:27.711993 7040 start.go:1004] Using suggested 2200MB memory alloc based on sys=8191MB, container=8191MB
I0424 17:51:27.713012 7040 start.go:1210] Wait components to verify : map[apiserver:true system_pods:true]

  • Starting control plane node m01 in cluster minikube
  • Pulling base image ...
    I0424 17:51:27.724017 7040 cache.go:104] Beginning downloading kic artifacts
    I0424 17:51:27.725009 7040 cache.go:106] Downloading gcr.io/k8s-minikube/kicbase:v0.0.8@sha256:2f3380ebf1bb0c75b0b47160fd4e61b7b8fef0f1f32f9def108d3eada50a7a81 to local daemon
    I0424 17:51:27.725009 7040 preload.go:81] Checking if preload exists for k8s version v1.18.0 and runtime docker
    I0424 17:51:27.726020 7040 preload.go:97] Found local preload: C:\Users\mika.minikube\cache\preloaded-tarball\preloaded-images-k8s-v2-v1.18.0-docker-overlay2-amd64.tar.lz4
    I0424 17:51:27.726020 7040 image.go:84] Writing gcr.io/k8s-minikube/kicbase:v0.0.8@sha256:2f3380ebf1bb0c75b0b47160fd4e61b7b8fef0f1f32f9def108d3eada50a7a81 to local daemon
    I0424 17:51:27.726996 7040 cache.go:46] Caching tarball of preloaded images
    I0424 17:51:27.726996 7040 preload.go:123] Found C:\Users\mika.minikube\cache\preloaded-tarball\preloaded-images-k8s-v2-v1.18.0-docker-overlay2-amd64.tar.lz4 in cache, skipping download
    I0424 17:51:27.727997 7040 cache.go:49] Finished downloading the preloaded tar for v1.18.0 on docker
    I0424 17:51:27.727997 7040 profile.go:138] Saving config to C:\Users\mika.minikube\profiles\minikube\config.json ...
    I0424 17:51:37.328600 7040 cache.go:117] Successfully downloaded all kic artifacts
    I0424 17:51:37.353609 7040 start.go:260] acquiring machines lock for minikube: {Name:mkce28365d538b7bc336bc0f1bca244adbdc9237 Clock:{} Delay:500ms Timeout:15m0s Cancel:}
    I0424 17:51:37.354597 7040 start.go:264] acquired machines lock for "minikube" in 0s
    I0424 17:51:37.355650 7040 start.go:90] Skipping create...Using existing machine configuration
    I0424 17:51:37.355650 7040 fix.go:53] fixHost starting: m01
    I0424 17:51:37.356606 7040 oci.go:250] executing with [docker inspect -f {{.State.Status}} minikube] timeout: 19s
    I0424 17:51:37.522238 7040 fix.go:105] recreateIfNeeded on minikube: state=Error err="docker inspect -f {{.State.Status}} minikube" failed: exit status 1: Template parsing error: template: :1:8: executing "" at <.State.Status>: map has no entry for key "State"
    I0424 17:51:37.522238 7040 fix.go:109] exists: false err=machine does not exist
    I0424 17:51:37.523305 7040 fix.go:110] "machine does not exist" vs "machine does not exist"
  • docker "minikube" container is missing, will recreate.
    I0424 17:51:38.888838 7040 delete.go:114] DEMOLISHING minikube ...
    I0424 17:51:38.888838 7040 main.go:110] libmachine: Stopping "minikube"...
    I0424 17:51:38.888838 7040 oci.go:250] executing with [docker inspect -f {{.State.Status}} minikube] timeout: 19s
    I0424 17:51:39.057759 7040 main.go:110] libmachine: Error getting machine state: "docker inspect -f {{.State.Status}} minikube" failed: exit status 1: Template parsing error: template: :1:8: executing "" at <.State.Status>: map has no entry for key "State"

I0424 17:51:39.058874 7040 kubelet.go:43] stopping kubelet ...
I0424 17:51:39.066759 7040 kic_runner.go:91] Run: sudo systemctl stop kubelet.service
I0424 17:51:40.334814 7040 kic_runner.go:91] Run: sudo systemctl stop kubelet.service
I0424 17:51:42.666812 7040 kic_runner.go:91] Run: sudo systemctl stop kubelet.service
W0424 17:51:42.818034 7040 kic.go:322] couldn't stop kubelet. will continue with stop anyways: error stopping kubelet: temporary error for "sudo systemctl stop kubelet.service" : sudo systemctl stop kubelet.service: exit status 1
stdout:

stderr:
Error: No such container: minikube
I0424 17:51:42.819026 7040 kubelet.go:43] stopping kubelet ...
I0424 17:51:42.830037 7040 kic_runner.go:91] Run: sudo systemctl stop -f kubelet.service
I0424 17:51:44.167566 7040 kic_runner.go:91] Run: sudo systemctl stop -f kubelet.service
I0424 17:51:45.746802 7040 kic_runner.go:91] Run: sudo systemctl stop -f kubelet.service
W0424 17:51:45.897623 7040 kic.go:324] couldn't force stop kubelet. will continue with stop anyways: error stopping kubelet: temporary error for "sudo systemctl stop -f kubelet.service" : sudo systemctl stop -f kubelet.service: exit status 1
stdout:

stderr:
Error: No such container: minikube
I0424 17:51:45.904638 7040 kic_runner.go:91] Run: docker ps -a --filter=name=k8s_.(kube-system|kubernetes-dashboard|storage-gluster|istio-operator) --format={{.ID}}
I0424 17:51:46.060385 7040 kic.go:335] unable list containers : docker: docker ps -a --filter=name=k8s_.
(kube-system|kubernetes-dashboard|storage-gluster|istio-operator) --format={{.ID}}: exit status 1
stdout:

stderr:
Error: No such container: minikube
I0424 17:51:46.060385 7040 kic.go:342] successfully stopped kubernetes!
I0424 17:51:46.234334 7040 stop.go:56] stop err: stopping minikube: exit status 1
I0424 17:51:46.234334 7040 delete.go:119] stophost failed (probably ok): Temporary Error: stop: stopping minikube: exit status 1
I0424 17:51:46.238406 7040 oci.go:250] executing with [docker inspect -f {{.State.Status}} minikube] timeout: 19s
I0424 17:51:46.396439 7040 delete.go:72] Unable to get host status for minikube, assuming it has already been deleted: state: "docker inspect -f {{.State.Status}} minikube" failed: exit status 1: Template parsing error: template: :1:8: executing "" at <.State.Status>: map has no entry for key "State"
I0424 17:51:46.556111 7040 main.go:110] libmachine: could not find the container minikube to remove it.
W0424 17:51:46.714522 7040 delete.go:96] remove failed, will retry: removing container minikube, output Error: No such container: minikube: exit status 1
I0424 17:51:47.876727 7040 main.go:110] libmachine: could not find the container minikube to remove it.
W0424 17:51:48.028533 7040 delete.go:129] delete failed (probably ok) host remove retry: removing container minikube, output Error: No such container: minikube: exit status 1
I0424 17:51:48.028533 7040 fix.go:116] Sleeping 1 second for extra luck!
I0424 17:51:49.043752 7040 start.go:107] createHost starting for "m01" (driver="docker")

  • Creating Kubernetes in docker container with (CPUs=2) (2 available), Memory=2200MB (8191MB available) ...
    I0424 17:51:49.979955 7040 start.go:143] libmachine.API.Create for "minikube" (driver="docker")
    I0424 17:51:49.981942 7040 client.go:169] LocalClient.Create starting
    I0424 17:51:49.983957 7040 main.go:110] libmachine: Reading certificate data from C:\Users\mika.minikube\certs\ca.pem
    I0424 17:51:49.992961 7040 main.go:110] libmachine: Decoding PEM data...
    I0424 17:51:49.992961 7040 main.go:110] libmachine: Parsing certificate...
    I0424 17:51:49.993972 7040 main.go:110] libmachine: Reading certificate data from C:\Users\mika.minikube\certs\cert.pem
    I0424 17:51:50.001006 7040 main.go:110] libmachine: Decoding PEM data...
    I0424 17:51:50.003976 7040 main.go:110] libmachine: Parsing certificate...
    I0424 17:51:50.006968 7040 oci.go:250] executing with [docker ps -a --format {{.Names}}] timeout: 30s
    I0424 17:51:50.175343 7040 volumes.go:97] executing: [docker volume create minikube --label name.minikube.sigs.k8s.io=minikube --label created_by.minikube.sigs.k8s.io=true]
    I0424 17:51:50.327878 7040 oci.go:128] Successfully created a docker volume minikube
    I0424 17:51:51.392824 7040 client.go:172] LocalClient.Create took 1.4098262s
    I0424 17:51:53.403055 7040 start.go:110] createHost completed in 4.3587492s
    I0424 17:51:53.404056 7040 fix.go:55] fixHost completed within 16.0473204s
    I0424 17:51:53.405042 7040 start.go:77] releasing machines lock for "minikube", held for 16.0493585s
    ! StartHost failed, but will try again: recreate: creating host: create: creating: create kic node: create container: failed args: [run -d -t --privileged --security-opt seccomp=unconfined --tmpfs /tmp --tmpfs /run -v /lib/modules:/lib/modules:ro --hostname minikube --name minikube --label created_by.minikube.sigs.k8s.io=true --label name.minikube.sigs.k8s.io=minikube --label role.minikube.sigs.k8s.io= --label mode.minikube.sigs.k8s.io=minikube --volume minikube:/var --cpus=2 --memory=2200mb --expose 8443 --publish=127.0.0.1::8443 --publish=127.0.0.1::22 --publish=127.0.0.1::2376 gcr.io/k8s-minikube/kicbase:v0.0.8@sha256:2f3380ebf1bb0c75b0b47160fd4e61b7b8fef0f1f32f9def108d3eada50a7a81] output: docker: Error response from daemon: Windows does not support privileged mode.
    See 'docker run --help'.
    : exit status 125
    I0424 17:51:58.420051 7040 start.go:260] acquiring machines lock for minikube: {Name:mkce28365d538b7bc336bc0f1bca244adbdc9237 Clock:{} Delay:500ms Timeout:15m0s Cancel:}
    I0424 17:51:58.421029 7040 start.go:264] acquired machines lock for "minikube" in 0s
    I0424 17:51:58.425028 7040 start.go:90] Skipping create...Using existing machine configuration
    I0424 17:51:58.426076 7040 fix.go:53] fixHost starting: m01
    I0424 17:51:58.428048 7040 oci.go:250] executing with [docker inspect -f {{.State.Status}} minikube] timeout: 19s
    I0424 17:51:58.587317 7040 fix.go:105] recreateIfNeeded on minikube: state=Error err="docker inspect -f {{.State.Status}} minikube" failed: exit status 1: Template parsing error: template: :1:8: executing "" at <.State.Status>: map has no entry for key "State"
    I0424 17:51:58.587317 7040 fix.go:109] exists: false err=machine does not exist
    I0424 17:51:58.591330 7040 fix.go:110] "machine does not exist" vs "machine does not exist"
  • docker "minikube" container is missing, will recreate.
    I0424 17:51:58.601324 7040 delete.go:114] DEMOLISHING minikube ...
    I0424 17:51:58.602320 7040 main.go:110] libmachine: Stopping "minikube"...
    I0424 17:51:58.602320 7040 oci.go:250] executing with [docker inspect -f {{.State.Status}} minikube] timeout: 19s
    I0424 17:51:58.776198 7040 main.go:110] libmachine: Error getting machine state: "docker inspect -f {{.State.Status}} minikube" failed: exit status 1: Template parsing error: template: :1:8: executing "" at <.State.Status>: map has no entry for key "State"

I0424 17:51:58.776198 7040 kubelet.go:43] stopping kubelet ...
I0424 17:51:58.784205 7040 kic_runner.go:91] Run: sudo systemctl stop kubelet.service
I0424 17:51:59.871255 7040 kic_runner.go:91] Run: sudo systemctl stop kubelet.service
I0424 17:52:01.830175 7040 kic_runner.go:91] Run: sudo systemctl stop kubelet.service
W0424 17:52:01.979864 7040 kic.go:322] couldn't stop kubelet. will continue with stop anyways: error stopping kubelet: temporary error for "sudo systemctl stop kubelet.service" : sudo systemctl stop kubelet.service: exit status 1
stdout:

stderr:
Error: No such container: minikube
I0424 17:52:01.979864 7040 kubelet.go:43] stopping kubelet ...
I0424 17:52:01.997875 7040 kic_runner.go:91] Run: sudo systemctl stop -f kubelet.service
I0424 17:52:02.741292 7040 kic_runner.go:91] Run: sudo systemctl stop -f kubelet.service
I0424 17:52:03.891955 7040 kic_runner.go:91] Run: sudo systemctl stop -f kubelet.service
W0424 17:52:04.040878 7040 kic.go:324] couldn't force stop kubelet. will continue with stop anyways: error stopping kubelet: temporary error for "sudo systemctl stop -f kubelet.service" : sudo systemctl stop -f kubelet.service: exit status 1
stdout:

stderr:
Error: No such container: minikube
I0424 17:52:04.046888 7040 kic_runner.go:91] Run: docker ps -a --filter=name=k8s_.(kube-system|kubernetes-dashboard|storage-gluster|istio-operator) --format={{.ID}}
I0424 17:52:04.197651 7040 kic.go:335] unable list containers : docker: docker ps -a --filter=name=k8s_.
(kube-system|kubernetes-dashboard|storage-gluster|istio-operator) --format={{.ID}}: exit status 1
stdout:

stderr:
Error: No such container: minikube
I0424 17:52:04.197651 7040 kic.go:342] successfully stopped kubernetes!
I0424 17:52:04.359663 7040 stop.go:56] stop err: stopping minikube: exit status 1
I0424 17:52:04.359663 7040 delete.go:119] stophost failed (probably ok): Temporary Error: stop: stopping minikube: exit status 1
I0424 17:52:04.364669 7040 oci.go:250] executing with [docker inspect -f {{.State.Status}} minikube] timeout: 19s
I0424 17:52:04.520806 7040 delete.go:72] Unable to get host status for minikube, assuming it has already been deleted: state: "docker inspect -f {{.State.Status}} minikube" failed: exit status 1: Template parsing error: template: :1:8: executing "" at <.State.Status>: map has no entry for key "State"
I0424 17:52:04.673957 7040 main.go:110] libmachine: could not find the container minikube to remove it.
W0424 17:52:04.830829 7040 delete.go:96] remove failed, will retry: removing container minikube, output Error: No such container: minikube: exit status 1
I0424 17:52:05.998539 7040 main.go:110] libmachine: could not find the container minikube to remove it.
W0424 17:52:06.149965 7040 delete.go:129] delete failed (probably ok) host remove retry: removing container minikube, output Error: No such container: minikube: exit status 1
I0424 17:52:06.149965 7040 fix.go:116] Sleeping 1 second for extra luck!
I0424 17:52:07.164669 7040 start.go:107] createHost starting for "m01" (driver="docker")

  • Creating Kubernetes in docker container with (CPUs=2) (2 available), Memory=2200MB (8191MB available) ...
    I0424 17:52:08.089239 7040 start.go:143] libmachine.API.Create for "minikube" (driver="docker")
    I0424 17:52:08.091238 7040 client.go:169] LocalClient.Create starting
    I0424 17:52:08.092227 7040 main.go:110] libmachine: Reading certificate data from C:\Users\mika.minikube\certs\ca.pem
    I0424 17:52:08.093232 7040 main.go:110] libmachine: Decoding PEM data...
    I0424 17:52:08.093232 7040 main.go:110] libmachine: Parsing certificate...
    I0424 17:52:08.095234 7040 main.go:110] libmachine: Reading certificate data from C:\Users\mika.minikube\certs\cert.pem
    I0424 17:52:08.095234 7040 main.go:110] libmachine: Decoding PEM data...
    I0424 17:52:08.096233 7040 main.go:110] libmachine: Parsing certificate...
    I0424 17:52:08.102237 7040 oci.go:250] executing with [docker ps -a --format {{.Names}}] timeout: 30s
    I0424 17:52:08.266832 7040 volumes.go:97] executing: [docker volume create minikube --label name.minikube.sigs.k8s.io=minikube --label created_by.minikube.sigs.k8s.io=true]
    I0424 17:52:08.419841 7040 oci.go:128] Successfully created a docker volume minikube
    I0424 17:52:09.504960 7040 client.go:172] LocalClient.Create took 1.4125766s
    I0424 17:52:11.512925 7040 start.go:110] createHost completed in 4.3475387s
    I0424 17:52:11.512925 7040 fix.go:55] fixHost completed within 13.08597s
    I0424 17:52:11.517928 7040 start.go:77] releasing machines lock for "minikube", held for 13.0920206s
    W0424 17:52:11.519895 7040 exit.go:101] Failed to start docker container. "minikube start" may fix it.: recreate: creating host: create: creating: create kic node: create container: failed args: [run -d -t --privileged --security-opt seccomp=unconfined --tmpfs /tmp --tmpfs /run -v /lib/modules:/lib/modules:ro --hostname minikube --name minikube --label created_by.minikube.sigs.k8s.io=true --label name.minikube.sigs.k8s.io=minikube --label role.minikube.sigs.k8s.io= --label mode.minikube.sigs.k8s.io=minikube --volume minikube:/var --cpus=2 --memory=2200mb --expose 8443 --publish=127.0.0.1::8443 --publish=127.0.0.1::22 --publish=127.0.0.1::2376 gcr.io/k8s-minikube/kicbase:v0.0.8@sha256:2f3380ebf1bb0c75b0b47160fd4e61b7b8fef0f1f32f9def108d3eada50a7a81] output: docker: Error response from daemon: Windows does not support privileged mode.
    See 'docker run --help'.
    : exit status 125

X Failed to start docker container. "minikube start" may fix it.: recreate: creating host: create: creating: create kic node: create container: failed args: [run -d -t --privileged --security-opt seccomp=unconfined --tmpfs /tmp --tmpfs /run -v /lib/modules:/lib/modules:ro --hostname minikube --name minikube --label created_by.minikube.sigs.k8s.io=true --label name.minikube.sigs.k8s.io=minikube --label role.minikube.sigs.k8s.io= --label mode.minikube.sigs.k8s.io=minikube --volume minikube:/var --cpus=2 --memory=2200mb --expose 8443 --publish=127.0.0.1::8443 --publish=127.0.0.1::22 --publish=127.0.0.1::2376 gcr.io/k8s-minikube/kicbase:v0.0.8@sha256:2f3380ebf1bb0c75b0b47160fd4e61b7b8fef0f1f32f9def108d3eada50a7a81] output: docker: Error response from daemon: Windows does not support privileged mode.
See 'docker run --help'.
: exit status 125
*

**Full output of failed command:**

Optional: Full output of minikube logs command:

PS C:\Users\mika> minikube logs * X Unable to get machine status: state: "docker inspect -f {{.State.Status}} minikube" failed: exit status 1: Template parsing error: template: :1:8: executing "" at <.State.Status>: map has no entry for key "State"

@medyagh
Copy link
Member

medyagh commented May 2, 2020

@mikalegall I had this problem on windows, and I noticed the only way to fix it was
Right click on the Docker Desktop icon and toggle switch to Linux containers two times.

The first time it was showing it was using Linux Containers but when I ran minikube I got same error as you.

the only way to verify is in terminal run

docker info

then in os type it should say Linux and not Windows.

(if it says winodwos, try to click on Docker Desktop and Switch to linux Containers)

that fixed my issue, do u mind trying again?

I am gonna make a PR that will check for OsType before creating the container.

@medyagh
Copy link
Member

medyagh commented May 2, 2020

I just installed docker for desktop on a fresh windows and I noticed the Installation Processes has checked "enabled Windows features" by default. so if you click next, by default your docker desktop will be a windows container.

@medyagh
Copy link
Member

medyagh commented May 2, 2020

so here is the Irony I talked about in screenshots:

docker info shows it is Windows Containers
but the Docker Desktop Icon thinks it is Linux

Screen Shot 2020-05-02 at 4 20 08 PM
Screen Shot 2020-05-02 at 4 19 56 PM

this is defenitaly a Docker Desktop Bug, but we could be smarter and try Docker Info before creating and make sure

@medyagh
Copy link
Member

medyagh commented May 3, 2020

@devika-28 @mikalegall
Thank you for reporting this, I created a PR to detect if your have set the Windows containers in docker desktop, and give you instructions how to change it.
it will be included in the next release.

if you like u can download the binary from this PR and try it on your machine.
http://storage.googleapis.com/minikube-builds/7984/minikube-windows-amd64.exe

@ljun51
Copy link

ljun51 commented May 4, 2020

macos is also.

Failed to start docker container. "minikube start" may fix it.: recreate: creating host: create: creating: create kic node: create container: failed args: [run -d -t --privileged --security-opt seccomp=unconfined --tmpfs /tmp --tmpfs /run -v /lib/modules:/lib/modules:ro --hostname minikube --name minikube --label created_by.minikube.sigs.k8s.io=true --label name.minikube.sigs.k8s.io=minikube --label role.minikube.sigs.k8s.io= --label mode.minikube.sigs.k8s.io=minikube --volume minikube:/var --cpus=2 --memory=1989mb --expose 8443 --publish=127.0.0.1::8443 --publish=127.0.0.1::22 --publish=127.0.0.1::2376 gcr.io/k8s-minikube/kicbase:v0.0.8@sha256:2f3380ebf1bb0c75b0b47160fd4e61b7b8fef0f1f32f9def108d3eada50a7a81] output: Unable to find image 'gcr.io/k8s-minikube/kicbase:v0.0.8@sha256:2f3380ebf1bb0c75b0b47160fd4e61b7b8fef0f1f32f9def108d3eada50a7a81' locally
docker: Error response from daemon: Get https://gcr.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
See 'docker run --help'.
: exit status 125

@mikalegall
Copy link

so here is the Irony I talked about in screenshots:

docker info shows it is Windows Containers
but the Docker Desktop Icon thinks it is Linux

Screen Shot 2020-05-02 at 4 20 08 PM
Screen Shot 2020-05-02 at 4 19 56 PM

this is defenitaly a Docker Desktop Bug, but we could be smarter and try Docker Info before creating and make sure

Okay and thank you @medyagh
On brand new Azure Microsoft Windows Server 2019 Datacenter there was not Docker Desktop. So i did install Docker Desktop and made couple of times back and forward that change you suggest
https://user-images.githubusercontent.com/4564227/80894570-ef86f580-8c90-11ea-83e9-dfc5b736cb8a.png
and now "minikube start --driver docker" works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/docker-driver Issues related to kubernetes in container kind/support Categorizes issue or PR as a support question. needs-solution-message Issues where where offering a solution for an error would be helpful os/windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants