Docker Container nvidia/k8s-device-plugin:1.9 Keeps Reporting Error - docker

I am trying to setup one small kubenertes cluster on my ubuntu 18.04 LTS server. Now every step is done, but checking the GPU status fails. The container keeps reporting errors:
1. Issue Description
I have done steps by Quick-Start, but when I run the test case, it reports error.
2. Steps to reproduce the issue
exec shell cmd
docker run --security-opt=no-new-privileges --cap-drop=ALL
--network=none -it -v /var/lib/kubelet/device-plugins:/var/lib/kubelet/device-plugins
nvidia/k8s-device-plugin:1.9
check the erros
2020/02/09 00:20:15 Starting to serve on
/var/lib/kubelet/device-plugins/nvidia.sock
2020/02/09 00:20:15 Could not register device plugin: rpc error: code = Unimplemented desc =
unknown service deviceplugin.Registration
2020/02/09 00:20:15 Could
not contact Kubelet, retrying. Did you enable the device plugin
feature gate?
2020/02/09 00:20:15 You can check the prerequisites at:
https://github.com/NVIDIA/k8s-device-plugin#prerequisites
2020/02/09
00:20:15 You can learn how to set the runtime at:
https://github.com/NVIDIA/k8s-device-plugin#quick-start
3. Environment Information
- outputs of nvidia-docker run --rm dlws/cuda nvidia-smi
NVIDIA-SMI 440.48.02 Driver Version: 440.48.02 CUDA Version: 10.2
outputs of nvidia-docker run --rm dlws/cuda nvidia-smi
NVIDIA-SMI 440.48.02 Driver Version: 440.48.02 CUDA Version: 10.2
contents of /etc/docker/daemon.json
contents:
{
"default-runtime": "nvidia",
"runtimes": {
"nvidia": {
"path": "nvidia-container-runtime",
"runtimeArgs": []
}
}
}
docker version: 19.03.2
kubernetes version: 1.15.2

Finally I found the answer, hope this post would be helpful for others who encounter the same issue:
For kubernetes 1.15, use k8s-device-plugin:1.11 instead. The version 1.9 is not able to communicate with kubelet.

Related

How to use vpnkit with minikube on mac

There are many question around this topic, but not the specific info I am after.
Host OS is Mac, and recently had to uninstall Docker Desktop due to their licensing change. So instead we have moved to minikube, and it is all working great with VirtualBox driver.
But ideally we would like to use the hyperkit driver, as it requires less resources than virtualbox, and is (anecdotally) faster. This also all works great until we connect to our VPN (using cisco anyconnect) and then all outbound networking from within the minikube VM stops working. e.g.
k8> minikube ssh "traceroute 8.8.8.8"
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 46 byte packets
1 host.minikube.internal (192.168.64.1) 0.154 ms 0.181 ms 0.151 ms
2 * * *
Everything else is is fine, inbound networking via ingress is all good. And maven-docker-plugin is happily creating images with the minikube docker daemon. Just nothing outbound.
So figured I'd try to work with VPNKit as I have read it is meant to address this issue. But cannot find a lot of detailed documentation, and so am struggling.
We have tried starting VPNKit with minimal config:
vpnkit --ethernet /tmp/vpkit-ethernet.socket --debug
And then attempt to start minikube, but it fails:
k8> minikube delete
🔥 Deleting "minikube" in hyperkit ...
💀 Removed all traces of the "minikube" cluster.
k8> minikube start --driver=hyperkit --hyperkit-vpnkit-sock=/tmp/vpnkit-ethernet.socket
😄 minikube v1.25.1 on Darwin 10.15.7
✨ Using the hyperkit driver based on user configuration
👍 Starting control plane node minikube in cluster minikube
🔥 Creating hyperkit VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
🔥 Deleting "minikube" in hyperkit ...
🤦 StartHost failed, but will try again: creating host: create: Error creating machine: Error in driver during machine creation: hyperkit crashed! command line:
hyperkit loglevel=3 console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes random.trust_cpu=on hw_rng_model=virtio base host=minikube
🔥 Creating hyperkit VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
😿 Failed to start hyperkit VM. Running "minikube delete" may fix it: creating host: create: Error creating machine: Error in driver during machine creation: hyperkit crashed! command line:
hyperkit loglevel=3 console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes random.trust_cpu=on hw_rng_model=virtio base host=minikube
❌ Exiting due to PR_HYPERKIT_CRASHED: Failed to start host: creating host: create: Error creating machine: Error in driver during machine creation: hyperkit crashed! command line:
hyperkit loglevel=3 console=ttyS0 console=tty0 noembed nomodeset norestore waitusb=10 systemd.legacy_systemd_cgroup_controller=yes random.trust_cpu=on hw_rng_model=virtio base host=minikube
💡 Suggestion: Hyperkit is broken. Upgrade to the latest hyperkit version and/or Docker for Desktop. Alternatively, you may choose an alternate --driver
🍿 Related issues:
▪ https://github.com/kubernetes/minikube/issues/6079
▪ https://github.com/kubernetes/minikube/issues/5780
And in the vpnkit log we see:
time="2022-02-14T06:07:57Z" level=debug msg="usernet: accepted vmnet connection"
time="2022-02-14T06:07:57Z" level=warning msg="Uwt: Pipe.listen: rejected ethernet connection: EOF"
time="2022-02-14T06:08:07Z" level=debug msg="usernet: accepted vmnet connection"
time="2022-02-14T06:08:07Z" level=warning msg="Uwt: Pipe.listen: rejected ethernet connection: EOF"
So kind of implies something is not right with how I started vpnkit. Have played with IP args to ensure it all matches, but does not help.
My guess is that the --ethernet=path arg is not the right type of socket. I have seen there is also --vsock-path=path but specifying this does not appear to create the socket file like --ethernet=path does. Do I have to create this some other way?
Or are there other config options I need to mess with. e.g. I thought --gateway-forwards=path could help, but can find no documentation on file format or contents.
So, I guess two main questions:
Is what we are trying even possible? Is it the the right way to go about it? Or is it much more complicated than simply running the vpnkit command?
If we are on the right track, does anyone have experience with this, and know how to set up the socket for minikube+vpnkit+hyperkit? What args, config, or other setup is required?
And just to note: --hyperkit-vpnkit-sock=auto is not an option for us, as we do not have docker installed, and so the docker socket file does not exist.
And just in case its a version issue:
k8> minikube version
minikube version: v1.25.1
commit: 3e64b11ed75e56e4898ea85f96b2e4af0301f43d
k8> vpnkit --version
854498c13b1884d4a48d84f3569eb34681af2126
k8> hyperkit -v
hyperkit: 0.20200908
Homepage: https://github.com/docker/hyperkit
License: BSD

cannot run gazebo9 on docker with privileged on ubuntu 18.04

I am stuck on this for quite a while now i have tried searching and trying stuff but i am getting nowhere.
My setup is as follows:
Host
linux Distro: Archlinux
kernel version: 5.14.2
docker version: 20.10.8, build 3967b7d28e
nvidia driver version: 470.63.01-1
nvidia container toolkit version: 1.5.0-2 , cgroups disabled.
amd gpu driver: xf86-video-amdgpu 21.0.0-1
Container
base image: ubuntu:18.04
command line : docker run -it --rm --privileged --gpus all -e DISPLAY=$DISPLAY -e XAUTHORITY=~/.Xauthority --network host --volume /tmp/.X11-unix/:/tmp/.X11-unix --volume $XAUTHORITY:/root/.Xauthority gazebo:libgazebo9-bionic gazebo
Expected results
expected gazebo window to open with hardware acceleration, using privileged access.
Actual results
On using --privileged:
si_init_perfcounters: max_sh_per_se = 2 not supported (inaccurate performance counters)
X Error of failed request: BadAlloc (insufficient resources for operation)
Major opcode of failed request: 149 ()
Minor opcode of failed request: 2
Serial number of failed request: 35
Current serial number in output stream: 36
Without --privileged and specifying graphic cards in --device manually:
gazebo window opens up with hardware acceleration and works smoothly as expected.
Detailed description
I was actually trying to run gazebo version 9 in a custom image which i had created using ubuntu:18.04 as base image. i referred to gazebo:libgazebo9-bionic,nvidia/cuda:11.4.1-cudnn8-devel-ubuntu18.04 and ros:melodic-desktop while writing the dockerfile. i even tried the same thing for gazebo 11 on the same base image and got the same issue as above. Whereas the exactly similar setup for ubuntu foxy works smoothly. i really need to use privileged because i am going to be working on hardware for a lot of time. please help me on how should this be fixed. thanks alot
P.S. Other GUI applications (rviz,moveit,etc) are running without any issues. Im getting this issue with gazebo only.
Ok found the solution!
Gazebo was working on osrf/ros:noetic-desktop-full but not on osrf/ros:melodic-desktop-full.
I got the exact same error:
X Error of failed request: BadAlloc (insufficient resources for operation)
X Error of failed request: BadAlloc (insufficient resources for operation)
Major opcode of failed request: 149 ()
The solution was to update the MESA drivers on the ros:melodic image from version Mesa 20.0.8 to Mesa 22.0.2.
sudo add-apt-repository ppa:kisak/kisak-mesa -y
sudo apt update
sudo apt upgrade -y
If you want to check your current Mesa version:
sudo apt install mesa-utils
glxinfo | grep Mesa

Hyperledger fabric first network error executing ./byfn.sh: line 175: docker-compose: command not found

I have the following prerequisites node v10.16.3, go v1.8.1 linux/amd64, Docker Podman v1.0.5, Docker-compose 1.24.1. All are included in path. When I execute "sudo ./byfn.sh up" I'm able to generate the crypto certificates without issues- However error "docker-compose: command not found
" comes in Line 175 when docker-compose is executed in NetworkUp. Tried uninstalling Docker and reinstalling and couldnt find anything relevant in stackflow as well - can someone pl bail me out ?
error
./byfn.sh: line 175: docker-compose: command not found
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Additional info
host:
BuildahVersion: 1.6-dev
Conmon:
package: podman-1.0.5-1.gitf604175.module+el8.0.0+4017+bbba319f.x86_64
path: /usr/libexec/podman/conmon
version: 'conmon version 1.14.0-dev, commit: 6ee5ad0285ca12e6c8d0b663d7a8db5323812ef6-dirty'
Distribution:
distribution: '"rhel"'
version: "8.0"
kernel: 4.18.0-80.4.2.el8_0.x86_64
os: linux

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/

Docker on RHEL 6 Cgroup mounting failing

I'm trying to get my head around something that's been working on a Centos+Vagrant, but not on our providers RHEL (Red Hat Enterprise Linux Server release 6.5 (Santiago)). A sudo service docker restart hands this:
Stopping docker: [ OK ]
Starting cgconfig service: Error: cannot mount cpuset to /cgroup/cpuset: Device or resource busy
/sbin/cgconfigparser; error loading /etc/cgconfig.conf: Cgroup mounting failed
Failed to parse /etc/cgconfig.conf [FAILED]
Starting docker: [ OK ]
The service starts okey enough, but images cannot run. A mounting failed error is shown when I try. And the startup-log also gives a warning or two. Regarding the kernelwarning, centos gives the same and has no problems as Epel should resolve this:
WARNING: You are running linux kernel version 2.6.32-431.17.1.el6.x86_64, which might be unstable running docker. Please upgrade your kernel to 3.8.0.
2014/08/07 08:58:29 docker daemon: 1.1.2 d84a070; execdriver: native; graphdriver:
[1233d0af] +job serveapi(unix:///var/run/docker.sock)
[1233d0af] +job initserver()
[1233d0af.initserver()] Creating server
2014/08/07 08:58:29 Listening for HTTP on unix (/var/run/docker.sock)
[1233d0af] +job init_networkdriver()
[1233d0af] -job init_networkdriver() = OK (0)
2014/08/07 08:58:29 WARNING: mountpoint not found
Anyone had any success overcoming this problem or should I throw in the towel and wait for the provider to update to RHEL 7?
I have the same issue.
(1) check cgconfig status
# /etc/init.d/cgconfig status
if it stopped, restart it
# /etc/init.d/cgconfig restart
check cgconfig is running
(2) check cgconfig is on
# chkconfig --list cgconfig
cgconfig 0:off 1:off 2:off 3:off 4:off 5:off 6:off
if cgconfig is off, turn it on
(3) if still does not work, may be some cgroups modules is missing. In the kernel .config file, make menuconfig, add those modules into kernel and recompile and reboot
after that, it should be OK
I ended up asking the same question at Google Groups and in the end finding a solution with some help. What worked for me was this:
umount cgroup
sudo service cgconfig start
The project of making Docker work was put on halt all the same. Later a problem of network connection for the containers. This took to much time to solve and had to give up.
So I spent the whole day trying to rig docker to work on my vps. I was running into this same error. Basically what it came down to was the fact that OpenVZ didn't support docker containers up until a couple months ago. Specifically this RHEL update:
https://openvz.org/Download/kernel/rhel6/042stab105.14
Assuming this is your problem, or some variation of it, the burden of solving it is on your host. They will need to follow these steps:
https://openvz.org/Docker_inside_CT
In my case
/etc/rc.d/rc.cgconfig start
was generating
Starting cgconfig service: Error: cannot mount cpu,cpuacct,memory to
/cgroup/cpu_and_mem: Device or resource busy /usr/sbin/cgconfigparser;
error loading /etc/cgconfig.conf: Cgroup mounting failed Failed to
parse /etc/cgconfig.conf
i had to use:
/etc/rc.d/rc.cgconfig restart
and it automagicly umouted and mounted groups
Stopping cgconfig service: Starting cgconfig service:
it seems like the cgconfig service not running,so check it!
# /etc/init.d/cgconfig status
# mkdir -p /cgroup/cpuacct /cgroup/memory /cgroup/devices /cgroup/freezer net_cls /cgroup/blkio
# cat /etc/cgconfig.conf |tail|grep "="|awk '{print "mount -t cgroup -o",$1,$1,$NF}'>cgroup_mount.sh
# sh ./cgroup_mount.sh
# /etc/init.d/cgconfig restart
# /etc/init.d/docker restart
This situation occurs when the kernel is booted with cgroup_disable=memory and /etc/cgconfig.conf contains memory = /cgroup/memory;
This causes only /cgroup/cpuset to be mounted instead of the full set.
Solution: either remove cgroup_disable=memory from your kernel boot options or comment out memory = /cgroup/memory; from cgconfig.conf.
The cgconfig service startup uses mount and umount which requires an extra privilege bump from docker.
See the --privileged=true flag here for more info.
I was able to overcome this issue by starting my container with:
docker run -it --privileged=true my-image.
Tested in Centos6, Centos6.5.

Resources