Reputation: 681
I've installed Docker and Docker Desktop on my Ubuntu 20.04 VM using this guide:
https://linuxiac.com/how-to-install-docker-desktop-on-ubuntu/
Everything is running, but my Docker Desktop app can't seem to connect to Docker itself.
service docker status
returns:
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2022-05-13 14:49:12 PDT; 4 days ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 1086 (dockerd)
Tasks: 18
Memory: 73.0M
CGroup: /system.slice/docker.service
└─1086 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Warning: some journal files were not opened due to insufficient permissions.
However, this is what I get when I try to configure things in Docker Desktop. When I click on settings, I get a perpetual loading spinner.
I've restarted docker with sudo service docker stop / start
I've clicked restart with the Docker Desktop dropdown menu on the top right of my Ubuntu Desktop.
I've added my user to the docker
group.
What steps can I take to debug this? Is there anything obvious I'm missing?
Thanks!
Upvotes: 16
Views: 52777
Reputation: 1205
In my case, I was getting the error "Docker Desktop stopped".
Then tried re-installed many times, but now getting the error "running VM: running VM and dependencies: running VM: running qemu: qemu: waiting for qemu process: exit status 1",
Finally, I noticed the virtualization was disabled in my BIOS, the option was called "SMV mode", but it might be different on your machine.
Now, Docker is working again.
Credits: https://stackoverflow.com/a/76655270/3779757
Upvotes: 0
Reputation: 41
This worked for me:
Open %AppData%\Docker\settings.json
and set
useWindowsContainers
: true
wslEngineEnabled
: true
Upvotes: 1
Reputation: 320
I had the same problem over Ubuntu
22.04 VM with Windows
11 as main host and Docker Desktop
4.9.0
If you are using Virtualbox
you need to enable nested virtualization support which is available on Windows on versions > 6.0. Also it's important to mention that you need to have disable the Hyper-V, Virtual Machine Platform and the Windows Hypervisor Platform otherwise it won't work.
In order to enable the Nested VT-X/AMD-V in VirtualBox and Windows you need to step by step guide on:
You need to open Windows Command line terminal by typing CMD on the bottom Search area. Once it shows up, right click on it and select Run as Administrator. This will open the command line terminal in the administrator mode.
Now, you need to go to VirtualBox folder using cd "Program Files\Oracle\VirtualBox"
command. This folder contains all the VirtualBox executables components along with other important files in which we need to use VBoxManage.
To enable the Nested VT-x/AMD-v in VirtualBox, you need to run VBoxManage modifyvm <vm_name> --nested-hw-virt on
syntax. EX. I am enabling it for my VM called 'Ubuntu 22.04' so I will use VBoxManage modifyvm "Ubuntu 22.04" --nested-hw-virt on
command.
You should test that KVM can be used so you can run the command kvm-ok
on Ubuntu shell
In order to install KVM, you need to do the following:
Next, run the command below to install KVM and additional virtualization packages on Ubuntu 22.04.
$ sudo apt install -y qemu-kvm virt-manager libvirt-daemon-system virtinst libvirt-clients bridge-utils
Let us break down the packages that we are installing:
Only members of kvm user groups can run virtual machines. Add a user to the kvm group by typing:
$ sudo adduser ‘<username>’ kvm
Then you need to stop and disable docker
$ sudo service docker stop
$ sudo systemctl disable docker.service
$ sudo systemctl disable docker.socket
Afterwards, you reboot and Docker Desktop is going to be setup
Upvotes: 11
Reputation: 5274
I had the same problem on Debian 11 and Docker Desktop 4.8.1
https://docs.docker.com/desktop/linux/install/#kvm-virtualization-support
https://github.com/canonical/multipass/issues/1085
Verify qty with
egrep -c '(svm|vmx)' /proc/cpuinfo
You need to stop and disable Docker.
$ sudo service docker stop
$ sudo systemctl disable docker.service
$ sudo systemctl disable docker.socket
Then, restart your linux and your Docker desktop.
Even more, if you run docker ps
as root user , you don't use docker desktop. You have another list of containers.
Be careful if you change "Setting-> Resources-> Advanced: Disk Image location" , you must not delete the default file 1.8G => home/YOUR_USER/.docker/desktop/vms/0/data/Docker.raw
You can change the path, but you need to keep that file in that location.
Docker desktop restart
Docker service status after reboot my computer
Full history:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
sudo usermod -aG docker YOUR_USER
sudo apt install gnome-terminal
sudo apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virtinst libvirt-daemon virt-manager -y
sudo usermod -aG kvm YOUR_USER
sudo apt autoremove
sudo apt install ./docker-desktop-4.8.1-amd64.deb
sudo systemctl disable docker.service
sudo systemctl disable docker.socket
Test VirtualBox VM - Ubuntu 20.04
Upvotes: 13
Reputation: 61
Docker needs virtualization for work. So, you can turn it on in BIOS. That worked for me
Upvotes: 6