Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 months ago.
Improve this question
I'm trying to scale my docker containers with Minikube on Windows 10 Enterprise Edition. However, I'm running into a few conflicts with Hyper-V and VirtualBox. I know Dockers require Hyper-V to run properly while Minikube requires VirtualBox to run (shows an error if Hyper-V is enabled)
C:\WINDOWS\system32>minikube start
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Downloading Minikube ISO
160.27 MB / 160.27 MB [============================================] 100.00%
0s
E0822 11:42:07.898412 13028 start.go:174] Error starting host: Error
creating host: Error executing step: Running precreate checks.
: This computer is running Hyper-V. VirtualBox won't boot a 64bits VM when
Hyper-V is activated. Either use Hyper-V as a driver, or disable the Hyper-V
hypervisor. (To skip this check, use --virtualbox-no-vtx-check).
If I disable, Hyper-V, I'm able to start minikube properly but Dockers does not work and shows an error to enable Hyper-V.
I also tried running minikube with Hyper-V driver, but also get this error:
C:\WINDOWS\system32>minikube start --vm-driver hyperv
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
E0822 11:44:32.323877 13120 start.go:174] Error starting host: Error
creating host: Error executing step: Running precreate checks.
: no External vswitch found. A valid vswitch must be available for this
command to run. Check https://docs.docker.com/machine/drivers/hyper-v/.
Any solution to this?
I also tried running minikube with Hyper-V driver, but also get this error:
There is an explicit warning about that HyperV and vswitch situation in their docs: https://github.com/kubernetes/minikube/blob/v0.28.2/docs/drivers.md#hyperv-driver
Although in minikube's defense, it also does say right at the end the URL one should go to in order to read about the --hyperv-virtual-switch flag one should provide in addition to --vm-driver=hyperv.
Navigating to that linked docker page, it even provides a step-by-step with screenshots example of how to accomplish that.
Next steps solved my problem:
> minikube start --vm-driver=hyperv -v 9999
If there is another error such
Error: [HYPERV_NO_VSWITCH] create: precreate: no External vswitch found. A valid vswitch must be available for this command to run
Just create a switch manually.
I have a similar problem and next command resolve the problem:
minikube delete
try this..
make sure docker is running
open Hyper-V Manager
go to Hyper Switch Manager
create a new virtual switch for internal use
name it for example switch01 then press apply or ok
then execute the following commands in cmd or power shell
minikube delete
minikube start --hyperv-virtual-switch=switch01
Related
This is the question regarding running Docker from within WSL, without Docker Desktop. It is doable for WSL2, so the focus of this question is on WSL1 specifically. Of my researches,
Some says "the Docker daemon cannot run directly on WSL", while
Another article says Docker can be run "seamlessly in Windows Subsystem Linux", with the help of Docker Community Edition 17.09.0, as "A crucial change was made to the WSL kernel that enables the usage of cgroups which Docker needs to manage your system’s resources into containers."
My docker is 20.10.5 under debian bullseye. Would it be still good?
I tried it, and got:
iptables can't initialize iptables table `nat': Table does not exist
and the answer to Iptables v1.6.1 can't initialize iptables table `filter' Ubuntu 18.04 Bash Windows is that,
According to the Microsoft WSL page on github.com, iptables isn't supported.
https://github.com/Microsoft/WSL/issues/767
But that's more than 4 years ago, and since it has been possible later in year 2019, I'm wondering what the latest status is.
WSL1 - The little engine that could (link included since that reference may only be understood by a limited audience).
Unfortunately, in the case of Docker, the WSL1 engine seems to have run out of steam. In reading that blog post that you reference, and the corresponding Github thread, I'm pretty amazed at just how far along folks did get with running Docker. I had never seen that before.
However, if you read the full comments on the Github thread, it appears that the results were fairly limited. Placing these excerpts in order:
[2018-04-23] I'm glad to say Docker daemon finally runs on WSL. I'm testing on build 17134. ... The last docker-ce version that works right now on build 17134 is 17.09.0. Anything after that fails on extracting the docker images.
Note that it had to (and still has to) be run in a WSL1 instance running as a Windows admin.
[2018-0612] Unfortunately, docker-compose still doesn't work.... There is a problem with iptables which is not fully supported via WSL yet.
(Which you've run into, although I didn't see that. Perhaps the "admin" thing?)
[2018-07-09] Yeah, I recently mentioned it on Twitter and got a major "we aren't supporting this, we highly advise against it" message from our former WSL PM.
[2018-11-13] WSL PM here. As mentioned in the above comment, we have improved Docker support in recent builds of WSL. Most (if not all) versions of docker-ce work with WSL. We're working on a large set of changes for WSL currently. As part of those changes, we are looking at adding native Docker support in WSL. I will add to this thread and other issues on Docker support when I have additional updates to share
It doesn't seem like this ever progressed, since the PM never posted again in the thread, at least.
[2019-04-18] Like others have pointed out, running docker 17.09 works. Anything later fails with different errors. It might be that newer docker versions are using other syscalls not yet implemented by WSL.
There are some other messages scattered in here about running with --network host (for the client) or --iptables=false (for the daemon).
[2019-08-04] Windows Insider Fast Ring build (>=18917) via WSL2, latest docker/docker-compose is running native in WSL Linux.
And in late 2020, the thread died off.
In a test WSL1 Ubuntu 20.04 instance, I was able to get hello-world running, but nothing more. Running a busybox or ubuntu image (with or without an interactive terminal) failed with:
Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: waiting for init preliminary setup: EOF: unknown.
Once the focused shifted to WSL2 and the real kernel, it doesn't appear to me that the WSL team has made any more progress advancing WSL1's pseudo-kernel syscall translation layer.
I just install docker on a windows 2019 server to run linux containers.
I follow the this guide, "Running Linux Containers on Windows Server 2019" chapter.
When i try to run the bash shell i got the following error:
docker.exe: failed to register layer: failed to start service utility
VM
(applydiffe53547ea1d150a4e4afba05378a3a45be5ea769d52fddf03ff25dbd09e43d20d):
container
e53547ea1d150a4e4afba05378a3a45be5ea769d52fddf03ff25dbd09e43d20d_svm
encountered an error during CreateContainer: failure in a Windows
system call: The virtual machine could not be started because a
required feature is not installed.
Anyone knows what feature is missing?
Update:
It seams the problem has to do with a first error on the procedure.
When running:
Get-VM WinContainerHost | Set-VMProcessor -ExposeVirtualizationExtensions $true
it throws the error:
Get-VM : Hyper-V was unable to find a virtual machine with name "ContainerHost".
Witch i discard believing that was a guide in the script because there is no command to create this WinContainerHost virtual machine anyware.
Solving is more confusing, there are 2 types of containers, hyper-v and server containers, as posted in this guide. I am not sure what path to follow. I am pretty lost.
This is going to sound really DUMB, and I mean DUMB.
I have fixed this issue and I just cannot believe there are questions asked everywhere without and answer.
Basically you need to just create a Virtual machine in Hyper-V. It doesn't need an operating system or any special params.
This is it
New-VM -Name WinContainerHost -MemoryStartupBytes 1GB
After this the Get-VM works, Docker starts and runs linux containers.
I mean, what can I say!!!
Sorry, I don't have enough reputation to comment/ask more information.
Hyper-V containers or Moby VM are mandatory when running Linux containers - virtualization is required to run those containers. So in this case, you can't use "server containers".
Enable VT-x e.g. virtualization from BIOS - mandatory for nested virtualization. With AWS you need Bare Metal instance.
If these are OK, you could you try already mentioned command
Get-VM *WinContainerHost* | Set-VMProcessor -ExposeVirtualizationExtensions $true
Instead, if they name differs a bit. If still no success, Get-VM command should list all VMs, what is the output?
You can install required modules for running LCOW with
Install-WindowsFeature -Name Hyper-V,Containers -IncludeAllSubFeature -IncludeManagementTools
And try again. If it still does not exist here is the script for creating "ContainerHost".
I ran Docker applications locally in an environment of Windows 10 Home, Oracle Virtualbox, The extension pack, Docker toolbox and Minishift.
Restarting after a few months, I get all kinds of errors. When I re-run minishift, I get a bunch of "OK's" and finally I get this message:
Starting Minishift VM .... FAIL E0807 20:29:20.950373 672
start.go:428] Error starting the VM: Error getting the state for host:
machine does not exist. Retrying.
The command is: $ minishift start --vm-driver=virtualbox --memory=3G
First, I start docker via the Docker Quickstart terminal. Because I can work with docker (and openshift) I know the environment is correct.
How can I get minishift run again?
Clean up using the following command:
minishift delete --clear-cache
Restarting minishift will recreate all necessary stuff.
It is possible that Minishift config contains wrong data. Reasons can be many, one them, for example, is that the VM got deleted via VirtualBox GUI and thus the Minishift has data about VM which does not exist. During the startup Minishift then asks for the status of VM, but VirtualBox cannot provide any information about it as it does not exist. In cases like this my workflow is:
Delete the VM (if there is any) using the hypervisor - for example VirtualBox GUI or KVM's virsh command,
Delete the Minishift home directory, located at %userprofile%\.minishift in case of Windows or ~/.minishift for Unix systems,
Try to start Minishift.
Please note that this is rather destructive way of getting over the problem and if you have valuable data on the VM then you might consider more gentle approaches.
I had the same issue. First clean up minishift cache:
minishift delete --clear-cache
Then launch minishift from its folder (do not use a path env). In my case:
d:\progs\minishift-1.34.2-windows-amd64\minishift start --vm-driver virtualbox
If you get stuck (minishift delete --clear-cache is not working) with the virtual switch applied, type the following to deactivate whatever is set in minishift config view
minishift config set save-start-flags false
Then continue what you started: e.g. minishift start --vm-driver virtualbox
I had the same problem.
My ubuntu machine is running as a VM in windows 10 host.
The below did not work because nested virtualization is by default not allowed in machines running as a guest.
minishift delete --clear-cache
After enabling virtualization engine in the vm settings, I was able to start minishift(after clearing cache ofcourse)
Try to start you virtual machine in you Hyper-V Administrator.
My error was minishift reserve 4Gb of Memory and my system hasn't enought.
Right click over your minishift virtual machine, configuration and get down the memory reserved.
I came to this issue trying to run minishift against an existing VM
Worked with the first VM, deleted that then attempted with a new VM, kept getting this problem and was not able to start the cluster even though it worked first time.
Had to delete the entire ~/.minishift folder and then it started with no issues ¯\_(ツ)_/¯
Ok, so here's my background first. I'm a noob in the world of commandline interfaces, but have been building websites off and on for a long time (10 yrs) using GUI's. So, I'm trying to make the switch to CLI's while also learning Docker.
Right now I'm stuck at trying to get Docker to load anything into my browser window. Here's what I've done successfully:
Installed Docker CE on my Windows 10 Machine
Setup a new virtual switch in Hyper-V Manager per these instructions and restarted the computer.
Created a new machine using this line of code docker-machine create -d hyperv --hyperv-virtual-switch "Primary Virtual Switch" manager1
Now here's where things get a little interesting. When I run the above function (I've done it twice now) it stalls on the line: Waiting for host to start...
I waited for five minutes to see if it would do anything, before killing the operation. (oh, did I mention I'm running PowerShell in Adminstrator Mode - right click on the icon to "run as administrator").
So when I re-open PowerShell to check if the new "manager1" machine has been created it comes back affirmative, but with this:
PS C:\WINDOWS\system32> docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
manager1 * hyperv Running Unknown IP not found
As far as I can tell these are the steps that I need to take to get Docker to run locally in my browser window, but for the life of me, I'm lost!
Oh, I did downgrade my docker-machine version per a suggestion that I read in a git forum comment, but that was to remedy an issue with the docker-machine create command. Part of me wonders if I'm doing too much. But I honestly don't know what to do next.
UPDATE:
I don't know that this is progress, but in the Virtual Switch Manager, I did switch the external network device from the "Ethernet Connection" to the "Dual Band Wireless" option. Then I restarted my machine. Now I'm showing that the state of the machine is "Timeout". I've also started and stopped my "docker-machine manager1". It sites on the (manager1) Waiting for host to start... line for about half a minute, then proceed to the Waiting for SSH to be available... where it just sits. Here's another screen shot that captures this:
Ok, my confusion was a result of looking beyond the documentation and getting a little confused. I still don't have this fully figured out but everything I was attempting to accomplish is detailed in this getting started with Windows 10 pro article.
I was trying Docker Desktop for Windows on a VM with Windows 10 Enterprise evaluation.
This is the error that I get:
I've searched round here but I haven't found nothing usefull. I have opened the log file and found error message like:
Failed to setup server socket listening on hyperv-connect://... Failed
to contact the database on \.\pipe\dockerDataBase.... File not found
Unable to write to database (continue like image above)
Nobody have idea? I've accepted the initial prompt when Docker asks me if I want to enable the Hyper-V feature and restart the computer after activation. Could it be a problem of nested virtualization?
I had the same problem and I solved it after I executed this command on a Powershell window:
bcdedit /set hypervisorlaunchtype Auto
I also had to enable CPU virtualization on the hardware properties of the virtual machine (I'm using VMWare vCenter, that might not be needed in your case)
The problem was the nested virtualization. Docker for Windows use Hyper-V behind the scene, Hyper-V was on the host machine too, so there's two nested virtual machine.
The steps are:
Create virtual machine named Docker (the one where Docker will be installed on) without dynamic memory allocation
Open Powershell and Set-VMProcessor -VMName "Docker" -ExposeVirtualizationExtensions $true
Install SO and Docker for Windows as usual
Be aware host machine and guest machine must share the same build number and both needs to be a Windows 10 or Windows Server 2016.