crc: [BUG] crc does not start on Windows 10 due to DNS / nameserver not set succesfully
General information
- OS: Windows
- Hypervisor: Hyper-V
- Did you run
crc setupbefore starting it (Yes/No)? Yes
CRC version
crc version: 1.9.0+a68b5e0
OpenShift version: 4.3.10 (embedded in binary)
CRC config
- pull-secret-file : c:\downloads\pull-secret
Host Operating System
Host Name: LAPTOP-VD1LLMG5
OS Name: Microsoft Windows 10 Enterprise
OS Version: 10.0.18363 N/A Build 18363
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
Registered Owner: N/A
Registered Organization: N/A
Product ID: 00330-80000-00000-AA174
Original Install Date: 3/25/2020, 1:02:06 AM
System Boot Time: 4/9/2020, 3:55:36 PM
System Manufacturer: LENOVO
System Model: 20QQS2K200
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 158 Stepping 10 GenuineIntel ~2592 Mhz
BIOS Version: LENOVO N2NET28W (1.13 ), 8/27/2019
Windows Directory: C:\Windows
System Directory: C:\Windows\system32
Boot Device: \Device\HarddiskVolume1
System Locale: en-us;English (United States)
Input Locale: en-us;English (United States)
Time Zone: (UTC-06:00) Central Time (US & Canada)
Total Physical Memory: 32,503 MB
Available Physical Memory: 8,292 MB
Virtual Memory: Max Size: 64,678 MB
Virtual Memory: Available: 7,948 MB
Virtual Memory: In Use: 56,730 MB
Page File Location(s): C:\pagefile.sys
Domain: WORKGROUP
Logon Server: \\LAPTOP-VD1LLMG5
Hotfix(s): 9 Hotfix(s) Installed.
[01]: KB4551762
[02]: KB4534132
[03]: KB4497727
[04]: KB4515383
[05]: KB4517245
[06]: KB4537759
[07]: KB4541338
[08]: KB4552152
[09]: KB4549951
Network Card(s): 3 NIC(s) Installed.
[01]: Intel(R) Wi-Fi 6 AX200 160MHz
Connection Name: Wi-Fi
DHCP Enabled: Yes
DHCP Server: 192.168.0.2
IP address(es)
[01]: 192.168.0.153
[02]: fe80::ec5d:9d70:fd8f:93a7
[02]: Cisco AnyConnect Secure Mobility Client Virtual Miniport Adapter for Windows x64
Connection Name: Ethernet 2
DHCP Enabled: No
IP address(es)
[01]: x.x.x.x
[02]: fe80::1234:abcd:d4e0:bec6
[03]: Hyper-V Virtual Ethernet Adapter
Connection Name: vEthernet (Default Switch)
DHCP Enabled: Yes
DHCP Server:
IP address(es)
[01]: 172.17.35.1
[02]: fe80::2c10:aabc:3925:371b
Hyper-V Requirements: A hypervisor has been detected. Features required for Hyper-V will not be displayed.
Steps to reproduce
- crc setup
- crc config set pull-secret-file c:\downloads\pull-secret
- crc start --log-level debug
Expected
INFO Check internal and public DNS query … INFO Check DNS query from host … INFO Copying kubeconfig file to instance dir …
Actual
INFO Check internal and public DNS query … INFO Check DNS query from host … WARN foo.apps-crc.testing resolved to [23.202.231.169 23.217.138.110] but 172.17.35.9 was expected ERRO Failed to query DNS from host: Invalid IP for foo.apps-crc.testing
Logs
https://gist.github.com/michaelburch/b549777ee4ae8ac689838a6b6d8ae815
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 20 (9 by maintainers)
The problem that I am having is when then cluster was using the Default vSwitch that was internal only and not exposed to the internet. Then digging around in issues I notice that you can name the vSwitch “crc” and it will start using that vSwitch. So that got it an external address. But then DNS configuration was failing. The above
Add-DnsClientNrptRulepowershell commands seem to have helped.Anyone that is struggling creating the “crc” vSwitch correctly run these commands in powershell
First view the network adapters and choose the nic you want to use:
This will return the adapter names.
Then set up a variable to hold the correct name, and with my machine the name adapter name is “Ethernet”.
Then create a vSwitch using the above variable
I started crc, and it failed but it then got an ip address. Stopped crc and added the DNS entries by hand
Replace the IP Address below with the IP Address that was assigned to the crc VM
Restart crc and it should use the crc vSwitch and have the correct DNS setup.
Thanks @gbraad, that lets me script a workaround - much better than editing the hosts file! I’ll test it out later when I’m off VPN again.
I’ve adapted my workaround for this based on your feedback, running these commands while ‘crc start’ shows:
This has the desired effect and everything is started successfully
@gbraad @praveenkumar after assigning more resources to the VM it looks like the cluster has stabilised and I am using it just fine for the moment. I would say the steps provided by @michaelburch have resolved the issue for Windows 10 Home users also 😃
@praveenkumar @kevprice83 Can you have a look at this?