Closed aocferreira closed 2 years ago
Why do you use 192.168.1.77
?
IIRC, that the Hyper-V virtual switches have forwarding disabled out of the box. This is also the reason why you are not able to connect from WSL to a VM.
Get-NetIPInterface | where {$_.InterfaceAlias -eq 'vEthernet (WSL)' -or $_.InterfaceAlias -eq 'vEthernet (Default Switch)'} | Set-NetIPInterface -Forwarding Enabled
Might this be the reason?
Hi gbraad,
Thanks for your reply.
I was using 192.168.1.77 because that's the IP address of my laptop on the local network 192.168.1.0/24.
So, you are saying that I should not connect via that interface but instead using below one?
Ethernet adapter vEthernet (Default Switch):
Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : fe80::d95f:e7ae:f5c:3ff1%36 IPv4 Address. . . . . . . . . . . : 172.24.64.1 Subnet Mask . . . . . . . . . . . : 255.255.240.0 Default Gateway . . . . . . . . . :
I cannot ping this address from my test VM... Let me know if I miss something..
from the VM:
the VM is running on the same host, connected to the Virtual Switch (Default Switch)
, right?
Sorry, i should have said that on this setup I have the VM running on VMware workstation. is it a problem connecting with CRC assuming its running on hyperV?
I am now very unclear of your setup.
You are running a nested virtualization setup, or is VMware running alongside of Hyper-V? I hope you understand that this kind of setup is not something we test. We can not reproduce anything involving VMware, so in that case you are responsible for your network configuration and settings. Perhaps someone in the community might be able to help.
Hi @gbraad VMware was running alongside Hyper-V, but I will test now to have my VM also running on HyperV together with 'crc' VM.. You are saying this setup should work? However i was checking and it seems this VM doesn't have external IP/network adapter and resolves only to 127.0.0.1 ... how should I be able to connect vrom my VM to CRC?
Any article that i can follow?
thanks.
i have now both VMs runing in HyperV and both of them connected to default Switch. Connectivity is working between them.
[test@localhost ~]$ oc login -u developer -p developer https://172.24.68.13:6443 The server is using a certificate that does not match its hostname: x509: certificate is valid for 10.217.4.1, not 172.24.68.13 You can bypass the certificate check, but any data you send to the server could be intercepted by others. Use insecure connections? (y/n): y
The connection to the server oauth-openshift.apps-crc.testing was refused - did you specify the right host or port?
Is this even suppose to work? Idea is to accomplish something similar as: https://github.com/code-ready/crc/issues/3038
But as far as I can see that issue was not resolved.
Thank you.
i've managed to connect. However, 'crc status' says that OpenShift is unreachable... Any idea why?
Not sure what the final setup looks like, but
However, 'crc status' says that OpenShift is unreachable
is based on a local query to the API. this might fail if things have moved around. If your environment works, reachable as intended by you, I would ignore the status value.
thanks for the help @gbraad .
General information
crc setup
before starting it (Yes/No)? YesCRC version
CRC status
CRC config
Host Operating System
Steps to reproduce
Expected
Remote access to OpenShift
Actual
[test@workstation ~]$ oc login -u developer -p developer https://192.168.1.77:9001 The server is using a certificate that does not match its hostname: x509: certificate is valid for 10.217.4.1, not 192.168.1.77 You can bypass the certificate check, but any data you send to the server could be intercepted by others. Use insecure connections? (y/n): y
Error from server (InternalError): Internal error occurred: unexpected response: 412
Logs
Before gather the logs try following if that fix your issue
Please consider posting the output of
crc start --log-level debug
on http://gist.github.com/ and post the link in the issue.https://gist.github.com/aocferreira/dfddb62a21dc3e2d001619cc7090d5e2