crc-org / crc

CRC is a tool to help you run containers. It manages a local OpenShift 4.x cluster, Microshift or a Podman VM optimized for testing and development purposes
https://crc.dev
Apache License 2.0
1.25k stars 236 forks source link

Can't install on Windows 10. Stuck on 'Please reboot your system and run 'crc setup' to complete the setup process' #3282

Open brubrz opened 2 years ago

brubrz commented 2 years ago

CRC version: 2.6.0+e7251680 OpenShift version: 4.10.22 Podman version: 4.1.0

Windows Build: 21H2 (Build 19044.1826)

After rebooting, I get the installer, after entering the pull secret I get an error without any more details than "reboot again". This repeatedly happens on reboot.

2022-08-02 15_08_44-Red Hat OpenShift Local

Running crc setup from admin powershell after reboot also does not change anything.

anjannath commented 2 years ago

can you please provide the log files its in $HOMEDIR/.crc/{crc.log, crcd.log}

brubrz commented 2 years ago

Yes sir. I don't have a crcd.log. crc.log

The last two lines will go away if I log in to the vpn before proceeding with the installer. These:

time="2022-08-02T15:09:21+02:00" level=debug msg="sending request - Post \"https://api.segment.io/v1/batch\": proxyconnect tcp: dial tcp: lookup proxy_dns: no such host"
time="2022-08-02T15:09:21+02:00" level=debug msg="1 messages dropped because they failed to be sent and the client was closed"

but the logs also end abruptly after:

time="2022-08-02T15:09:19+02:00" level=info msg="Will run as admin: adding current user to Hyper-V administrator group"
time="2022-08-02T15:09:19+02:00" level=debug msg="Running 'C:\\Users\\XXXXXXX\\AppData\\Local\\Temp\\crcScripts2563480096\\runAsAdmin.ps1'"
time="2022-08-02T15:09:21+02:00" level=debug msg="Running '(Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\" -Name ReleaseId).ReleaseId'"
time="2022-08-02T15:09:21+02:00" level=debug msg="Running '(Get-ItemProperty -Path \"HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\").EditionID'"
gbraad commented 2 years ago

can you try running crc setup from a powershell and let us know what it reports?

brubrz commented 2 years ago

It always reports:

INFO Using bundle path C:\Users\XXXXXXXX\.crc\cache\crc_hyperv_4.10.22_amd64.crcbundle
INFO Checking if current user is in Hyper-V Admins group
INFO Adding current user to Hyper-V Admins group
INFO Will run as admin: adding current user to Hyper-V administrator group
Please reboot your system and run 'crc setup' to complete the setup process

Even if I just rebooted.

praveenkumar commented 2 years ago

@brubrz can you use the issue template and provide more info so we can able to reproduce it and try to fix https://github.com/code-ready/crc/issues/new?assignees=&labels=kind%2Fbug%2C+status%2Fneed+triage&template=bug_report.md&title=%5BBUG%5D

gbraad commented 2 years ago

Are you a domain user?

INFO Adding current user to Hyper-V Admins group INFO Will run as admin: adding current user to Hyper-V administrator group

^^^ As instructed please fill the issue template.

brubrz commented 2 years ago

General information

CRC version

CRC version: 2.6.0+e7251680
OpenShift version: 4.10.22
Podman version: 4.1.0

CRC status

DEBU CRC version: 2.6.0+e7251680
DEBU OpenShift version: 4.10.22
DEBU Podman version: 4.1.0
DEBU Running 'crc status'
DEBU Checking file: C:\Users\weinek\.crc\machines\crc\.crc-exist
DEBU Running '(Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ReleaseId).ReleaseId'
DEBU Running '(Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").EditionID'
Machine does not exist. Use 'crc start' to create it

CRC config

- consent-telemetry                     : yes

Host Operating System

Hostname:                                      xxxxxxx
Betriebssystemname:                            Microsoft Windows 10 Enterprise
Betriebssystemversion:                         10.0.19044 Nicht zutreffend Build 19044
Betriebssystemhersteller:                      Microsoft Corporation
Betriebssystemkonfiguration:                   Mitglied der Domäne/Arbeitsgruppe
Betriebssystem-Buildtyp:                       Multiprocessor Free
Registrierter Benutzer:                        xxxxxxxx
Registrierte Organisation:                     xxxxxxxxx
Produkt-ID:                                    00329-00000-00003-AA062
Ursprüngliches Installationsdatum:             11.03.2022, 10:37:18
Systemstartzeit:                               04.08.2022, 16:10:34
Systemhersteller:                              LENOVO
Systemmodell:                                  20LTSAUL00
Systemtyp:                                     x64-based PC
Prozessor(en):                                 1 Prozessor(en) installiert.
                                               [01]: Intel64 Family 6 Model 142 Stepping 10 GenuineIntel ~2001 MHz
BIOS-Version:                                  LENOVO R0QET63W (1.40 ), 05.08.2020
Windows-Verzeichnis:                           C:\WINDOWS
System-Verzeichnis:                            C:\WINDOWS\system32
Startgerät:                                    \Device\HarddiskVolume1
Systemgebietsschema:                           de;Deutsch (Deutschland)
Eingabegebietsschema:                          de;Deutsch (Deutschland)
Zeitzone:                                      (UTC+01:00) Amsterdam, Berlin, Bern, Rom, Stockholm, Wien
Gesamter physischer Speicher:                  32.663 MB
Verfügbarer physischer Speicher:               17.772 MB
Virtueller Arbeitsspeicher: Maximale Größe:    37.527 MB
Virtueller Arbeitsspeicher: Verfügbar:         18.632 MB
Virtueller Arbeitsspeicher: Zurzeit verwendet: 18.895 MB
Auslagerungsdateipfad(e):                      C:\pagefile.sys
Domäne:                                        xxxxxxxx
Anmeldeserver:                              xxxxxxxxxx
Hotfix(es):                                    xxxxxxxxx
Netzwerkkarte(n):                              7 Netzwerkadapter installiert.
                                               [01]: Realtek 8822BE Wireless LAN 802.11ac PCI-E NIC
                                                     Verbindungsname: WLAN
                                                     Status:          Medien getrennt
                                               [02]: Hyper-V Virtual Ethernet Adapter
                                                     Verbindungsname: vEthernet (Default Switch)
                                                     DHCP aktiviert:  Nein
                                                     IP-Adresse(n)
                                                     [01]: xxxxxxxxx
                                                     [02]: xxxxxxxxx
                                               [03]: Cisco AnyConnect Secure Mobility Client Virtual Miniport Adapter for Windows x64
                                                     Verbindungsname: Ethernet 2
                                                     DHCP aktiviert:  Nein
                                                     IP-Adresse(n)
                                                     [01]: 172.31.224.1
                                                     [02]: fe80::b802:f50c:e141:ca82
                                                     [03]: fe80::5897:399a:2759:7236
                                               [04]: Hyper-V Virtual Ethernet Adapter
                                                     Verbindungsname: vEthernet (WSL)
                                                     DHCP aktiviert:  Nein
                                                     IP-Adresse(n)
                                                     [01]: 192.168.96.1
                                                     [02]: fe80::38bd:a70b:7252:13d6
                                               [05]: Intel(R) Ethernet Connection (4) I219-V
                                                     Verbindungsname: Ethernet
                                                     Status:          Medien getrennt
                                               [06]: Bluetooth Device (Personal Area Network)
                                                     Verbindungsname: Bluetooth-Netzwerkverbindung
                                                     Status:          Medien getrennt
                                               [07]: DisplayLink Network Adapter NCM
                                                     Verbindungsname: Ethernet 9
                                                     DHCP aktiviert:  Ja
                                                     DHCP-Server:     192.168.0.1
                                                     IP-Adresse(n)
                                                     [01]: 192.168.0.208
                                                     [02]: fe80::3dcb:8785:ad1d:6a9c
Anforderungen für Hyper-V:                     Es wurde ein Hypervisor erkannt. Features, die für Hyper-V erforderlich sind, werden nicht angezeigt.

Steps to reproduce

Install crc with windows msi. Reboot after being prompted. Follow the wizard until last step.

Expected

The wizard proceeds and the installation is completed successfully.

Actual

I get the error: Setup failed, please reboot the system. This persists no matter how many times I reboot.

Logs

Before gather the logs try following if that fix your issue

$ crc delete -f
$ crc cleanup
$ crc setup
$ crc start --log-level debug

Did not fix the issue.

$ crc start --log-level debug
DEBU CRC version: 2.6.0+e7251680
DEBU OpenShift version: 4.10.22
DEBU Podman version: 4.1.0
DEBU Running 'crc start'
DEBU Total memory of system is 34249330688 bytes
DEBU Running '(Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ReleaseId).ReleaseId'
DEBU Running '(Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").EditionID'
file 'C:\Users\weinek\.crc\cache\crc_hyperv_4.10.22_amd64.crcbundle' does not exist
brubrz commented 2 years ago

Are you a domain user?

Sorry, I do not understand the question. What exactly do mean with domain user?

anjannath commented 2 years ago

can you please run crc setup --log-level debug and provide the output?

brubrz commented 2 years ago
PS C:\WINDOWS\system32> crc setup --log-level debug
DEBU CRC version: 2.6.0+e7251680
DEBU OpenShift version: 4.10.22
DEBU Podman version: 4.1.0
DEBU Running 'crc setup'
INFO Using bundle path C:\Users\weinek\.crc\cache\crc_hyperv_4.10.22_amd64.crcbundle
INFO Checking if current user is in Hyper-V Admins group
DEBU Running '$sid = New-Object System.Security.Principal.SecurityIdentifier("S-1-5-32-578")
        @([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole($sid)'
DEBU User is not a member of the Hyper-V administrators group
INFO Adding current user to Hyper-V Admins group
DEBU Running '(New-Object System.Security.Principal.SecurityIdentifier("S-1-5-32-578")).Translate([System.Security.Principal.NTAccount]).Value'
INFO Will run as admin: adding current user to Hyper-V administrator group
DEBU Running 'C:\Users\weinek\AppData\Local\Temp\crcScripts702198803\runAsAdmin.ps1'
DEBU Running '(Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ReleaseId).ReleaseId'
DEBU Running '(Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").EditionID'
Please reboot your system and run 'crc setup' to complete the setup process
stale[bot] commented 1 year ago

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.

hurzelpurzel commented 1 year ago

I got a similar issue and I found out that crc using the USERNAME env variable to resolve the Group membership. In my case I got a domain user but USERNAME only contains the USER part and the domain was in a USERDOMAIN env variable. After setting the env variable USERNAME=%USERDOMAIN%\%USERNAME% before starting crc setup and crc start, this solved my problem: crc found the hyper-v group membership and all went well.

gbraad commented 1 year ago

Thanks for the info. We will have a look if we can somehow fix this issue.

On Sat, Feb 18, 2023 at 6:09 PM Ludger Pottmeier @.***> wrote:

I got a similar issue and I detected taht crc using the USERNAME env variable to resolve the Group membership. In my case I got a domain user but USERNAME only contains the USER part and the domain was in a USERDOMAIN env variable. After setting the env variable USERNAME=%USERDOMAIN%%USERNAME% before starting crc setup and crc start, this solved my problem: crc found the hyper-v group membership and all went well.

— Reply to this email directly, view it on GitHub https://github.com/crc-org/crc/issues/3282#issuecomment-1435589774, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAAOZWLYTKBEUYM6YG5IXTWYCNWBANCNFSM55LCVNHQ . You are receiving this because you commented.Message ID: @.***>

--

Gerard Braad | http://gbraad.nl

STEM is the source, but BUILD is how you develop! [ Better Understanding Involves Learning and Doing ]

hurzelpurzel commented 1 year ago

Recently filled a PR

Am 18.02.23 um 16:41 schrieb Gerard Braad:

Thanks for the info. We will have a look if we can somehow fix this issue.

On Sat, Feb 18, 2023 at 6:09 PM Ludger Pottmeier @.***> wrote:

I got a similar issue and I detected taht crc using the USERNAME env variable to resolve the Group membership. In my case I got a domain user but USERNAME only contains the USER part and the domain was in a USERDOMAIN env variable. After setting the env variable USERNAME=%USERDOMAIN%%USERNAME% before starting crc setup and crc start, this solved my problem: crc found the hyper-v group membership and all went well.

— Reply to this email directly, view it on GitHub https://github.com/crc-org/crc/issues/3282#issuecomment-1435589774, or unsubscribe

https://github.com/notifications/unsubscribe-auth/AAAAOZWLYTKBEUYM6YG5IXTWYCNWBANCNFSM55LCVNHQ . You are receiving this because you commented.Message ID: @.***>

--

Gerard Braad | http://gbraad.nl

STEM is the source, but BUILD is how you develop! [ Better Understanding Involves Learning and Doing ]

— Reply to this email directly, view it on GitHub https://github.com/crc-org/crc/issues/3282#issuecomment-1435702682, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADACKDVMQYRRIPFTZA66QZTWYDUUPANCNFSM55LCVNHQ. You are receiving this because you commented.Message ID: @.***>

vtarin commented 1 year ago

I got a similar issue and I found out that crc using the USERNAME env variable to resolve the Group membership. In my case I got a domain user but USERNAME only contains the USER part and the domain was in a USERDOMAIN env variable. After setting the env variable USERNAME=%USERDOMAIN%%USERNAME% before starting crc setup and crc start, this solved my problem: crc found the hyper-v group membership and all went well.

I had the same issue, the domain name was not taken into account in the pre-flight check, but the user is indeed correctly in the group membership. I could solve it by bypassing the pre-flight check: crc config set skip-check-user-in-crc-users-and-hyperv-admins-group true

anjannath commented 1 year ago

Recently @hurzelpurzel filed a PR to fix this, which is included in our latest 2.15 release https://github.com/crc-org/crc/releases/tag/v2.15.0

please give this a try and see if it fixed now

bklyngaucho commented 1 year ago

Just experienced this with 2.16. Running W11 Pro, on a domain. Had to skip pre-flight check and then made it through.

bigheat4711 commented 9 months ago

This is still an issue in

PS C:\Program Files\Red Hat OpenShift Local> crc version
CRC version: 2.30.0+b6532a
OpenShift version: 4.14.3
Podman version: 4.4.4

(W10 Pro witch active SVM and Hypervisor-V)

Had to do the same "crc config set ... " trick as mentioned before and voila, for the first time a saw the "downloading" part.

PS C:\Program Files\Red Hat OpenShift Local> crc config set skip-check-user-in-crc-users-and-hyperv-admins-group true
Successfully configured skip-check-user-in-crc-users-and-hyperv-admins-group to true
PS C:\Program Files\Red Hat OpenShift Local> crc setup
INFO Using bundle path C:\Users\h5\.crc\cache\crc_hyperv_4.14.3_amd64.crcbundle
INFO Checking minimum RAM requirements
INFO Checking if current user is in crc-users and Hyper-V admins group
WARN Skipping above check...
INFO Checking if CRC bundle is extracted in '$HOME/.crc'
INFO Checking if C:\Users\h5\.crc\cache\crc_hyperv_4.14.3_amd64.crcbundle exists
INFO Getting bundle for the CRC executable
INFO Downloading bundle: C:\Users\h5\.crc\cache\crc_hyperv_4.14.3_amd64.crcbundle...
330.50 MiB / 4.35 GiB [---------------->___________________________________________________________________________________________________________________________________________________________________________________________________________________] 7.42% 38.86 MiB/s

I got a similar issue and I found out that crc using the USERNAME env variable to resolve the Group membership. In my case I got a domain user but USERNAME only contains the USER part and the domain was in a USERDOMAIN env variable. After setting the env variable USERNAME=%USERDOMAIN%%USERNAME% before starting crc setup and crc start, this solved my problem: crc found the hyper-v group membership and all went well.

I had the same issue, the domain name was not taken into account in the pre-flight check, but the user is indeed correctly in the group membership. I could solve it by bypassing the pre-flight check: crc config set skip-check-user-in-crc-users-and-hyperv-admins-group true

anjannath commented 8 months ago

@bigheat4711 did you install using the MSI or choco? and did you reboot after installing, please follow the issue template and create a new issue.

If the required groups are not present crc start won't work after the setup