Successfully ran crc setup but crc start hangs on trying to contact api.crc.testing. The CRC is there in the Hyper-V manager, started.
>crc setup
INFO Checking if oc binary is cached
INFO Checking if CRC bundle is cached in '$HOME/.crc'
INFO Checking if running as normal user
INFO Checking Windows 10 release
INFO Checking if Hyper-V is installed and operational
INFO Checking if user is a member of the Hyper-V Administrators group
INFO Checking if Hyper-V service is enabled
INFO Checking if the Hyper-V virtual switch exist
INFO Found Virtual Switch to use: Default Switch
Setup is complete, you can now run 'crc start' to start the OpenShift cluster
`>crc status
ERRO Unable to connect to the server: dial tcp 172.23.176.21:6443: connectex: No connection could be made because the target machine actively refused it.
>crc ip
172.23.176.21
@mrethers following is expected and it does retry for few times to check the api server connectivity, if that fails and exit then it is a bug. Can you wait for some time and after few retries it should work.
DEBU Unable to connect to the server: dial tcp: lookup api.crc.testing: no such host
DEBU error: Temporary Error: exit status 1 - sleeping 1s
DEBU retry loop 1
DEBU Unable to connect to the server: dial tcp: lookup api.crc.testing: no such host
DEBU error: Temporary Error: exit status 1 - sleeping 1s
DEBU retry loop 2
DEBU Unable to connect to the server: dial tcp: lookup api.crc.testing: no such host
DEBU error: Temporary Error: exit status 1 - sleeping 1s
DEBU retry loop 3
DEBU Unable to connect to the server: dial tcp 172.23.176.21:6443: connectex: No connection could be made because the target machine actively refused it.
DEBU error: Temporary Error: exit status 1 - sleeping 1s
is this reproducible and how long have you waited?
INFO Found Virtual Switch to use: Default Switch
Enterprise does NOT come with a Default Switch, so this is a manual configured Virtual Switch? You need a DHCP server that hands out valid addresses for your segment, and we need to be able to attach a DNS server (or you have to provide one yourself).
^^ #965 Disallow user created Virtual Switch named "Default Switch" should be worked on soon-ish
Thanks for the feedback. I managed to get it to work by creating a new external switch manually called crc and everything was smooth sailing after that. There was a Default Internal switch, might have been setup by Docker at some point as I can see a Docker Desktop VM in the Hyper-V manager. In any case, it wasn't clear at all what needed to happen and if the issue cannot be addressed directly in the installer for Enterprise, it would be useful to at least point the user in the right direction. Maybe do a test early on with the Default Switch and alert the user that it's misconfigured and they should create one manually?
There was a Default Internal switch
I noticed that 1903 of Enterprise DOES come with the Defautl Switch. I am investigating this now, as it might work slightly different?
We are still looking into #924, but I was short on resources (had no access to a Win10Ent install) but got that sorted.
I have tested this multiple times with 1903 and have no issues. The problems you see on the Default Switch must have to be related to something else ...
... what network tools are on the machine?
1903
Correction: tested with 1909.
I had the same type of issues using Windows 10 Enterprise Build 17763, that also came with a Default Switch. The issue there turned out to be that the VM did not get any IP from Hyper-V when I inspected it in the Hyper-V Manager. Somewhere around that time I learned about the "crc" switch workaround and stopped trying to get the Default Switch to work.
I hit same problem on windows 10 pro.
Solution -
DNS needs to be configured to your router or local machine. After change it started working:
C:>crc start
INFO Checking if oc binary is cached
INFO Checking if podman remote binary is cached
INFO Checking if running as normal user
INFO Checking Windows 10 release
INFO Checking if Hyper-V is installed and operational
INFO Checking if user is a member of the Hyper-V Administrators group
INFO Checking if Hyper-V service is enabled
INFO Checking if the Hyper-V virtual switch exist
INFO Found Virtual Switch to use: Default Switch
INFO Starting CodeReady Containers VM for OpenShift 4.3.8...
INFO Verifying validity of the cluster certificates ...
INFO Will run as admin: add dns server address to interface vEthernet (Default Switch)
INFO Check internal and public DNS query ...
INFO Check DNS query from host ...
INFO Starting OpenShift cluster ... [waiting 3m]
INFO
INFO To access the cluster, first set up your environment by following 'crc oc-env' instructions
INFO Then you can access it by running 'oc login -u developer -p developer https://api.crc.testing:6443'
INFO To login as an admin, run 'oc login -u kubeadmin -p kKdPx-pjmWe-b3kuu-jeZm3 https://api.crc.testing:6443'
INFO
INFO You can now run 'crc console' and use these credentials to access the OpenShift web console
Started the OpenShift cluster
WARN The cluster might report a degraded or error state. This is expected since several operators have been disabled to lower the resource usage. For more information, please consult the documentation
C:>crc status
CRC VM: Running
OpenShift: Running (v4.3.8)
Disk Usage: 15.41GB of 32.72GB (Inside the CRC VM)
Cache Usage: 14.2GB
I hit same problem on windows 10 pro.
Solution -
DNS needs to be configured to your router or local machine. After change it started working:C:>crc start
INFO Checking if oc binary is cached
INFO Checking if podman remote binary is cached
INFO Checking if running as normal user
INFO Checking Windows 10 release
INFO Checking if Hyper-V is installed and operational
INFO Checking if user is a member of the Hyper-V Administrators group
INFO Checking if Hyper-V service is enabled
INFO Checking if the Hyper-V virtual switch exist
INFO Found Virtual Switch to use: Default Switch
INFO Starting CodeReady Containers VM for OpenShift 4.3.8...
INFO Verifying validity of the cluster certificates ...
INFO Will run as admin: add dns server address to interface vEthernet (Default Switch)
INFO Check internal and public DNS query ...
INFO Check DNS query from host ...
INFO Starting OpenShift cluster ... [waiting 3m]
INFO
INFO To access the cluster, first set up your environment by following 'crc oc-env' instructions
INFO Then you can access it by running 'oc login -u developer -p developer https://api.crc.testing:6443'
INFO To login as an admin, run 'oc login -u kubeadmin -p kKdPx-pjmWe-b3kuu-jeZm3 https://api.crc.testing:6443'
INFO
INFO You can now run 'crc console' and use these credentials to access the OpenShift web console
Started the OpenShift cluster
WARN The cluster might report a degraded or error state. This is expected since several operators have been disabled to lower the resource usage. For more information, please consult the documentationC:>crc status
CRC VM: Running
OpenShift: Running (v4.3.8)
Disk Usage: 15.41GB of 32.72GB (Inside the CRC VM)
Cache Usage: 14.2GB
Can you explain how did you do? I tried to add as secondary dns the ip of mine router but it doesn't work.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@madhavi-reddy24 could you elaborate further on what you did exactly to resolve this? I have the same issue and the only way I could workaround it was by catching the assigned IP before it reaches the check and update the hosts file manually. Once I did that then all DNS checks passed. I was able to access the console and all but one pod is running. The sdn-controller pod is failing to start the network controller so I expect there are going to be more issues as a result and clearly something is wrong with my networking here.
Most helpful comment
Can you explain how did you do? I tried to add as secondary dns the ip of mine router but it doesn't work.