Can not start Docker 1.9.1 - docker

I am a newbie about docker.
This morning I have just download and install docker 1.9.1 to my computer (OS: windows)
After install it, I run 'Docker Quickstart Terminal' but it fail
The console keep print like this:
Machine default already exists in VirtualBox.
Starting machine default...
(default) Starting VM...
Machine "default" was started.
Started machines may have new IP addresses. You may need to re-run the `docker-m
achine env` command.
Regenerate TLS machine certs? Warning: this is irreversible. (y/n): Regeneratin
g TLS certificates
Detecting the provisioner...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Setting environment variables for machine default...
Looks like something went wrong... Press any key to continue...
I have tried to remove the Virtual Machine and create it again, but the problem still happen
Creating Machine default...
Running pre-create checks...
Creating machine...
(default) Copying C:\Users\mcthanh\.docker\machine\cache\boot2docker.iso to C:\U
sers\mcthanh\.docker\machine\machines\default\boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) Starting VM...
Waiting for machine to be running, this may take a few minutes...
Machine is running, waiting for SSH to be available...
Detecting operating system of created instance...
Detecting the provisioner...
Provisioning with boot2docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect Docker to this machine, run: C:\Program Files\Docker Toolb
ox\docker-machine.exe env default
Setting environment variables for machine default...
Looks like something went wrong... Press any key to continue...
Do you have any exp about this?
Thank you very much for your help!!!

After a sleep / wake cycle, Windows detects the Host-Only network as a "duplicate" and changes its IP. After that, docker-machine (or the Quickstart terminal) doesn't work anymore.
It is probably caused by this VirtualBox bug (from 5 years ago): so there doesn't seem to be a fix soon from VirtualBox. And it's probably a Windows bug.
This should be a valid workaround:
Open VirtualBox
Go to File -> Preferences -> Network -> Host-only Networks
Docker Toolbox probably created a second Host-only network, probably named "VirtualBox Host-Only Ethernet Adapter # 2", double click that
Change the "IPv4 Address" from something like 192.168.99.1 to something like 192.168.99.2 (you will probably have to increase / decrease the IP every time). But it's important that the IP actually changes.
Hit OK. If the IP changed (it should have changed), you will be prompted for you "Windows Administrator OK" (or however it's named).
After that, the docker-machine and the Quickstart Terminal should work.

Sometimes we have virtualization disabled in our system make sure that
virtualization is enabled or not ?
follow given steps to check if u have virtualization enabled or not
Open Task manager
Click on performance
Click on CPU
Check whether virtualization is enabled or not
If it is disabled then go to bios setting and enable it.

Related

My Docker is crashing in Windows 10 Enterprise - (Docker hv-sock proxy (vsudd) is not reachable)

I am using a Windows 10 Enterprise edition system. I have installed version: 17.03.1-ce-rc1-win3 (10625) Channel: edge . The Docker machine was working fine until a few days back. Few days back I had disable Hyper-V in my system to use Oracle Virtual box to use Kubernetes and as a fact when hyper-V is disabled Docker won't run so I turned it back on and now it's crashing all the time and I am getting the below error.
[16:24:15.562][NamedPipeServer][Error ] Unable to execute Start: Docker hv-sock proxy (vsudd) is not reachable at Docker.Backend.ContainerEngine.Linux.ConnectToVsud(TaskCompletionSource`1 vmId)
at Docker.Backend.ContainerEngine.Linux.DoStart(Settings settings)
at Docker.Backend.ContainerEngine.Linux.Start(Settings settings)
at Docker.Core.Pipe.NamedPipeServer.<>c__DisplayClass8_0.<Register>b__0(Object[] parameters)
at Docker.Core.Pipe.NamedPipeServer.RunAction(String action, Object[] parameters)
[16:24:15.599][CrashReport ][Info ] Preparing package to send with the diagnostics
I uninstalled and installed Docker again but no vain and still getting error.
After a lot of tries with different combination the below final steps took care of my issue and my docker is running again.
Steps taken to resolve the issue :-
Uninstalled Docker from my system and deleted the .docker and 'Virtual Hard Disk' directory which usually has the mobyLinuXVM file.
Uninstalled Oracle virtual Box from my machine.
Restarted my system and went to BIOS and unchecked/disabled the Virtualization options and logged into my system to see if virtualization is disabled using command systemInfo in cmd prompt and it was disabled.
Restarted my system again and went to BIOS and checked/enabled the virtualization option and logged into my system and made the virtualization was enabled back.
Installed again the docker and it was a charm and it started running.
The above steps may sound lame but it worked.

Minishift - cannot start - Error starting the VM: Error getting the state for host: machine does not exist

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 ¯\_(ツ)_/¯

Docker for Windows can't reach the database in Windows 10 enterprise evaluation

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.

'nutc': unknown terminal type. docker

I have a windows 7 box. I am trying to run Docker quickstart. It keeps dying with the following error...
Starting "default"...
(default) Check network to re-create if needed...
(default) Waiting for an IP...
Machine "default" was started.
Waiting for SSH to be available...
Detecting the provisioner...
Started machines may have new IP addresses. You may need to re-run the `docker-m
achine env` command.
Regenerate TLS machine certs? Warning: this is irreversible. (y/n): Regeneratin
g TLS certificates
Waiting for SSH to be available...
Detecting the provisioner...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
'nutc': unknown terminal type.
Looks like something went wrong in step ´Finalize´... Press any key to continue.
On doing a search on the internet I can see that some people have suggested commenting out clear in start.sh which I have also tried but doesn't seem to fix the problem.
Has anyone got any ideas on how I might get past this?
thanks
Solution for Windows 7 Docker ToolBox:
cd to installed folder Ex: "C:\Program Files\Docker Toolbox"
then, type "bash" and enter
run "./start.sh"
hope it works.
It breaks on the "clear" command in the start.sh script (corresponding to the "Docker quickstart Terminal" icon)
If you comment the clear command just after STEP="Finalize"
adding a # like that
#clear
At least like taht the it will run.
Personnally my terminal has then problems with backspace key and arrows keys.

Vagrant file resync: Vagrant Box does not update new content in text editor

I don't know real detailed specifics about vagrant settings but after I tried to resync my box when it started up. The vagrant box won't update the content I changed from my text editor to the box after the box is booted and before it is stopped and rebooted again. The command I used is below:
config.vm.synced_folder ".", "/vagrant", type: "rsync"
I needed to resync because my rails server is running slowly on my machine locally. I was wondering:
1) Is this the behavior expected?
2) Are there other options to speed up my rails server so it doesn't take 1 second for every javascript file to load?
With your configuration you'll need:
$ vagrant up
$ vagrant rsync-auto
And at other terminal you can do:
$ vagrant ssh
And your app folder must be updated on virtual machine when you change at your develop environment.
But, I config my sync folders with Vagrant basic usage, it means without type option (let vagrant chose the best type, also it keeps sync):
config.vm.synced_folder ".", "/vagrant"
And I use one terminal for vagrant stuff, with only these commands:
$ vagrant up
$ vagrant ssh
Answer 1) If you need use rsync, yes this is the behavior expected: folders will not been updated unless you start vagrant rsync-auto (I've tested this option)
Answer 2) You must expect a degradation on performance running a virtual machine, because you had limited some memory and cpu processors (unless you are running on Windows OS -I don't test it-).
Please make sure:
rsync.exe on the path
The rsync or rsync-auto command is used to start vagrant, Without running these commands, Vagrant only syncs the folders on vagrant up or vagrant reload

Resources