Minikube Error "loading cached images: Docker load' - docker

I'm trying to start minikube in Windows 10 using below command. minikube version v1.10.1
minikube start --vm-driver=virtualbox --no-vtx-check
But i'm getting below error
Creating virtualbox VM (CPUs=2, Memory=4096MB, Disk=20000MB) ...
* Preparing Kubernetes v1.18.2 on Docker 19.03.8 ...
* Unable to load cached images: loading cached images: Docker load /var/lib/minikube/images/pause_3.2: loadimage docker.: docker load -i /var/lib/minikube/images/pause_3.2: Process exited with status 1
stdout:
stderr:
Error processing tar file(exit status 1): archive/tar: invalid tar header
*
* [OOM_KILL_SCP] Failed to update cluster updating node: downloading binaries: NewSession: new client: new client: ssh: handshake failed: read tcp 127.0.0.1:2506->127.0.0.1:2427: wsarecv: An existing connection was forcibly closed by the remote host.
* Suggestion: Disable dynamic memory in your VM manager, or pass in a larger --memory value
* Related issue: https://github.com/kubernetes/minikube/issues/1766
So i thought of degrading the minikube version. so i used v1.7.2 version and then v1.3.0 version but in both cases i got the same above mentioned error. Kindly suggest
Regards

It worked. Below are the steps which i have done as part of change for minikube in Windows 10 Home edition where hyper-v is not supported
Step 1: Enable virtualization and install virtualbox
step 2: add kutectl and minikube installer
step 3:
Run below command
minikube start --vm-driver=virtualbox --memory 4096
If it fails then
minikube delete and delete .minikube and .kubectl folders
Enable WSL 2
Open PowerShell as Administrator and run:
Enable WSL1
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Enable WSL2
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Restart the system
Install Linux Distribution Package
Click here!
Disable hypervisorlaunchtype
Open CMD
Run bcdedit to check hypervisor status
bcdedit
If hypervisorlaunchtype is set to auto then disable it:
bcdedit /set hypervisorlaunchtype off
Reboot
Again run minikube
minikube start --vm-driver=virtualbox --memory 4096

Related

docker set iptables false, minikube start fails

I'm having an error trying to have docker set iptables false when minikube start fails.
Below are my logs:
minikube v1.20.0 on Centos 7.6.1810 (amd64)
* Using the none driver based on existing profile
* Starting control plane node minikube in cluster minikube
* Restarting existing none bare metal machine for "minikube" ...
* OS release is CentOS Linux 7 (Core)
* Preparing Kubernetes v1.20.2 on Docker 20.10.6 ...
! initialization failed, will try again: wait: /bin/bash -c "sudo env PATH=/var/lib/minikube/binaries/v1.20.2:$PATH kubeadm init --config /var/tmp/minikube/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests,DirAvailable--var-lib-minikube,DirAvailable--var-lib-minikube-etcd,FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml,FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml,FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml,FileAvailable--etc-kubernetes-manifests-etcd.yaml,Port-10250,Swap,Mem": exit status 1
stdout:
[init] Using Kubernetes version: v1.20.2
[preflight] Running pre-flight checks
stderr:
[WARNING Firewalld]: firewalld is active, please ensure ports [8443 10250] are open or your cluster may not function correctly
[WARNING Service-Docker]: docker service is not enabled, please run 'systemctl enable docker.service'
[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
[WARNING Swap]: running with swap on is not supported. Please disable swap
[WARNING FileExisting-socat]: socat not found in system path
[WARNING SystemVerification]: this Docker version is not on the list of validated versions: 20.10.6. Latest validated version: 19.03
[WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables does not exist
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher
Error you included states that you are misising bridge-nf-call-iptables.
bridge-nf-call-iptables is exported by br_netfilter.
What you need to do is issue the command
sudo modprobe br_netfilter
and then ensure net.bridge.bridge-nf-call-iptables is set to 1 in your sysctl
cat <<EOF > /etc/sysctl.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
EOF
sysctl --system
This should fix your problem

Minikube start stuck in waiting for pods and timeout

I try to run a sample application in my Ubuntu 18 vm.
I have installed Docker client and server version of 18.06.1-ce. I already have VirtualBox running.
I use below link and install kubectl 1.14 too: https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-on-linux
I have Minikube v1.0.1 also installed. But Minikube start command stuck in Waiting for pods: apiserver and timeout
harshana#-Virtual-Machine:~$ sudo minikube start
๐Ÿ˜„ minikube v1.0.1 on linux (amd64)
๐Ÿคน Downloading Kubernetes v1.14.1 images in the background ...
โš ๏ธ Ignoring --vm-driver=virtualbox, as the existing "minikube" VM was created using the none driver.
โš ๏ธ To switch drivers, you may create a new VM using `minikube start -p <name> --vm-driver=virtualbox`
โš ๏ธ Alternatively, you may delete the existing VM using `minikube delete -p minikube`
๐Ÿ”„ Restarting existing none VM for "minikube" ...
โŒ› Waiting for SSH access ...
๐Ÿ“ถ "minikube" IP address is xxx.xxx.x.xxx
๐Ÿณ Configuring Docker as the container runtime ...
๐Ÿณ Version of container runtime is 18.06.1-ce
โŒ› Waiting for image downloads to complete ...
โœจ Preparing Kubernetes environment ...
๐Ÿ’พ Downloading kubeadm v1.14.1
๐Ÿ’พ Downloading kubelet v1.14.1
๐Ÿšœ Pulling images required by Kubernetes v1.14.1 ...
๐Ÿ”„ Relaunching Kubernetes v1.14.1 using kubeadm ...
โŒ› Waiting for pods: apiserver
sudo minikube logs:
May 19 08:11:40 harshana-Virtual-Machine kubelet[10572]: E0519 08:11:40.825465 10572 kubelet.go:2244] node "minikube" not found
May 19 08:11:40 harshana-Virtual-Machine kubelet[10572]: E0519 08:11:40.895848 10572 reflector.go:126] k8s.io/kubernetes/pkg/kubelet/kubelet.go:451: Failed to list *v1.Node: Get https://localhost:8443/api/v1/nodes?fieldSelector=metadata.name%!D(MISSING)minikube&limit=500&resourceVersion=0: dial tcp 127.0.0.1:8443: connect: connection refused
I got the same behaviour because I have created a first VM using kvm. I have followed the instructions and deleted the VM. Run the below :
1- minikube delete -p minikube
2- minikube start

Delete kubernetes cluster on docker-for-desktop OSX?

What is the equivalent command for minikube delete in docker-for-desktop on OSX
As I understand, minikube creates a VM to host its kubernetes cluster but I do not understand how docker-for-desktop is managing this on OSX.
Tear down Kubernetes in Docker for OS X is quite an easy task.
Go to Preferences, open Reset tab, and click Reset Kubernetes cluster.
All object that have been created with Kubectl before that will be deleted.
You can also reset docker VM image (Reset disk image) and all settings (Reset to factory defaults) or even uninstall Docker.
In recent Docker Edge versions for Mac ( 2.1.7 ) Preferences design has been changed. Now you can reset Kubernetes cluster and other docker aspects by switching to the bug plane in the top right of Preferences window:
Note: You are able to reset Kubernetes cluster only if it's enabled. If you uncheck "Enable Kubernetes" checkbox, "Reset Kubernetes cluster" button becomes inactive.
For convenience "Reset Kubernetes cluster" is also present on the Kubernetes tab in the main Preferences plane:
To reset Docker-desktop Kubernetes cluster using command line, put the following content to a file (dd-reset.sh) and mark it executable ( chmod a+x dd-reset.sh )
#!/bin/bash
dr='docker run -it --rm --privileged --pid=host debian nsenter -t 1 -m -u -n -i'
${dr} sh -c 'export PATH=$PATH:/containers/services/docker/rootfs/usr/bin:/containers/services/docker/rootfs/usr/local/bin:/var/lib/kube-binary-cache/ && \
if [ ! -e /var/run/docker.sock ] ; then ln -s /containers/services/docker/rootfs/var/run/docker.sock /var/run/docker.sock ; fi && \
kube-reset.sh'
sleep 3
echo "cluster resetted. restarting docker-desktop..."
osascript -e 'quit app "Docker"'
open --background -a Docker
echo "docker-desktop started. Wait 3-5 mins for kubernetes to start."
Explanation:
This method uses internal scripts from Docker-desktop VM. To make it work, some preparation of user environment is required.
I wasn't able to start Kubernetes cluster using kube-start.sh script from inside the VM, so I've used MacOS commands to restart Docker application instead.
This method works even if your Kubernetes cluster is not enabled in Docker preferences at the moment, but it's required to enable Kubernetes at least once to use the script.
It was tested on Docker Edge for MacOS v2.2.2.0 (43066)
There is no guarantee that it will be compatible with earlier or later versions.
This version of Docker uses kubeadm to initialize Kubernetes cluster. Scripts are located in the folder /containers/services/docker/rootfs/usr/bin:
kube-pull.sh (brings kubernetes binaries to VM)
kube-reset.sh (runs kube-stop.sh and do kubeadm reset + some rm stuff)
kube-restart.sh (runs kube-stop.sh and kube-start.sh)
kube-start.sh (runs kube-pull.sh and kubelet.sh)
kube-stop.sh (kills kubelet and kube-apiserver processes, and all k8s containers)
kubeadm-init.sh (initializes Kubernetes cluster)
kubelet.sh (runs kubeadm-init.sh and starts kubelet binary)
Cluster configuration is located in the file /containers/services/docker/lower/etc/kubeadm/kubeadm.yaml
Resources used:
Restart Docker from command line
Use nsenter in priviledged container
It's really under the hood in the code. Docker for Mac uses these components: Hyperkit, VPNkit and DataKit
Kubernetes runs in the same Hyperkit VM created for docker and the kube-apiserver is exposed.
You can connect to the VM with this:
screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty
Then you can see all the Kubernetes processes in the VM:
linuxkit-025000000001:~# ps -Af | grep kube
1251 root 0:00 /usr/bin/logwrite -n kubelet /usr/bin/kubelet.sh
1288 root 0:51 kubelet --kubeconfig=/etc/kubernetes/kubelet.conf --bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true --cluster-dns=10.96.0.10 --cluster-domain=cluster.local --cgroups-per-qos=false --enforce-node-allocatable= --network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin --cadvisor-port=0 --kube-reserved-cgroup=podruntime --system-reserved-cgroup=systemreserved --cgroup-root=kubepods --hostname-override=docker-for-desktop --fail-swap-on=false
3564 root 0:26 kube-scheduler --address=127.0.0.1 --leader-elect=true --kubeconfig=/etc/kubernetes/scheduler.conf
3616 root 1:45 kube-controller-manager --cluster-signing-key-file=/run/config/pki/ca.key --address=127.0.0.1 --root-ca-file=/run/config/pki/ca.crt --service-account-private-key-file=/run/config/pki/sa.key --kubeconfig=/etc/kubernetes/controller-manager.conf --cluster-signing-cert-file=/run/config/pki/ca.crt --leader-elect=true --use-service-account-credentials=true --controllers=*,bootstrapsigner,tokencleaner
3644 root 1:59 kube-apiserver --admission-control=Initializers,NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota --requestheader-username-headers=X-Remote-User --requestheader-group-headers=X-Remote-Group --service-account-key-file=/run/config/pki/sa.pub --secure-port=6443 --insecure-port=8080 --insecure-bind-address=0.0.0.0 --requestheader-client-ca-file=/run/config/pki/front-proxy-ca.crt --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname --requestheader-extra-headers-prefix=X-Remote-Extra- --advertise-address=192.168.65.3 --service-cluster-ip-range=10.96.0.0/12 --tls-private-key-file=/run/config/pki/apiserver.key --enable-bootstrap-token-auth=true --requestheader-allowed-names=front-proxy-client --tls-cert-file=/run/config/pki/apiserver.crt --proxy-client-key-file=/run/config/pki/front-proxy-client.key --proxy-client-cert-file=/run/config/pki/front-proxy-client.crt --allow-privileged=true --client-ca-file=/run/config/pki/ca.crt --kubelet-client-certificate=/run/config/pki/apiserver-kubelet-client.crt --kubelet-client-key=/run/config/pki/apiserver-kubelet-client.key --authorization-mode=Node,RBAC --etcd-servers=https://127.0.0.1:2379 --etcd-cafile=/run/config/pki/etcd/ca.crt --etcd-certfile=/run/config/pki/apiserver-etcd-client.crt --etcd-keyfile=/run/config/pki/apiserver-etcd-client.key
3966 root 0:01 /kube-dns --domain=cluster.local. --dns-port=10053 --config-dir=/kube-dns-config --v=2
4190 root 0:05 /usr/local/bin/kube-proxy --config=/var/lib/kube-proxy/config.conf
4216 65534 0:03 /sidecar --v=2 --logtostderr --probe=kubedns,127.0.0.1:10053,kubernetes.default.svc.cluster.local,5,SRV --probe=dnsmasq,127.0.0.1:53,kubernetes.default.svc.cluster.local,5,SRV
4606 root 0:00 /compose-controller --kubeconfig --reconciliation-interval 30s
4905 root 0:01 /api-server --kubeconfig --authentication-kubeconfig --authorization-kubeconfig --etcd-servers=https://127.0.0.1:2379 --etcd-cafile=/etc/docker-compose/etcd/ca.crt --etcd-certfile=/etc/docker-compose/etcd/client.crt --etcd-keyfile=/etc/docker-compose/etcd/client.key --secure-port=9443 --tls-ca-file=/etc/docker-compose/tls/ca.crt --tls-cert-file=/etc/docker-compose/tls/server.crt --tls-private-key-file=/etc/docker-compose/tls/server.key
So if you uncheck the following box (unclear from the docs what command it uses):
You can see that the processes are removed:
linuxkit-025000000001:~# [ 6616.856404] cni0: port 2(veth5f6c8b28) entered disabled state
[ 6616.860520] device veth5f6c8b28 left promiscuous mode
[ 6616.861125] cni0: port 2(veth5f6c8b28) entered disabled state
linuxkit-025000000001:~#
linuxkit-025000000001:~# [ 6626.816763] cni0: port 1(veth87e77142) entered disabled state
[ 6626.822748] device veth87e77142 left promiscuous mode
[ 6626.823329] cni0: port 1(veth87e77142) entered disabled state
linuxkit-025000000001:~# ps -Af | grep kube
linuxkit-025000000001:~#
On docker desktop version 3.5.2 (engine version 20.10.7), the reset button has been moved inside the docker preferences.
You can get there by following the below steps:
Click on the docker icon in the menu bar and choose 'Preferences'.
Go to the Kubernetes tab.
Click on the Reset Kubernetes CLuster button. This is the red color button.
This will delete all pods and reset the kubernetes. You can execute the docker ps command at terminal to verify that there are no containers running.
Just delete the vm that holds the kubernetes resources.
$ minikube delete

docker - start failed because /etc/fstab not found

I'm using Window Linux Subsystem (Debian stretch). Followed the instruction on Docker website, I installed docker-ce, but it cannot start. Here is the info:
$ sudo service docker start
grep: /etc/fstab: No such file or directory
[ ok ] Starting Docker: docker.
$ sudo service docker status
[FAIL] Docker is not running ... failed!
What should I do with /etc/fstab not found?
to fix fstab
touch /etc/fstab
if you run dockerd, it will give you the failed message:
INFO[2022-01-27T17:55:14.100489400+07:00] Loading containers: start.
WARN[2022-01-27T17:55:14.191666800+07:00] Running iptables --wait -t nat -L -n failed with message: `iptables v1.8.2 (nf_tables): CHAIN_ADD failed (No such file or directory): chain PREROUTING`, error: exit status 4
INFO[2022-01-27T17:55:14.493716300+07:00] stopping event stream following graceful shutdown error="<nil>" module=libcontainerd namespace=moby
INFO[2022-01-27T17:55:14.494906600+07:00] stopping event stream following graceful shutdown error="context canceled" module=libcontainerd namespace=plugins.moby
INFO[2022-01-27T17:55:14.495048400+07:00] stopping healthcheck following graceful shutdown module=libcontainerd
failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables --wait -t nat -N DOCKER: iptables v1.8.2 (nf_tables): CHAIN_ADD failed (No such file or directory): chain PREROUTING
(exit status 4)
that is Debian nat issue, fix it with:
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
now you can start the service again
you can follow this to make it start on startup https://askubuntu.com/a/1356147/138352
Edited:
if the issue with IP table still persisted try to set WSL version to 2, run the command from Windows shell:
wsl --set-version <distribution name> 2
the distribution list can be found with command wsl -l
I was getting the same error. Apparently on my install of WSL with Debian, I didn't have an etc/fstab file. Surprisingly, just creating the file via 'touch' worked:
sudo touch /etc/fstab
Perhaps a good signal https://learn.microsoft.com/en-us/windows/wsl/release-notes#build-17093
WSL now processes the /etc/fstab file during instance start [GH 2636].
For anybody stumbling across this years later like me, Docker doesn't work inside WSL.
But you can use Docker for Windows and WSL2 to run native containers inside your Linux Distro and the install and config is quite painless https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-containers

Docker Desktop for Windows: No hypervisor is present on this system

I am new to Docker Desktop for Windows. I am getting an error when I tried the hello world example by following this. Update
Below is the steps I followed:
1 Installed Docker for Windows, stable version
2 Both Hyper-V and Virtualization have been enabled on my Windows 10
However, error below when switch to Linux container:
An error occurred.
Hardware assisted virtualization and data execution protection must be enabled in the BIOS. See https://docs.docker.com/docker-for-windows/troubleshoot/#virtualization-must-be-enabled
Please note the problem in this post occurs when using Windows containers. Step 3 is using Windows containers, not Linux.
3 Error below when trying out hello world
PS C:\Users\'#.lp> docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
407ada6e90de: Pull complete
9c9e16cbf19f: Pull complete
2cb715c55064: Pull complete
990867d1296d: Pull complete
Digest: sha256:445b2fe9afea8b4aa0b2f27fe49dd6ad130dfe7a8fd0832be5de99625dad47cd
Status: Downloaded newer image for hello-world:latest
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: container e646da0e13b5c2ba92db3ade35f6a334f9c2903efde26a78765f55f0498a86f1 encountered an error during CreateContainer: failure in a Windows system call: No hypervisor is present on this system. (0xc0351000) extra info: {"SystemType":"Container","Name":"e646da0e13b5c2ba92db3ade35f6a334f9c2903efde26a78765f55f0498a86f1","Owner":"docker","IgnoreFlushesDuringBoot":true,"LayerFolderPath":"C:\\ProgramData\\Docker\\windowsfilter\\e646da0e13b5c2ba92db3ade35f6a334f9c2903efde26a78765f55f0498a86f1","Layers":[{"ID":"84cbd4e4-1a6a-5e55-86fa-927ba5be73e0","Path":"C:\\ProgramData\\Docker\\windowsfilter\\417caa6a366bad6fe0d68d2b459510e4c50fda5686b37fb91c9363ca103e9475"},{"ID":"e747017d-859e-5513-b9ad-346002efc167","Path":"C:\\ProgramData\\Docker\\windowsfilter\\43e4d5eeaebc150ea9da0bf919302a2d7646461e3da60b5cbd3db15d3d928698"},{"ID":"e0bd7f8a-622c-589f-9752-eb7b80b88973","Path":"C:\\ProgramData\\Docker\\windowsfilter\\e8ee5f9ec8d67bfebe230b67989dd788506e33627a4400bb63ba098b2a3fd733"},{"ID":"6f13d213-2d8c-5c37-b1f5-770f73ad2d9a","Path":"C:\\ProgramData\\Docker\\windowsfilter\\a731844c4d933200e984524b7273ac3a555792bafec6eab30722fdfd7992ee96"}],"HostName":"e646da0e13b5","HvPartition":true,"EndpointList":["0b88e638-56ea-4157-88a7-67fc3bc35958"],"HvRuntime":{"ImagePath":"C:\\ProgramData\\Docker\\windowsfilter\\e8ee5f9ec8d67bfebe230b67989dd788506e33627a4400bb63ba098b2a3fd733\\UtilityVM"},"AllowUnqualifiedDNSQuery":true}.
System information below:
PS C:\Users\'#.lp> docker --version
Docker version 17.09.1-ce, build 19e2cf6
PS C:\Users\'#.lp> docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 17.09.1-ce
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: ics l2bridge l2tunnel nat null overlay transparent
Log: awslogs etwlogs fluentd json-file logentries splunk syslog
Swarm: inactive
Default Isolation: hyperv
Kernel Version: 10.0 16299 (16299.15.amd64fre.rs3_release.170928-1534)
Operating System: Windows 10 Pro
OSType: windows
Architecture: x86_64
CPUs: 4
Total Memory: 7.999GiB
Name: username
ID: 5EK5:6LMU:NPZG:3K2F:W3X7:2G7T:GFYU:GENE:LDBA:UASU:ZF26:T3AU
Docker Root Dir: C:\ProgramData\Docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: -1
Goroutines: 24
System Time: 2017-12-24T20:16:32.0728521Z
EventsListeners: 0
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
PS C:\Users\'#.lp> docker-compose --version
docker-compose version 1.17.1, build 6d101fb0
PS C:\Users\'#.lp> docker-machine --version
docker-machine.exe version 0.13.0, build 9ba6da9
Windows 10 Pro version 1709
Any idea?
Update:
PS C:\WINDOWS\system32> docker --version
Docker version 17.12.0-ce, build c97c6d6
PS C:\WINDOWS\system32> docker rm -f $(docker ps -a -q)
a7094c166be7
afbc956d0630
6cc2e3a20dcc
e646da0e13b5
PS C:\WINDOWS\system32> docker rmi -f $(docker images -q)
Untagged: hello-world:latest
Untagged: hello-world#sha256:445b2fe9afea8b4aa0b2f27fe49dd6ad130dfe7a8fd0832be5de99625dad47cd
Deleted: sha256:29528317da62a27024338f18abf29c992d6cdb4087f7d195cb6725bbe6bd15cc
Deleted: sha256:729a95d3f7234b02c27bdaf4fd81fd3fb9453445a85b713398c6bd05ad290ff5
Deleted: sha256:fcea8c486bda6858dee33a0ce494fba4839e542554b0588f6d00833a4155a537
Deleted: sha256:53cda6d9c060289530670af7ac429015f88d1ac58417f94f22c3dd2f03210436
Deleted: sha256:67903cf26ef4095868687002e3dc6f78ad275677704bf0d11524f16209cec48e
PS C:\WINDOWS\system32> docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
407ada6e90de: Pull complete
711a33cda32c: Pull complete
f2954926b3d8: Pull complete
8b6a3aeeca73: Pull complete
Digest: sha256:66ef312bbac49c39a89aa9bcc3cb4f3c9e7de3788c944158df3ee0176d32b751
Status: Downloaded newer image for hello-world:latest
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: container 99a306c2336a7bd503bfe8a744ace77cedc19bbc0d15e52b8d899bcea3db6b96 encountered an error during CreateContainer: failure in a Windows system call: No hypervisor is present on this system. (0xc0351000) extra info: {"SystemType":"Container","Name":"99a306c2336a7bd503bfe8a744ace77cedc19bbc0d15e52b8d899bcea3db6b96","Owner":"docker","IgnoreFlushesDuringBoot":true,"LayerFolderPath":"C:\\ProgramData\\Docker\\windowsfilter\\99a306c2336a7bd503bfe8a744ace77cedc19bbc0d15e52b8d899bcea3db6b96","Layers":[{"ID":"a5eef81d-74bf-53d1-8517-78b635324fdb","Path":"C:\\ProgramData\\Docker\\windowsfilter\\afb89f854af8452a0a12dfb14dc47995e001057c7af209be45ed5ee4813d2ffd"},{"ID":"744a6817-2b8a-5b6a-a717-8932a5863c9f","Path":"C:\\ProgramData\\Docker\\windowsfilter\\21a39c2b74ff220eac42f6f96d6097a7ef0feb192c1a77c0e88068cd10207d33"},{"ID":"ee281c98-febf-545b-bd51-8aec0a88f617","Path":"C:\\ProgramData\\Docker\\windowsfilter\\62439684561a3d30068cae2c804512984637d4c8b489f6f7cbcb5c8fed588af5"},{"ID":"f023cffb-ac18-57fe-9894-a2f1798fd0b0","Path":"C:\\ProgramData\\Docker\\windowsfilter\\1354f5a762901ec48bcf6a3ca8aab615bc305e91315e6e77fdf2c8fee5d587a2"}],"HostName":"99a306c2336a","HvPartition":true,"EndpointList":["2ce5269d-8776-4e84-8b37-4d99fa0a9f7b"],"HvRuntime":{"ImagePath":"C:\\ProgramData\\Docker\\windowsfilter\\62439684561a3d30068cae2c804512984637d4c8b489f6f7cbcb5c8fed588af5\\UtilityVM"},"AllowUnqualifiedDNSQuery":true}.
PS C:\WINDOWS\system32> systeminfo
Host Name: XXXX
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.16299 N/A Build 16299
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
Registered Owner: '#.lp
Registered Organization:
Product ID: XXXXXXXXXXXXXXXXXXXXXXXXXXX
Original Install Date: 10/12/2017, 23:15:17
System Boot Time: 06/01/2018, 13:53:55
System Manufacturer: System manufacturer
System Model: System Product Name
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 15 Stepping 11 GenuineIntel ~2401 Mhz
BIOS Version: American Megatrends Inc. 0902 , 27/07/2011
Windows Directory: C:\WINDOWS
System Directory: C:\WINDOWS\system32
Boot Device: \Device\HarddiskVolume1
System Locale: en-gb;English (United Kingdom)
Input Locale: en-gb;English (United Kingdom)
Time Zone: (UTC+00:00) Dublin, Edinburgh, Lisbon, London
Total Physical Memory: 8,191 MB
Available Physical Memory: 2,209 MB
Virtual Memory: Max Size: 16,383 MB
Virtual Memory: Available: 4,745 MB
Virtual Memory: In Use: 11,638 MB
Page File Location(s): C:\pagefile.sys
Domain: WORKGROUP
Logon Server: \\XXXXX
Hotfix(s): 7 Hotfix(s) Installed.
[01]: KB4048951
[02]: KB4053577
[03]: KB4054022
[04]: KB4055237
[05]: KB4056887
[06]: KB4058043
[07]: KB4054517
Network Card(s): 5 NIC(s) Installed.
[01]: TunnelBear Adapter V9
Connection Name: Ethernet
Status: Media disconnected
[02]: Qualcomm Atheros AR8131 PCI-E Gigabit Ethernet Controller (NDIS 6.30)
Connection Name: Local Area Connection
Status: Media disconnected
[03]: Compact Wireless-G USB Network Adapter
Connection Name: Wi-Fi
DHCP Enabled: Yes
DHCP Server: XXXXX
IP address(es)
[01]: XXX
[02]: XXX
[04]: Hyper-V Virtual Ethernet Adapter
Connection Name: vEthernet (Default Switch)
DHCP Enabled: Yes
DHCP Server: 255.255.255.255
IP address(es)
[01]: X
[02]: X
[05]: Hyper-V Virtual Ethernet Adapter
Connection Name: vEthernet (nat)
DHCP Enabled: Yes
DHCP Server: 255.255.255.255
IP address(es)
[01]: X
[02]: X
Hyper-V Requirements: VM Monitor Mode Extensions: Yes
Virtualization Enabled In Firmware: Yes
Second Level Address Translation: No
Data Execution Prevention Available: Yes
Update 2
Still getting the same error, any idea?
PS C:\Users\'#.lp> docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
e46172273a4e: Pull complete
61703422ec93: Pull complete
a17b8d9caad6: Pull complete
2dccc7619f71: Pull complete
Digest: sha256:41a65640635299bab090f783209c1e3a3f11934cf7756b09cb2f1e02147c6ed8
Status: Downloaded newer image for hello-world:latest
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: CreateComputeSystem 755110bc7813700701f2325c921fad7a4220c8ff91d620ac51e258cb8b1ab700: No hypervisor is present on this system.
(extra info: {"SystemType":"Container","Name":"755110bc7813700701f2325c921fad7a4220c8ff91d620ac51e258cb8b1ab700","Owner":"docker","IgnoreFlushesDuringBoot":true,"LayerFolderPath":"C:\\ProgramData\\Docker\\windowsfilter\\755110bc7813700701f2325c921fad7a4220c8ff91d620ac51e258cb8b1ab700","Layers":[{"ID":"535189fb-71a2-598a-bd98-f711c29cf301","Path":"C:\\ProgramData\\Docker\\windowsfilter\\5e4cc131c334b8171b269003b9659ba578f9528372dd28054624d0bbde003b4f"},{"ID":"93d17dd0-2837-5522-a207-2b9e009a9d2b","Path":"C:\\ProgramData\\Docker\\windowsfilter\\87d235bd8d5ca1534f7396bf90d96ee9012875f8ae0e56556af19ebce73cdf80"},{"ID":"6899fe53-2cd7-5ec6-8edc-bf8859eea3e7","Path":"C:\\ProgramData\\Docker\\windowsfilter\\f75a64ae1fe066c392738bc643e1f49f1f0ee0bce4214c8655714b7386cdc3fc"},{"ID":"efbc003d-b691-5d30-ad65-d7dff28ca9e8","Path":"C:\\ProgramData\\Docker\\windowsfilter\\74033dce6b43107101f831d96c6bebe0ceb1df34f8e5c82421ee3f296b20a70c"}],"HostName":"755110bc7813","HvPartition":true,"EndpointList":["93c1c71e-11b5-49d3-82fd-d467d9b625b6"],"HvRuntime":{"ImagePath":"C:\\ProgramData\\Docker\\windowsfilter\\f75a64ae1fe066c392738bc643e1f49f1f0ee0bce4214c8655714b7386cdc3fc\\UtilityVM"},"AllowUnqualifiedDNSQuery":true}).
PS C:\Users\'#.lp> docker --version
Docker version 18.09.2, build 6247962
PS C:\Users\'#.lp>
Here is what worked for me: Open command prompt as admin and run
bcdedit /set hypervisorlaunchtype auto
and then reboot
What had happened:
I had to start an android emulator and Android Studio said that "Emulator is incompatible With Hyper-V" so it ran this command to disable hyper-v bcdedit /set hypervisorlaunchtype off
These steps fixed it:
1. bcdedit /set hypervisorlaunchtype auto
2. reboot computer
3. docker run hello-world
if both docker and Hyper-V are installed try to recreate the image in docker. It works for me.
You can check the status of Hyper-V in system by typing the following command in powershell:
systeminfo
You should also switch to container for windows in docker if not already.
Had the same problem.
Had to enable the virtualization in the BIOS to solve it.
If you're attempting to run Docker for Windows inside a Parallels virtual machine, you must enable 'Nested Virtualization'.
https://kb.parallels.com/en/116239
This is only available in the Pro and Business Editions. I had to upgrade my version to support this as I was running Desktop.
If you are running Docker in a VM, may be you need look into "Nested Virtualization", the Virtualization need to be exposed from Physical Server to VM.
For example, expose Virtualization in Hyper-V platform throuth powershell scripts:
Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true
see the link:
Run Hyper-V in a Virtual Machine with Nested Virtualization
I had faced the same issue and it got resolved after upgrading my windows to latest version...
I did everything as suggested on this post and others to no avail. What did work for me was the following:
Turn Windows Features OFF : Hyper-V and Containers
Force an windows update to Windows 10 Pro ver: 1803
The update completed. Then when I started docker it asked me if I wanted to enable Hyper-V and Containers. I answered yes. The machine rebooted twice.
After this everything worked perfectly. Unfortunately I cannot say for sure if point 1 or point 2 or both together fixed the issue. I would suggest try point 1 above first followed by a reboot then starting docker. I suspect this rather than forcing a update to Windows 1803 will fix the problem.
For virtualbox users you need to enable nested virtualization
VM -> Configuration -> System -> Processor -> Enable nested VT-x/AMD-v
Run the following command on Windows Power Shell
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
if it requires a restart, then just follow the steps.
more info or options, please check docs from microsoft
Step 1:
Uninstall Docker.
Step 2:
Open "Turn windows features on or off" from Control Panel.
Uncheck both features - "Containers" and "Hyper-V", if they are checked.
Step 3:
Reboot PC
Step 4:
Check both features - "Container" and "Hyper-V".
Step 5:
Reboot PC.
Step 6:
Install docker and execute docker run hello-world
BIOS LEVEL Virtualization is a must
Hyper-V and Containers Windows features must be enabled.
The following hardware prerequisites are required to successfully run Client Hyper-V on Windows 10:
64-bit processor with Second Level Address Translation (SLAT)
4GB system RAM
BIOS-level hardware virtualization support must be enabled in the BIOS settings.
https://docs.docker.com/docker-for-windows/install/

Resources