crc: [BUG] Networking issues on Windows 10 Hyper-V

General information

  • OS: Windows Version 1903
  • Hypervisor: Hyper-V
  • Did you run crc setup before starting it (Yes/No)? Yes

CRC version

# Put `crc version` output here
version: 1.0.0-rc.0+34371d3
OpenShift version: 4.2.0-0.nightly-2019-09-26-192831 (embedded in binary)

CRC status

# Put `crc status` output here
ERRO Error occurred: error: CreateFile C:\Users\mark\.crc\machines\crc\kubeconfig: The system cannot find the file specified.
 - exit status 1

CRC config

# Put `crc config view` output here
<empty>

Host Operating System

# Put the output of `cat /etc/os-release` in case of Linux
# put the output of `sw_vers` in case of Mac
# Put the output of `systeminfo` in case of Windows
Host Name:                 DESKTOP-DL6MEKN
OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.18362 N/A Build 18362
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
Product ID:                00330-80000-00000-AA680
Original Install Date:     09/08/2019, 08:20:51
System Boot Time:          19/10/2019, 14:31:12
System Manufacturer:       Dell Inc.
System Model:              XPS 15 9570
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: Intel64 Family 6 Model 158 Stepping 10 GenuineIntel ~2208 Mhz
BIOS Version:              Dell Inc. 1.13.0, 22/08/2019
Windows Directory:         C:\WINDOWS
System Directory:          C:\WINDOWS\system32
Boot Device:               \Device\HarddiskVolume1
System Locale:             en-us;English (United States)
Input Locale:              en-gb;English (United Kingdom)
Time Zone:                 (UTC+00:00) Dublin, Edinburgh, Lisbon, London
Total Physical Memory:     32,503 MB
Available Physical Memory: 22,375 MB
Virtual Memory: Max Size:  37,367 MB
Virtual Memory: Available: 23,898 MB
Virtual Memory: In Use:    13,469 MB
Page File Location(s):     C:\pagefile.sys
Domain:                    WORKGROUP
Logon Server:              \\DESKTOP-DL6MEKN
Hotfix(s):                 8 Hotfix(s) Installed.
                           [01]: KB4515871
                           [02]: KB4503308
                           [03]: KB4508433
                           [04]: KB4515383
                           [05]: KB4515530
                           [06]: KB4516115
                           [07]: KB4521863
                           [08]: KB4517389
Network Card(s):           5 NIC(s) Installed.
                           [01]: Bluetooth Device (Personal Area Network)
                                 Connection Name: Bluetooth Network Connection
                                 Status:          Media disconnected
                           [02]: Killer Wireless-n/a/ac 1535 Wireless Network Adapter
                                 Connection Name: WiFi
                                 DHCP Enabled:    Yes
                                 DHCP Server:     N/A
                                 IP address(es)
                           [03]: Hyper-V Virtual Ethernet Adapter
                                 Connection Name: vEthernet (Default Switch) 2
                                 DHCP Enabled:    No
                                 IP address(es)
                                 [01]: 172.18.88.209
                                 [02]: fe80::f168:3e4b:2cce:4476
                           [04]: Microsoft Network Adapter Multiplexor Driver
                                 Connection Name: Network Bridge
                                 DHCP Enabled:    Yes
                                 DHCP Server:     N/A
                                 IP address(es)
                           [05]: Hyper-V Virtual Ethernet Adapter
                                 Connection Name: vEthernet (New Virtual Switch)
                                 DHCP Enabled:    Yes
                                 DHCP Server:     192.168.161.1
                                 IP address(es)
                                 [01]: 192.168.161.124
                                 [02]: fe80::ed0b:7b43:90d0:f1f0
                                 [03]: fdbf:3d40:3851:10:4518:a22:10e:4511
                                 [04]: 2a02:c7f:126d:f400:25b5:d6d2:52bb:ba88
                                 [05]: fdbf:3d40:3851:10:ed0b:7b43:90d0:f1f0
                                 [06]: 2a02:c7f:126d:f400:ed0b:7b43:90d0:f1f0
Hyper-V Requirements:      A hypervisor has been detected. Features required for Hyper-V will not be displayed.

Steps to reproduce

  1. crc setup
  2. crc start HyperV default interface only picked up IPv6 address and not IPv4
  3. crc stop
  4. Change default switch to external switch in HyperV HyperV external interface picked up both IPv4 and IPv6 address ssh failed - missing file from machine
  5. crc stop
  6. Copied .crc\cache\crc_hyperv_4.2.0-0.nightly-2019-09-26-192831\id_rsa_crc to .crc\machines\crc\id_rsa
  7. crc start cannot update nameserver
  8. crc stop
  9. crc start -n “8.8.8.8” failed again

Actual

PS C:\Users\mark> crc setup INFO Checking if running as normal user INFO Caching oc binary INFO Unpacking bundle from the CRC binary INFO Check Windows 10 release INFO Hyper-V installed INFO Is user a member of the Hyper-V Administrators group INFO Does the Hyper-V virtual switch exist Setup is complete, you can now run ‘crc start’ to start a CodeReady Containers instance PS C:\Users\mark> crc start ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************INFO Does the Hyper-V virtual switch exist ? Image pull secret [? for help] *************************************************************************************************************************************************************************************************************************************************************************************************************************** Shutting Down 0% [ ] *************************** Shutting Down 0% [ ] ***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************

INFO Extracting bundle: crc_hyperv_4.2.0-0.nightly-2019-09-26-192831.crcbundle … INFO Creating CodeReady Containers VM for OpenShift 4.2.0-0.nightly-2019-09-26-192831… INFO Verifying validity of the cluster certificates … ERRO Error occurred: unknown error occurred ERRO Error occurred: unknown error occurred ERRO Error occurred: unknown error occurred PS C:\Users\mark> crc stop ************************************************************************************************************************





INFO Check Windows 10 release INFO Hyper-V installed and operational INFO Is user a member of the Hyper-V Administrators group INFO Does the Hyper-V virtual switch exist INFO Starting CodeReady Containers VM for OpenShift 4.2.0-0.nightly-2019-09-26-192831… ERRO Error occurred: Failed to connect to the crc VM with SSH PS C:\Users\mark> crc stop Stopping CodeReady Containers instance… this may take a few minutes CodeReady Containers instance stopped PS C:\Users\mark> crc start INFO Checking if running as normal user INFO Checking if oc binary is cached INFO Check Windows 10 release INFO Hyper-V installed and operational INFO Is user a member of the Hyper-V Administrators group INFO Does the Hyper-V virtual switch exist INFO Starting CodeReady Containers VM for OpenShift 4.2.0-0.nightly-2019-09-26-192831… INFO Verifying validity of the cluster certificates … INFO Will run as admin: add dns server address to interface vEthernet (Default Switch) ERRO Error occurred: Nameserver not successfully set ERRO Error occurred: Error running post start: Nameserver not successfully set PS C:\Users\mark> crc stop Stopping CodeReady Containers instance… this may take a few minutes CodeReady Containers instance stopped PS C:\Users\mark> crc -n “8.8.8.8” start INFO Checking if running as normal user INFO Checking if oc binary is cached INFO Check Windows 10 release INFO Hyper-V installed and operational INFO Is user a member of the Hyper-V Administrators group INFO Does the Hyper-V virtual switch exist INFO Starting CodeReady Containers VM for OpenShift 4.2.0-0.nightly-2019-09-26-192831… INFO Verifying validity of the cluster certificates … INFO Adding 8.8.8.8 as nameserver to Instance … INFO Will run as admin: add dns server address to interface vEthernet (Default Switch) ERRO Error occurred: Nameserver not successfully set ERRO Error occurred: Error running post start: Nameserver not successfully set

Logs

https://gist.github.com/mark-buckwell/c900814ffb9c6095921fafd2bdb32c78

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 32 (12 by maintainers)

Most upvoted comments

I may have found a solution here https://github.com/docker/for-win/issues/1166

The interface metric for WiFi needs to be changed to a number lower than all other interfaces

 > Set-NetIPInterface -InterfaceAlias 'WiFi' -InterfaceMetric 5

and DHCP was disabled for IPv4

 > Set-NetIPInterface -InterfaceAlias 'vEthernet (Default Switch)' -dhcp enable

I deleted all interfaces except WiFi and Bluetooth. Then rebooted to recreate the vEthernet

Then it should look like this

 > Get-NetIPInterface | Sort-Object -Property InterfaceMetric -Descending

ifIndex InterfaceAlias                  AddressFamily NlMtu(Bytes) InterfaceMetric Dhcp     ConnectionState PolicyStore
------- --------------                  ------------- ------------ --------------- ----     --------------- -----------
43      vEthernet (Default Switch)      IPv4                  1500             300 Enabled  Connected       ActiveStore
43      vEthernet (Default Switch)      IPv6                  1500             300 Enabled  Connected       ActiveStore
1       Loopback Pseudo-Interface 1     IPv6            4294967295              75 Disabled Connected       ActiveStore
1       Loopback Pseudo-Interface 1     IPv4            4294967295              75 Disabled Connected       ActiveStore
18      Bluetooth Network Connection    IPv6                  1500              65 Disabled Disconnected    ActiveStore
18      Bluetooth Network Connection    IPv4                  1500              65 Enabled  Disconnected    ActiveStore
19      Local Area Connection* 10       IPv4                  1500              25 Enabled  Disconnected    ActiveStore
9       Local Area Connection* 12       IPv6                  1500              25 Disabled Disconnected    ActiveStore
9       Local Area Connection* 12       IPv4                  1500              25 Enabled  Disconnected    ActiveStore
19      Local Area Connection* 10       IPv6                  1500              25 Disabled Disconnected    ActiveStore
2       WiFi                            IPv6                  1500               5 Enabled  Connected       ActiveStore
2       WiFi                            IPv4                  1500               5 Enabled  Connected       ActiveStore

I performed a clean install of Windows 10 and the problem of not obtaining an IPv4 address did not happen.

However, the DNS lookup failed and after specifying crc start -n "8.8.8.8" the OpenShift cluster started without errors.

@gbraad I have closed on the basis this is a problem with Windows and Hyper-V not crc.