microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.03k stars 798 forks source link

WslRegisterDistribution failed with error: 0xffffffff #4364

Closed alexey-gusarov closed 5 months ago

alexey-gusarov commented 4 years ago

Please fill out the below information:

PS C:\WINDOWS\system32> wsl --list Windows Subsystem for Linux Distributions: Ubuntu (Default)

PS C:\WINDOWS\system32> wsl --list --verbose NAME STATE VERSION

PS C:\WINDOWS\system32> WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

FeatureName : Microsoft-Windows-Subsystem-Linux DisplayName : Windows Subsystem for Linux Description : Provides services and environments for running native user-mode Linux shells and tools on Windows. RestartRequired : Possible State : Enabled CustomProperties : ServerComponent\Description : Provides services and environments for running native user-mode Linux shells and tools on Windows. ServerComponent\DisplayName : Windows Subsystem for Linux ServerComponent\Id : 1033 ServerComponent\Type : Feature ServerComponent\UniqueName : Microsoft-Windows-Subsystem-Linux ServerComponent\Deploys\Update\Name : Microsoft-Windows-Subsystem-Linux

PS C:\WINDOWS\system32> wsl --unregister ubuntu Unregistering...

PS C:\WINDOWS\system32> ubuntu Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0xffffffff Error: 0xffffffff (null) Press any key to continue...

See our contributing instructions for assistance.

wsl.zip

alexey-gusarov commented 4 years ago

For google indexing

<Data Name="file">onecore\vm\wsl\lxss\service\lib\utilityvmcontext.cpp</Data>
<Data Name="linenumber"> 1196</Data>
<Data Name="type"> 0</Data>
<Data Name="failurecount">26</Data>
<Data Name="threadid"> 20132</Data>
<Data Name="hr">0xFFFFFFFF</Data>
<Data Name="message"/>
<Data Name="code"/>
<Data Name="function"/>
<Data Name="file">onecore\vm\wsl\lxss\service\lib\utilityvmcontext.cpp</Data>
<Data Name="linenumber"> 1183</Data>
<Data Name="type"> 0</Data>
<Data Name="failurecount">25</Data>
<Data Name="threadid"> 20132</Data>
<Data Name="hr">0xFFFFFFFF</Data>
<Data Name="message">HcnCreateNetwork failed (null)</Data>
<Data Name="code"/>
<Data Name="function"/>
alexey-gusarov commented 4 years ago
HcnCreateNetwork failed (null)
Log Name:      System
Source:        Microsoft-Windows-Hyper-V-VmSwitch
Date:          01.08.2019 8:32:36
Event ID:      233
Task Category: None
Level:         Information
Keywords:      (128)
User:          SYSTEM
Computer:      nc
Description:
The operation 'Delete' succeeded on nic A02CEDA8-C5D8-4D31-8771-08945EDF7CE8 (Friendly Name: WSL).
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Hyper-V-VmSwitch" Guid="{67dc0d66-3695-47c0-9642-33f76f7bd7ad}" />
    <EventID>233</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000080</Keywords>
    <TimeCreated SystemTime="2019-08-01T05:32:36.956025600Z" />
    <EventRecordID>2641</EventRecordID>
    <Correlation />
    <Execution ProcessID="612" ThreadID="10152" />
    <Channel>System</Channel>
    <Computer>nc</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="NicNameLen">36</Data>
    <Data Name="NicName">A02CEDA8-C5D8-4D31-8771-08945EDF7CE8</Data>
    <Data Name="NicFNameLen">3</Data>
    <Data Name="NicFName">WSL</Data>
    <Data Name="Operation">8</Data>
  </EventData>
</Event>

Log Name:      System
Source:        Microsoft-Windows-Hyper-V-VmSwitch
Date:          01.08.2019 8:32:36
Event ID:      234
Task Category: None
Level:         Information
Keywords:      (128)
User:          SYSTEM
Computer:      nc
Description:
NIC A02CEDA8-C5D8-4D31-8771-08945EDF7CE8 successfully disconnected from port A02CEDA8-C5D8-4D31-8771-08945EDF7CE8.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Hyper-V-VmSwitch" Guid="{67dc0d66-3695-47c0-9642-33f76f7bd7ad}" />
    <EventID>234</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000080</Keywords>
    <TimeCreated SystemTime="2019-08-01T05:32:36.955890900Z" />
    <EventRecordID>2640</EventRecordID>
    <Correlation />
    <Execution ProcessID="612" ThreadID="10152" />
    <Channel>System</Channel>
    <Computer>nc</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="NicNameLen">36</Data>
    <Data Name="NicName">A02CEDA8-C5D8-4D31-8771-08945EDF7CE8</Data>
    <Data Name="PortNameLen">36</Data>
    <Data Name="PortName">A02CEDA8-C5D8-4D31-8771-08945EDF7CE8</Data>
  </EventData>
</Event>

Log Name:      System
Source:        Microsoft-Windows-Hyper-V-VmSwitch
Date:          01.08.2019 8:32:36
Event ID:      233
Task Category: None
Level:         Information
Keywords:      (128)
User:          SYSTEM
Computer:      nc
Description:
The operation 'Delete' succeeded on nic 0D7F979E-6AB7-4B69-82B4-9BC9EA824FE8 (Friendly Name: WSL).
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Hyper-V-VmSwitch" Guid="{67dc0d66-3695-47c0-9642-33f76f7bd7ad}" />
    <EventID>233</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000080</Keywords>
    <TimeCreated SystemTime="2019-08-01T05:32:36.845094800Z" />
    <EventRecordID>2639</EventRecordID>
    <Correlation />
    <Execution ProcessID="612" ThreadID="10152" />
    <Channel>System</Channel>
    <Computer>nc</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="NicNameLen">36</Data>
    <Data Name="NicName">0D7F979E-6AB7-4B69-82B4-9BC9EA824FE8</Data>
    <Data Name="NicFNameLen">3</Data>
    <Data Name="NicFName">WSL</Data>
    <Data Name="Operation">8</Data>
  </EventData>
</Event>

Log Name:      System
Source:        Microsoft-Windows-Hyper-V-VmSwitch
Date:          01.08.2019 8:32:36
Event ID:      234
Task Category: None
Level:         Information
Keywords:      (128)
User:          SYSTEM
Computer:      nc
Description:
NIC 0D7F979E-6AB7-4B69-82B4-9BC9EA824FE8 successfully disconnected from port .
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Hyper-V-VmSwitch" Guid="{67dc0d66-3695-47c0-9642-33f76f7bd7ad}" />
    <EventID>234</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000080</Keywords>
    <TimeCreated SystemTime="2019-08-01T05:32:36.104798800Z" />
    <EventRecordID>2638</EventRecordID>
    <Correlation />
    <Execution ProcessID="612" ThreadID="10152" />
    <Channel>System</Channel>
    <Computer>nc</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="NicNameLen">36</Data>
    <Data Name="NicName">0D7F979E-6AB7-4B69-82B4-9BC9EA824FE8</Data>
    <Data Name="PortNameLen">1</Data>
    <Data Name="PortName">
    </Data>
  </EventData>
</Event>

Log Name:      System
Source:        Microsoft-Windows-Hyper-V-VmSwitch
Date:          01.08.2019 8:32:35
Event ID:      232
Task Category: None
Level:         Information
Keywords:      (128)
User:          SYSTEM
Computer:      nc
Description:
NIC 0D7F979E-6AB7-4B69-82B4-9BC9EA824FE8 (Friendly Name: WSL) successfully connected to port 611D7FCC-8F7C-4D8A-B353-249740E3A0C3 (Friendly Name: Container NIC 4190d08a) on switch A02CEDA8-C5D8-4D31-8771-08945EDF7CE8(Friendly Name: WSL).
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Hyper-V-VmSwitch" Guid="{67dc0d66-3695-47c0-9642-33f76f7bd7ad}" />
    <EventID>232</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000080</Keywords>
    <TimeCreated SystemTime="2019-08-01T05:32:35.919106000Z" />
    <EventRecordID>2637</EventRecordID>
    <Correlation />
    <Execution ProcessID="612" ThreadID="10152" />
    <Channel>System</Channel>
    <Computer>nc</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="NicNameLen">36</Data>
    <Data Name="NicName">0D7F979E-6AB7-4B69-82B4-9BC9EA824FE8</Data>
    <Data Name="NicFNameLen">3</Data>
    <Data Name="NicFName">WSL</Data>
    <Data Name="PortNameLen">36</Data>
    <Data Name="PortName">611D7FCC-8F7C-4D8A-B353-249740E3A0C3</Data>
    <Data Name="PortFNameLen">22</Data>
    <Data Name="PortFName">Container NIC 4190d08a</Data>
    <Data Name="SwitchNameLen">36</Data>
    <Data Name="SwitchName">A02CEDA8-C5D8-4D31-8771-08945EDF7CE8</Data>
    <Data Name="SwitchFNameLen">3</Data>
    <Data Name="SwitchFName">WSL</Data>
  </EventData>
</Event>

Log Name:      System
Source:        Microsoft-Windows-Hyper-V-VmSwitch
Date:          01.08.2019 8:32:35
Event ID:      7
Task Category: (1004)
Level:         Information
Keywords:      (128)
User:          SYSTEM
Computer:      nc
Description:
Miniport NIC 0D7F979E-6AB7-4B69-82B4-9BC9EA824FE8 (Friendly Name: WSL) successfully initialized.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Hyper-V-VmSwitch" Guid="{67dc0d66-3695-47c0-9642-33f76f7bd7ad}" />
    <EventID>7</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>1004</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000080</Keywords>
    <TimeCreated SystemTime="2019-08-01T05:32:35.839276600Z" />
    <EventRecordID>2636</EventRecordID>
    <Correlation />
    <Execution ProcessID="612" ThreadID="10152" />
    <Channel>System</Channel>
    <Computer>nc</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="NicNameLen">36</Data>
    <Data Name="NicName">0D7F979E-6AB7-4B69-82B4-9BC9EA824FE8</Data>
    <Data Name="NicFNameLen">3</Data>
    <Data Name="NicFName">WSL</Data>
  </EventData>
</Event>

Log Name:      System
Source:        Microsoft-Windows-Hyper-V-VmSwitch
Date:          01.08.2019 8:32:35
Event ID:      233
Task Category: None
Level:         Information
Keywords:      (128)
User:          N/A
Computer:      nc
Description:
The operation 'Create' succeeded on nic 0D7F979E-6AB7-4B69-82B4-9BC9EA824FE8 (Friendly Name: WSL).
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Hyper-V-VmSwitch" Guid="{67dc0d66-3695-47c0-9642-33f76f7bd7ad}" />
    <EventID>233</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000080</Keywords>
    <TimeCreated SystemTime="2019-08-01T05:32:35.838845600Z" />
    <EventRecordID>2635</EventRecordID>
    <Correlation />
    <Execution ProcessID="612" ThreadID="10152" />
    <Channel>System</Channel>
    <Computer>nc</Computer>
    <Security />
  </System>
  <EventData>
    <Data Name="NicNameLen">36</Data>
    <Data Name="NicName">0D7F979E-6AB7-4B69-82B4-9BC9EA824FE8</Data>
    <Data Name="NicFNameLen">3</Data>
    <Data Name="NicFName">WSL</Data>
    <Data Name="Operation">7</Data>
  </EventData>
</Event>

Log Name:      System
Source:        Microsoft-Windows-Hyper-V-VmSwitch
Date:          01.08.2019 8:32:35
Event ID:      5
Task Category: (1003)
Level:         Information
Keywords:      (128)
User:          SYSTEM
Computer:      nc
Description:
Miniport NIC FB706F1D-F6F9-47DF-BEBD-4329EEFD8455 (Friendly Name: ) successfully enabled
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Hyper-V-VmSwitch" Guid="{67dc0d66-3695-47c0-9642-33f76f7bd7ad}" />
    <EventID>5</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>1003</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000080</Keywords>
    <TimeCreated SystemTime="2019-08-01T05:32:35.805336000Z" />
    <EventRecordID>2634</EventRecordID>
    <Correlation />
    <Execution ProcessID="4" ThreadID="32" />
    <Channel>System</Channel>
    <Computer>nc</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="NicNameLen">36</Data>
    <Data Name="NicName">FB706F1D-F6F9-47DF-BEBD-4329EEFD8455</Data>
    <Data Name="NicFNameLen">1</Data>
    <Data Name="NicFName">
    </Data>
  </EventData>
</Event>

Log Name:      System
Source:        Microsoft-Windows-Hyper-V-VmSwitch
Date:          01.08.2019 8:32:35
Event ID:      5
Task Category: (1003)
Level:         Information
Keywords:      (128)
User:          SYSTEM
Computer:      nc
Description:
Miniport NIC AC1E5070-5ACD-4499-82FB-9B5604711692 (Friendly Name: ) successfully enabled
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Hyper-V-VmSwitch" Guid="{67dc0d66-3695-47c0-9642-33f76f7bd7ad}" />
    <EventID>5</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>1003</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000080</Keywords>
    <TimeCreated SystemTime="2019-08-01T05:32:35.805303600Z" />
    <EventRecordID>2633</EventRecordID>
    <Correlation />
    <Execution ProcessID="4" ThreadID="32" />
    <Channel>System</Channel>
    <Computer>nc</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="NicNameLen">36</Data>
    <Data Name="NicName">AC1E5070-5ACD-4499-82FB-9B5604711692</Data>
    <Data Name="NicFNameLen">1</Data>
    <Data Name="NicFName">
    </Data>
  </EventData>
</Event>

Log Name:      System
Source:        Microsoft-Windows-Hyper-V-VmSwitch
Date:          01.08.2019 8:32:35
Event ID:      5
Task Category: (1003)
Level:         Information
Keywords:      (128)
User:          SYSTEM
Computer:      nc
Description:
Miniport NIC 99E239D5-D0DF-4931-A9E9-57CCD5EDDD04 (Friendly Name: ) successfully enabled
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Hyper-V-VmSwitch" Guid="{67dc0d66-3695-47c0-9642-33f76f7bd7ad}" />
    <EventID>5</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>1003</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000080</Keywords>
    <TimeCreated SystemTime="2019-08-01T05:32:35.805261200Z" />
    <EventRecordID>2632</EventRecordID>
    <Correlation />
    <Execution ProcessID="4" ThreadID="32" />
    <Channel>System</Channel>
    <Computer>nc</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="NicNameLen">36</Data>
    <Data Name="NicName">99E239D5-D0DF-4931-A9E9-57CCD5EDDD04</Data>
    <Data Name="NicFNameLen">1</Data>
    <Data Name="NicFName">
    </Data>
  </EventData>
</Event>

Log Name:      System
Source:        Microsoft-Windows-Hyper-V-VmSwitch
Date:          01.08.2019 8:32:35
Event ID:      5
Task Category: (1003)
Level:         Information
Keywords:      (128)
User:          SYSTEM
Computer:      nc
Description:
Miniport NIC 5B681764-C869-41C1-8D79-0E327221D385 (Friendly Name: ) successfully enabled
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Hyper-V-VmSwitch" Guid="{67dc0d66-3695-47c0-9642-33f76f7bd7ad}" />
    <EventID>5</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>1003</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000080</Keywords>
    <TimeCreated SystemTime="2019-08-01T05:32:35.805221000Z" />
    <EventRecordID>2631</EventRecordID>
    <Correlation />
    <Execution ProcessID="4" ThreadID="32" />
    <Channel>System</Channel>
    <Computer>nc</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="NicNameLen">36</Data>
    <Data Name="NicName">5B681764-C869-41C1-8D79-0E327221D385</Data>
    <Data Name="NicFNameLen">1</Data>
    <Data Name="NicFName">
    </Data>
  </EventData>
</Event>

Log Name:      System
Source:        Microsoft-Windows-Hyper-V-VmSwitch
Date:          01.08.2019 8:32:35
Event ID:      5
Task Category: (1003)
Level:         Information
Keywords:      (128)
User:          SYSTEM
Computer:      nc
Description:
Miniport NIC 49C62E38-401D-4994-B2E1-AF8F058E7BC6 (Friendly Name: ) successfully enabled
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Hyper-V-VmSwitch" Guid="{67dc0d66-3695-47c0-9642-33f76f7bd7ad}" />
    <EventID>5</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>1003</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000080</Keywords>
    <TimeCreated SystemTime="2019-08-01T05:32:35.805178200Z" />
    <EventRecordID>2630</EventRecordID>
    <Correlation />
    <Execution ProcessID="4" ThreadID="32" />
    <Channel>System</Channel>
    <Computer>nc</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="NicNameLen">36</Data>
    <Data Name="NicName">49C62E38-401D-4994-B2E1-AF8F058E7BC6</Data>
    <Data Name="NicFNameLen">1</Data>
    <Data Name="NicFName">
    </Data>
  </EventData>
</Event>

Log Name:      System
Source:        Microsoft-Windows-Hyper-V-VmSwitch
Date:          01.08.2019 8:32:35
Event ID:      5
Task Category: (1003)
Level:         Information
Keywords:      (128)
User:          SYSTEM
Computer:      nc
Description:
Miniport NIC 3CC8D575-D443-43F5-8F4F-5C5856DCEA58 (Friendly Name: ) successfully enabled
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Hyper-V-VmSwitch" Guid="{67dc0d66-3695-47c0-9642-33f76f7bd7ad}" />
    <EventID>5</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>1003</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000080</Keywords>
    <TimeCreated SystemTime="2019-08-01T05:32:35.805137000Z" />
    <EventRecordID>2629</EventRecordID>
    <Correlation />
    <Execution ProcessID="4" ThreadID="32" />
    <Channel>System</Channel>
    <Computer>nc</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="NicNameLen">36</Data>
    <Data Name="NicName">3CC8D575-D443-43F5-8F4F-5C5856DCEA58</Data>
    <Data Name="NicFNameLen">1</Data>
    <Data Name="NicFName">
    </Data>
  </EventData>
</Event>

Log Name:      System
Source:        Microsoft-Windows-Hyper-V-VmSwitch
Date:          01.08.2019 8:32:35
Event ID:      5
Task Category: (1003)
Level:         Information
Keywords:      (128)
User:          SYSTEM
Computer:      nc
Description:
Miniport NIC 079F97E2-E87C-428D-AAB7-DFC9E62DF440 (Friendly Name: ) successfully enabled
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Hyper-V-VmSwitch" Guid="{67dc0d66-3695-47c0-9642-33f76f7bd7ad}" />
    <EventID>5</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>1003</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000080</Keywords>
    <TimeCreated SystemTime="2019-08-01T05:32:35.805092900Z" />
    <EventRecordID>2628</EventRecordID>
    <Correlation />
    <Execution ProcessID="4" ThreadID="32" />
    <Channel>System</Channel>
    <Computer>nc</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="NicNameLen">36</Data>
    <Data Name="NicName">079F97E2-E87C-428D-AAB7-DFC9E62DF440</Data>
    <Data Name="NicFNameLen">1</Data>
    <Data Name="NicFName">
    </Data>
  </EventData>
</Event>

Log Name:      System
Source:        Microsoft-Windows-Hyper-V-VmSwitch
Date:          01.08.2019 8:32:35
Event ID:      264
Task Category: None
Level:         Information
Keywords:      (128)
User:          SYSTEM
Computer:      nc
Description:
Port 611D7FCC-8F7C-4D8A-B353-249740E3A0C3 (Friendly Name: Container NIC 4190d08a) successfully created on switch A02CEDA8-C5D8-4D31-8771-08945EDF7CE8 (Friendly Name: WSL).
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Hyper-V-VmSwitch" Guid="{67dc0d66-3695-47c0-9642-33f76f7bd7ad}" />
    <EventID>264</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000080</Keywords>
    <TimeCreated SystemTime="2019-08-01T05:32:35.649074800Z" />
    <EventRecordID>2627</EventRecordID>
    <Correlation />
    <Execution ProcessID="612" ThreadID="10152" />
    <Channel>System</Channel>
    <Computer>nc</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="PortNameLen">36</Data>
    <Data Name="PortName">611D7FCC-8F7C-4D8A-B353-249740E3A0C3</Data>
    <Data Name="PortFNameLen">22</Data>
    <Data Name="PortFName">Container NIC 4190d08a</Data>
    <Data Name="SwitchNameLen">36</Data>
    <Data Name="SwitchName">A02CEDA8-C5D8-4D31-8771-08945EDF7CE8</Data>
    <Data Name="SwitchFNameLen">3</Data>
    <Data Name="SwitchFName">WSL</Data>
    <Data Name="Flags">1</Data>
    <Data Name="OwnerService">1</Data>
  </EventData>
</Event>

Log Name:      System
Source:        Microsoft-Windows-Hyper-V-VmSwitch
Date:          01.08.2019 8:32:35
Event ID:      9
Task Category: (1005)
Level:         Information
Keywords:      (128)
User:          SYSTEM
Computer:      nc
Description:
Switch A02CEDA8-C5D8-4D31-8771-08945EDF7CE8 (Friendly Name: WSL) successfully initialized.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Hyper-V-VmSwitch" Guid="{67dc0d66-3695-47c0-9642-33f76f7bd7ad}" />
    <EventID>9</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>1005</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000080</Keywords>
    <TimeCreated SystemTime="2019-08-01T05:32:35.516909200Z" />
    <EventRecordID>2626</EventRecordID>
    <Correlation />
    <Execution ProcessID="612" ThreadID="10152" />
    <Channel>System</Channel>
    <Computer>nc</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="SwitchNameLen">36</Data>
    <Data Name="SwitchName">A02CEDA8-C5D8-4D31-8771-08945EDF7CE8</Data>
    <Data Name="SwitchFNameLen">3</Data>
    <Data Name="SwitchFName">WSL</Data>
    <Data Name="Flags">0</Data>
    <Data Name="OwnerService">1</Data>
  </EventData>
</Event>

Log Name:      System
Source:        Microsoft-Windows-Hyper-V-VmSwitch
Date:          01.08.2019 8:32:35
Event ID:      232
Task Category: None
Level:         Information
Keywords:      (128)
User:          SYSTEM
Computer:      nc
Description:
NIC A02CEDA8-C5D8-4D31-8771-08945EDF7CE8 (Friendly Name: WSL) successfully connected to port A02CEDA8-C5D8-4D31-8771-08945EDF7CE8 (Friendly Name: WSL) on switch A02CEDA8-C5D8-4D31-8771-08945EDF7CE8(Friendly Name: WSL).
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Hyper-V-VmSwitch" Guid="{67dc0d66-3695-47c0-9642-33f76f7bd7ad}" />
    <EventID>232</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000080</Keywords>
    <TimeCreated SystemTime="2019-08-01T05:32:35.516871100Z" />
    <EventRecordID>2625</EventRecordID>
    <Correlation />
    <Execution ProcessID="612" ThreadID="10152" />
    <Channel>System</Channel>
    <Computer>nc</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="NicNameLen">36</Data>
    <Data Name="NicName">A02CEDA8-C5D8-4D31-8771-08945EDF7CE8</Data>
    <Data Name="NicFNameLen">3</Data>
    <Data Name="NicFName">WSL</Data>
    <Data Name="PortNameLen">36</Data>
    <Data Name="PortName">A02CEDA8-C5D8-4D31-8771-08945EDF7CE8</Data>
    <Data Name="PortFNameLen">3</Data>
    <Data Name="PortFName">WSL</Data>
    <Data Name="SwitchNameLen">36</Data>
    <Data Name="SwitchName">A02CEDA8-C5D8-4D31-8771-08945EDF7CE8</Data>
    <Data Name="SwitchFNameLen">3</Data>
    <Data Name="SwitchFName">WSL</Data>
  </EventData>
</Event>

Log Name:      System
Source:        Microsoft-Windows-Hyper-V-VmSwitch
Date:          01.08.2019 8:32:35
Event ID:      233
Task Category: None
Level:         Information
Keywords:      (128)
User:          N/A
Computer:      nc
Description:
The operation 'Create' succeeded on nic A02CEDA8-C5D8-4D31-8771-08945EDF7CE8 (Friendly Name: WSL).
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Hyper-V-VmSwitch" Guid="{67dc0d66-3695-47c0-9642-33f76f7bd7ad}" />
    <EventID>233</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000080</Keywords>
    <TimeCreated SystemTime="2019-08-01T05:32:35.516864500Z" />
    <EventRecordID>2624</EventRecordID>
    <Correlation />
    <Execution ProcessID="612" ThreadID="10152" />
    <Channel>System</Channel>
    <Computer>nc</Computer>
    <Security />
  </System>
  <EventData>
    <Data Name="NicNameLen">36</Data>
    <Data Name="NicName">A02CEDA8-C5D8-4D31-8771-08945EDF7CE8</Data>
    <Data Name="NicFNameLen">3</Data>
    <Data Name="NicFName">WSL</Data>
    <Data Name="Operation">7</Data>
  </EventData>
</Event>
Chakratos commented 4 years ago

Having the same issue! Installed Insider Fast ring. "wsl --set-default-version 2" and then installing Ubuntu gets me the same error.

Reverting it back to default 1 -> Installing Ubuntu and then using "wsl --set-version Ubuntu 2" still gets me the same error..

CayoM commented 4 years ago

im stuck also. everything was working fine untill this error showed up and now im unable to get it running again. unregistered, removed the distros and now i cant install them again.

i first noticed something was not OK when i suddenly could not clone a git repo from Ubuntu on Windows. Seems like the whole name resolution was messed up. After a reboot i started getting this error.

any help would be highly appreciated.

EDIT: after removing WSL and enabling it again it still not work. I tried what Chakratos mentioned above and was able to install Ubuntu again as wsl1, but still not able to set to wsl2.

EDIT2: System Infos: Windows 10 Pro Build 18950.rs_prerelease.190726-1645

flewsea commented 4 years ago

So do I . when i convert wsl 1 to wsl2 . the same error while happen. code is 0xffffffff. system version is 18950

Andy2244 commented 4 years ago

Same error, after i did a reboot....

PS C:\> wsl --unregister ubuntu
Unregistering...
PS C:\> ubuntu
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0xffffffff
Error: 0xffffffff (null)
Press any key to continue...
scrossan-crown commented 4 years ago

I'm having the same issue as @Andy2244 just can't get wsl 2 to work

GLStephen commented 4 years ago

I'm also seeing this. Started running WSL2, got some Docker containers working. Restarted computer. Now this error on everything related to actions in WSL. Started as starting Ubuntu, then I uninstalled and reinstalled Ubuntu and now I can't convert to wsl2.

PS C:\WINDOWS\system32> wsl -e bash
Error: 0xffffffff

Uninstalled, then reinstalled:

PS C:\WINDOWS\system32> docker -v
Docker version 19.03.1, build 74b1e89
PS C:\WINDOWS\system32> wsl -l -v
  NAME            STATE           VERSION
* Ubuntu-18.04    Running         1
PS C:\WINDOWS\system32> wsl --set-version Ubuntu-18.04 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Error: 0xffffffff
scrossan-crown commented 4 years ago

I've tried disabling Hyper-v and WSL via Turn Windows features on or off and then re-enabling them but it made no difference

GLStephen commented 4 years ago

Updating to Build 18956.1000 seems to have resolved the issue, though I have no idea why.

benhillis commented 4 years ago

The -1 error indicates an issue creating the virtual network. Those errors tend to be transient.

CayoM commented 4 years ago

Updating to Build 18956.1000 seems to have resolved the issue, though I have no idea why.

i can confirm this too, thx for the info!

Attention: In order to get this update you need to use the fast ring.

EDIT: unfortunately this is happening again...

wsl -l -v
NAME            STATE           VERSION
* Ubuntu-18.04    Stopped         2
PS C:\Users\camor> bash
Fehler: 0xffffffff

now running Build 18956.rs_preselease.190803-1414.

After i switched Docker to WSL 2 Tech Preview and was irritated that i could not see the wsl context running "docker context ls", i rebooted and after that nothing works anymore.... Still getting 0xffffffff.

Enf0 commented 4 years ago

I am seeing the same issue after rebooting my machine, on build 18956.1000.

wsl --set-version Ubuntu-18.04 2                                                                                           
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Error: 0xffffffff
tdaniely commented 4 years ago

The -1 error indicates an issue creating the virtual network. Those errors tend to be transient.

I can confirm that I'm seeing the "WSL" switch created and removed in the Hyper-V-VmSwitch logs.

I also see the same behaviour with the Hyper-V Default vSwitch, where I can actually see it appearing and disappearing in Network Connections.

Some searching suggests that this is due to Group Policy blocking Internet Connection Sharing, However I've enabled it manually to see if it is indeed the issue and the adapter device is still being removed.

Is there anywhere where I can find a specific list of configuration requirements for getting the WSL v-switch to work?

Edit: I've manually enabled ICS and tested that it works between my LAN and WiFi manually. However the v-switch is still being removed. So scratch that.

v-switch logs: https://pastebin.com/3ReMcxtc

Last edit: After manually going over basically everything on my laptop, I've eventually found that it was the Acrylic DNS Proxy service I'm using. The service was grabbing port 53 and preventing the ICS service from binding to it.

scrossan-crown commented 4 years ago

I was having this issue then it was solved by upgrading to version 18956 but then after a reboot it's stopped working again with the same error Error: 0xffffffff

scrossan-crown commented 4 years ago

I'm not sure if it's what actually sorted my issue but closing the program that was bound (listening) to port 53, allowed WSL to start with no issues

flewsea commented 4 years ago

When I stop the program listening to 53 ,and wsl can finish convert work

shattenjager commented 4 years ago

Same here, same build build 18956.1000 (fast preview) WSL 2 and Ubuntu 18 were working fine with Docker WSL 2 Tech preview until this morning. 0xffffffff error, even if I just try a wsl -l -v in PowerShell.

quyet-nguyen commented 4 years ago

Mine was running fine with build 18956.1000 and ubuntu. This morning, wsl suddenly stopped working with 0xffffffff error. Remove and reinstall didn't solve the problem.

$ wsl -l -v
  NAME      STATE           VERSION
* Ubuntu    Stopped         2

$ wsl -d ubuntu
Error: 0xffffffff

Open Windows Events log, I saw some messages indicate that create ICS network failed:

Name resolution for the name wpad timed out after none of the configured DNS servers responded.

'IpICSHlpStopDnsServer' : '0x80070490'.

'IpICSHlpStopSharing' : '0x80070490'.

'IpICSHlpStartDnsServer' : '0xFFFFFFFF'.

HNS-Network-Create :- 
 Network id = '{b95d0c5e-57d4-412b-b571-18a81a16e005}'.
 Network type = 'ICS'.
  Result code = '0xFFFFFFFF'. 
puco commented 4 years ago

Also on 18956.rs_preselease.190803-1414, same issue as OP, the only thing listening on *:53 is sharedaccess and dockerd. I can't "kill" ICS and the problem persists even when I stop dockerd. The problem starting manifesting itself after a restart (where I switched from Linux to Windows containers) as I wanted to use exclusively try WSL2 docker. After that I can't start a version 2 distro or change version to 2 on any other distro.

scrossan-crown commented 4 years ago

@puco I have been racking my brain as to what caused this issue after the restart and yes it was when I switched to Windows containers like yourself. If I stop docker desktop and the Docker Desktop Service then start WSL I don't get the error.

puco commented 4 years ago

@scrossan-crown still does not work for me. (Quit Docker Desktop from the tray icon, which stops the VM and then stop docker service). Upgrading distro to WSL2 returns the same error. Did you do anything other (restarting etc.)

scrossan-crown commented 4 years ago

@puco the only other thing I do is kill anything listening on port 53 and then it works for me. Sorry I can't be of more help

benhillis commented 4 years ago

Could somebody on build 18956 or later please take a trace?

https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-detailed-logs

quyet-nguyen commented 4 years ago

@puco @scrossan-crown Thanks to you guys I've found the cause! What can I confirmed in my case so far:

  1. wsl 2 crashed with 0xFFFFFF, which I assume due to I switched docker to Windows container earlier
  2. Switch back to Linux container does not solve the problem.
  3. Stop the Docker Engine Service (not the Docker Desktop Service), I was able to start wsl 2 again, and docker desktop for linux still working
  4. Disable/remove docker engine service, everythings is back as it is before (wsl 2 works along docker desktop for linux)
  5. Switched back to Windows container, new config file is created, I am now able to use wsl 2 along with docker for windows

Here is my new config file content:

{
  "registry-mirrors": [],
  "insecure-registries": [],
  "debug": true,
  "experimental": false,
  "hosts": [
    "npipe:////./pipe/docker_engine_windows"
  ]
}

Other note: I was using Docker desktop version 2.1.1.0 (37260), edge channel with wsl 2 docker tech preview, so that I have both linux and windows container.

  1. Crashes appeared again if I left Windows container on startup. I had to switched back to Linux container and disabled dockerd service before I shutdown
puco commented 4 years ago

Nice, for me the only thing that helped to change version back to 2 was uninstalling Docker Desktop. Only after that I could upgrade to WSL2, reinstall Docker and have everything running again.

victoryang00 commented 4 years ago

image in my case, close the dockerd.exe in the task manager helps. image

pbecotte commented 4 years ago

I don't know if there are more then one cause of this- mine was also caused (as above) by the Acrylic DNS server beating ICS to port 53.

The problem is that I specifically installed Acrylic because the hosts file on Windows wouldn't forward requests to my new wsl vm haha. Oh well, I'll have to work around that another way- but if I hadn't just been messing with this yesterday I think there is 0 chance I would have run this down. Probably check for port 53 being bound on launch and use that to provide a better error message?

Dijir commented 4 years ago

Closing dockerd.exe and restarting hns service solves the problem for me.

Cisien commented 4 years ago

18970 seems to have resolved this issue for me. (docker for windows edge 2.1.1.0 (37260))

baylesa-dev commented 4 years ago

I got the same error but it seems what I did fixed it:

I'm on Windows 10 Pro Insider Preview 18970.rs_prerelease.190824-1711

I had Ubuntu installed, not Ubuntu 18.04 LTS, so I removed Ubuntu and installed 18.04 LTS: https://www.microsoft.com/en-us/p/ubuntu-1804-lts/9n9tngvndl3q?activetab=pivot:overviewtab

I switched to Windows container:

image

Reboot, and then run

PS C:\Users\[username]> wsl --set-version Ubuntu-18.04 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Conversion complete.

I don't know if everything's usefull and if it will help someone but ... πŸ’β€β™‚

Ai-Himmel commented 4 years ago

On build 18970, I had same issue but didn't have docker installed. Here is the trace. trace.zip

AlexisCQA commented 4 years ago

I got the same error but it seems what I did fixed it:

I'm on Windows 10 Pro Insider Preview 18970.rs_prerelease.190824-1711

I had Ubuntu installed, not Ubuntu 18.04 LTS, so I removed Ubuntu and installed 18.04 LTS: https://www.microsoft.com/en-us/p/ubuntu-1804-lts/9n9tngvndl3q?activetab=pivot:overviewtab

I switched to Windows container:

image

Reboot, and then run

PS C:\Users\[username]> wsl --set-version Ubuntu-18.04 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Conversion complete.

I don't know if everything's usefull and if it will help someone but ... πŸ’β€β™‚

Works for me !

Sidneys1 commented 4 years ago

I got the same error but it seems what I did fixed it (...)

Works here as well. docker service was using port 53. Stopped that, restarted the ICS service, reinstalled Ubuntu 18.04 in v2, and everything works now, including restarting docker. Changed Docker Engine service to Manual start, hopefully that'll fix it for reboots.

puco commented 4 years ago

Still happening in new 18970.1005.

craigloewen-msft commented 4 years ago

@puco could you make sure that port 53 is open? Open Resource Monitor > Network > Listening Ports and look for anything bound to port 53, stop it and then try again.

If that doesn't work could you please collect a networking log for us? Instructions on how to do so are here.

puco commented 4 years ago

@craigloewen-msft no it is not. It is occupied by dockerd, I just wanted to report that the problem is still occurring after the most recent Fast Ring release. The workaround @Sidneys1 posted works for me quite well

pbecotte commented 4 years ago

Out if curiosity...is the port 53 hijack a permanent feature? Seems like there are a couple different things all trying to use it, and I wouldn't have expected any of those things to be doing so

junwatu commented 4 years ago

@Sidneys1 thats work for me on my windows build 18980.1. Thanks!

Update: i think it fixed with recent Docker Desktop Version 2.1.3.0 (38275)

tdaniely commented 4 years ago

Out if curiosity...is the port 53 hijack a permanent feature? Seems like there are a couple different things all trying to use it, and I wouldn't have expected any of those things to be doing so

From my possibly naive point of view, ICS can change to only bind to port 53 on the virtual adapter, instead of binding on 0.0.0.0. It probably does it to conveniently support multiple adapters. But the correct approach, I think, would be to bind to each one separately. Also in enterprise environments the DNS forward would mostly be blocked anyway, so it should also be a toggle-able option.

dp6000 commented 4 years ago

Summary I set up a Ubuntu-18.04 distro and Docker WSL 2 Tech Preview last night and everything was working well. This morning I needed to reboot my Once the PC restarted, WSL reported a 0xffffffff error whenever I tried to launch the distro.

image

I was able to launch the distro, once I uninstalled docker and restarted the system. I have tried Docker versions 2.1.0.0 and 2.1.2.0. Note 2.1.3.0 had a different issue that prevented testing.

Resource Monitor showed two instances of dockerd.exe and one instance of svchost.exe (netsvcs-p) using port 53. Once I uninstalled docker, only the svchost was using the port. --> image

Expected behavior

Docker should not prevent WSL 2 distro from launching.

Actual behavior

See summary above

Information

Steps to reproduce the behavior

  1. Set up WSL 2 per Microsoft and Docker Instructions 1a. Install Ubuntu-18.04 distro from Windows Store. Set it as default. 1b. Install Terminal from Windows Store
  2. Install Docker 2.1.2.0 and have it start up on boot. (note 2.1.3.0 has a different issue that inhibits testing.)
  3. Restart the PC
  4. open Terminal and start distro by selecting Ubuntu-18.04 from the dropdown.
  5. Alternatively, type: wsl -d Ubuntu-18.04 in powershell. WSL should report error 0xffffffff.

To correct the issue:

  1. Uninstall Docker.
  2. Reboot PC
  3. Launch Terminal
  4. Start the distro using methods described in steps 4 or 5 above.

Launching Docker WSL 2 Team Preview Prior to Uninstalling Docker:

image

chewtoys commented 4 years ago

yep docker is preventing the boot up of Ubuntu, had to switch to linux containers, then launch the wsl terminal, that booted ubuntu, then set docker back to desktop containers, that somehow fixed the issue.

At least don't have to reinstall the whole thing each time this happens, its annoying i have to do that, but it works.

solvingj commented 4 years ago

For future users, I was able to install Ubuntu after having this issue. I stopped the docker service, but that wasn't enough. I then killed this process in task manager: image

I'm not sure if just killing this process is enough. Next person can test that.

aaronsteers commented 4 years ago

This issue just started occurring for me after updating to Windows Insider build 19018. I wasn't able to open WSL or Docker Engine but I was able to perform the below steps to get docker and wsl both running again.

  1. Select "Reset to Factory Defaults" from the Docker crash notifier. (I probably could have skipped this but I couldn't get to the Docker settings window otherwise.)
  2. After Docker Desktop restarts, open Docker Settings and uncheck: Enable the experimental WSL 2 based engine. Click Apply and Restart.
  3. Run "wsl" from a command prompt to confirm WSL is working correctly. Then select "Ubuntu" (or whatever distro you are using) from start menu - confirm the terminal loads and all is well.
  4. Go back to Docker settings, re-check Enable the experimental WSL 2 based engine. Right click the Taskbar icon for Docker Desktop and select "Restart..." to confirm the docker engine is working still.

Note: At this point, I have no idea if this "fix" will stick past a restart or if I'll have to repeat steps 2-4 after each reboot.

UPDATE (12/11): The above fix has held strong for a month now, with no recurrence of the issue since. (Knock on wood. πŸ˜ƒ)

solvingj commented 4 years ago

Happened to me again. This time I just rebooted, then "Exited" docker desktop, then was able to complete installation of WSL2. Started docker, started WSL2, all was good (until the next time it randomly breaks again).

alexk111 commented 4 years ago

For me the 0xffffffff error was fixed by freeing up port 53.

flatline-studios commented 4 years ago

Same as @alexk111, unfortunately though, that's the port that I use for dnscrypt (as Windows 10 still doesn't have support for DoH).

Sucks that there's no way to use both at the same time..?

sergiocabral commented 4 years ago

image

if you change the startup type of services Docker Engine and Docker Desktop for Delayed, wsl works fine.

But, the application Docker Desktop will try start the service because it is not started yet.

EDIT:

after i opened Docker App and restart Windows, the service Docker Engine is reset to Automatic without delayed. Then, i restart Windows and wsl2 have error 0xffffffff.

The problem is service "Docker Engine" start early and listen on port 53.

pedrolamas commented 4 years ago

I can confirm @sergiocabral findings: if I close Docker Desktop, wait a bit, and then I can open Ubuntu without any issues.

So this seems to be related to Docker, but I should point I have enabled Windows Containers on my local instance.

benhillis commented 4 years ago

I believe this should be fixed in build 19541.

Please let us know if you continue to hit this on the new Insider Fast build.