Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Error creating machine: Error detecting OS: OS type not recognized #3586

Open
SplicePHP opened this issue Jul 17, 2016 · 15 comments
Open

Error creating machine: Error detecting OS: OS type not recognized #3586

SplicePHP opened this issue Jul 17, 2016 · 15 comments

Comments

@SplicePHP
Copy link

Hi,
I am unable to create default on a fresh install of windows 64.
Extensive google searches turned up nothing helpful on the topic.

Hardware specs:
Asus H170-Plus D3, Intel G4400 (3.3 dual core), 14 gig 1333 ddr3, ATI 6800 Eyefinity.
( Internet over Ethernet cable with no proxies. )

Software:
Windows 10 pro 64bit, fresh install and updated drivers.
Docker for Windows beta. [ Docker starts successfully ]
Docker Toolbox.
Kitematic
Cygwin with OpenSSH.
Hyper-V enabled.
( Currently no anti-virus or firewall installed )

Powershell output

PS C:\Users\USERNAME> docker-machine create --driver hyperv default
Running pre-create checks...
Creating machine...
(default) Copying C:\Users\USERNAME\.docker\machine\cache\boot2docker.iso to C:\Users\USERNAME\.docker\machine\machines\default\boot2docker.iso...
(default) Creating SSH key...
(default) Creating VM...
(default) Using switch "DockerNAT"
(default) Creating VHD
(default) Starting VM...
(default) Waiting for host to start...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Error creating machine: Error detecting OS: OS type not recognized
PS C:\Users\USERNAME>

Footnote
The first time docker runs I get this error:

Docker daemon is not running
   at Docker.Core.Pipe.NamedPipeClient.TrySend(String action, Object[] parameters)
   at Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters)
   at Docker.Core.Backend.BackendClient.Start(Settings settings)
   at Docker.Actions.DoStart(Settings settings, Boolean showWelcomeWindow)
   at Docker.Actions.<ResetToDefault>b__18_0()
   at Docker.Core.TaskQueue.<.ctor>b__16_0()

After a reboot the error goes away and docker starts without showing any errors.

Thanks.

@getglad
Copy link

getglad commented Jul 25, 2016

Were you able to fix? I have same error Win Server 2012

@SplicePHP
Copy link
Author

Nope, I decided to trash windows and install Linux as my primary operating system and haven't looked back. Good luck getting it working.

@henry-infevo
Copy link

@SplicePHP You need to follow this blog to enable external switch (e.g: Virtual Switch (Main)) and then your command will look like that: docker-machine create --driver hyperv --hyperv-virtual-switch "Virtual Switch (Main)" default

Hope it works.
Thanks.

@kimcuhoang
Copy link

kimcuhoang commented Aug 6, 2016

@Jkaveri
It works. Thanks!!

For more information, the default Virtual Switch of Docker named DockerNat.
The main purpose of this step is to configure the external of docker-machine by using real wifi device, I think.
And the root cause of this error is docker-machine cannot connect with boot2docker.

image

@JustinJKlein
Copy link

I ran into the same issue as well and this got me running too. Thanks! Docker on WIN 10!

**When selecting external network connection type make sure that you point to Intel gigabit network connection. Mine defaulted to my network adaptor and caused some crashes when calling out to the internet before I found it.

@MatrixManAtYrService
Copy link

MatrixManAtYrService commented Oct 9, 2016

I ran into this error on Windows Server 2016. I struggled initially because I hadn't installed the Hyper-V management console--just the Hyper-V service itself. I ultimately resolved it by doing as @Jkaveri said, but via powershell. It looked like this:

PS C:\WINDOWS\system32> netsh interface ipv4 show interfaces

Idx     Met         MTU          State                Name
---  ----------  ----------  ------------  ---------------------------
  1          75  4294967295  connected     Loopback Pseudo-Interface 1
 10          25        1500  disconnected  Wi-Fi
 22          35        1500  connected     Ethernet
 15          25        1500  disconnected  Local Area Connection* 12
 11          15        1500  connected     vEthernet (HNS Internal NIC)
 21          25        1500  connected     VirtualBox Host-Only Network

PS C:\WINDOWS\system32> New-VMSwitch -name ExternalSwitch -NetAdapterName Ethernet -AllowManagementOS $true

Name           SwitchType NetAdapterInterfaceDescription
----           ---------- ------------------------------
ExternalSwitch External   ASIX AX88179 USB 3.0 to Gigabit Ethernet Adapter

PS C:\WINDOWS\system32> docker-machine create --driver hyperv --hyperv-virtual-switch "ExternalSwitch" --hyperv-memory 1024 --hyperv-cpu-count 2 linHost
Running pre-create checks...
Creating machine...
(linHost) Copying C:\Users\mrixman\.docker\machine\cache\boot2docker.iso to C:\Users\mrixman\.docker\machine\machines\linHost\boot2docker.iso...
(linHost) Creating SSH key...
(linHost) Creating VM...
(linHost) Using switch "ExternalSwitch"
(linHost) Creating VHD
(linHost) Starting VM...
(linHost) Waiting for host to start...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
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!

@Ravi-Macha
Copy link

Ravi-Macha commented Oct 9, 2016

I was facing same issue,,, now FIXED..!!
1.docker-machine create --driver hyperv default
Error with pre-create check: "no vswitch found. A valid vswitch must be available for this command to run. Check https://docs.docker.com/machine/drivers/hyper-v/"

Solved by referring @ MatrixManAtYrService , but WIFI network got disconnected

C:\WINDOWS\system32>netsh interface ipv4 show interfaces

C:\WINDOWS\system32>New-VMSwitch -name ExternalSwitch -NetAdapterName Ethernet -AllowManagementOS $true

C:\WINDOWS\system32>docker-machine create --driver hyperv --hyperv-virtual-switch "ExternalSwitch" --hyperv-memory 1024 --hyperv-cpu-count 2

@igoralves1
Copy link

windows crap

@mmxmb
Copy link

mmxmb commented Oct 31, 2017

I fixed this issue by connecting the virtual switch through an Ethernet connection in Hyper-V Manager. Connecting through wireless was causing the OS type not recognized error. The wireless signal goes through VPN so maybe this was causing the issue.

@Manish22332
Copy link

How long does it take to create the machine? Its stuck at "waiting for host to start"

@drungrin
Copy link

  1. Install git to get git bash
  2. run the commans from git bash

Unbelievable, but this is the solution

@timothy2005
Copy link

I have also encounter this issue,
I guess the root cause is: I did not stop minikube correctly.
Because I met following error when I tried to stop it
error stopping host: minikube: exit status 1
then I stopped it by running: minikube ssh and sudo poweroff
then when I tried to start minikube, I met OS type not recognized
I fixed it like below:
Turn off minikube vm in hyper-v and start minikube again

@chanjamin
Copy link

@Jkaveri
It works. Thanks!!

For more information, the default Virtual Switch of Docker named DockerNat.
The main purpose of this step is to configure the external of docker-machine by using real wifi device, I think.
And the root cause of this error is docker-machine cannot connect with boot2docker.

image

is that extranl device is wifi device causing this promble?

@chanjamin
Copy link

god knows what happend,i swicth the external device of the virtual switch and then swith it back.then works fine

@chanjamin
Copy link

@Jkaveri
It works. Thanks!!

For more information, the default Virtual Switch of Docker named DockerNat.
The main purpose of this step is to configure the external of docker-machine by using real wifi device, I think.
And the root cause of this error is docker-machine cannot connect with boot2docker.

image

@kimcu-on-thenet
figure it out. some wifi device seems not so compatible with docker-machine.i change external switch to even iphone enthernet provider and everything works fine.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests