Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRC cannot be started anymore mac #4513

Open
rmestrum opened this issue Dec 13, 2024 · 19 comments
Open

CRC cannot be started anymore mac #4513

rmestrum opened this issue Dec 13, 2024 · 19 comments
Labels
kind/bug Something isn't working

Comments

@rmestrum
Copy link

General information

Unable to start CRC on a MAC macOS version 15.1.1

When starting I get the following errors

INFO Using bundle path /Users/rmestrum/.crc/cache/crc_vfkit_4.17.7_arm64.crcbundle 
INFO Checking if running macOS version >= 13.x    
INFO Checking if running as non-root              
INFO Checking if crc-admin-helper executable is cached 
INFO Checking if running on a supported CPU architecture 
INFO Checking if crc executable symlink exists    
INFO Checking minimum RAM requirements            
INFO Check if Podman binary exists in: /Users/rmestrum/.crc/bin/oc 
INFO Checking if running emulated on Apple silicon 
INFO Checking if vfkit is installed               
INFO Checking if old launchd config for tray and/or daemon exists 
INFO Checking if crc daemon plist file is present and loaded 
INFO Checking SSH port availability               
INFO Loading bundle: crc_vfkit_4.17.7_arm64...    
INFO Creating CRC VM for OpenShift 4.17.7...      
INFO Generating new SSH key pair...               
INFO Generating new password for the kubeadmin user 
INFO Starting CRC VM for openshift 4.17.7...      
INFO CRC instance is running with IP 127.0.0.1    
INFO CRC VM is running                            
INFO Updating authorized keys...                  
INFO Resizing /dev/vda4 filesystem                
INFO Configuring shared directories               
INFO Check internal and public DNS query...       
WARN Failed public DNS query from the cluster: ssh command error:
command : curl --head quay.io
err     : Process exited with status 6
 :  
INFO Check DNS query from host...                 
INFO Verifying validity of the kubelet certificates... 
INFO Starting kubelet service                     
INFO Waiting for kube-apiserver availability... [takes around 2min] 
INFO Adding user's pull secret to the cluster...  
INFO Updating SSH key to machine config resource... 
INFO Waiting until the user's pull secret is written to the instance disk... 
Failed to update pull secret on the disk: Temporary error: pull secret not updated to disk (x2)
failed to read /var/lib/kubelet/config.json file: ssh command error:
command : sudo cat /var/lib/kubelet/config.json
err     : Process exited with status 1
: /bin/bash: Input/output error

Operating System

macOS

Hypervisor

vfkit

Did you run crc setup before crc start?

yes

Running on

Laptop

Steps to reproduce

  • Download the latest version of CRC (2.45.0+7aeb3b in my case)
  • Run crc setup
  • Run crc start -p

CRC version

❯ crc version  
CRC version: 2.45.0+7aeb3b
OpenShift version: 4.17.7
MicroShift version: 4.17.7

CRC status

❯ crc status                                      
CRC VM:          Running
OpenShift:       Unreachable (v4.17.7)
RAM Usage:       0B of 0B
Disk Usage:      -1B of -1B (Inside the CRC VM)
Cache Usage:     38.87GB
Cache Directory: /Users/rmestrum/.crc/cache

CRC config

❯ crc config view             
- consent-telemetry                     : no
- disk-size                             : 100
- memory                                : 14000

Host Operating System

❯ sw_vers          
ProductName:		macOS
ProductVersion:		15.1.1
BuildVersion:		24B91

Expected behavior

CRC starts and runs so it can be used.

Actual behavior

CRC starts gives error and CRC is not usable

CRC Logs

https://gist.github.com/rmestrum/9cb779c0c94770e7c81940d3794f760f

Additional context

No response

@rmestrum rmestrum added the kind/bug Something isn't working label Dec 13, 2024
@cfergeau
Copy link
Contributor

DEBU non-retriable error: failed to read /var/lib/kubelet/config.json file: ssh command error:
command : sudo cat /var/lib/kubelet/config.json
err     : Process exited with status 1
: /bin/bash: Input/output error 

This error is worrying, could be disk corruption, or maybe the cached bundle? Can you check you have enough free disk space? If you do, can you remove ~/.crc/cache/crc_vfkit_4.17.7_arm64, run crc cleanup and try again to use crc setup && crc start?

@rmestrum
Copy link
Author

I already cleanup everything in my opinion but I followed the instructions and yes I have enough diskspace
Image

Here is the output:

❯ rm -rf ~/.crc/cache/crc_vfkit_4.17.7_arm64 
❯ ls -al ~/.crc/cache                   
.rw-rw-r-- 5.3G rmestrum  6 Dec 07:09  crc_vfkit_4.17.7_arm64.crcbundle
❯ crc cleanup                                                       
INFO Unloading and removing the daemon plist file 
INFO Removing /etc/resolver/testing file          
INFO Stopping CRC vfkit process                   
INFO Removing CRC Specific entries from user's known_hosts file 
INFO Removing hosts file records added by CRC     
INFO Removing pull secret from the keyring        
INFO Removing older logs                          
Cleanup finished

❯ crc setup                                                         
INFO Using bundle path /Users/rmestrum/.crc/cache/crc_vfkit_4.17.7_arm64.crcbundle 
INFO Checking if running macOS version >= 13.x    
INFO Checking if running as non-root              
INFO Checking if crc-admin-helper executable is cached 
INFO Checking if running on a supported CPU architecture 
INFO Checking if crc executable symlink exists    
INFO Creating symlink for crc executable          
INFO Checking minimum RAM requirements            
INFO Check if Podman binary exists in: /Users/rmestrum/.crc/bin/oc 
INFO Checking if running emulated on Apple silicon 
INFO Checking if vfkit is installed               
INFO Checking if CRC bundle is extracted in '$HOME/.crc' 
INFO Checking if /Users/rmestrum/.crc/cache/crc_vfkit_4.17.7_arm64.crcbundle exists 
INFO Getting bundle for the CRC executable        
INFO Downloading bundle: /Users/rmestrum/.crc/cache/crc_vfkit_4.17.7_arm64.crcbundle... 
0 B / 4.94 GiB [______________________________________________________________________________________________________________________________________________________________________________________________________________________________] 0.00% ??/s
INFO Uncompressing /Users/rmestrum/.crc/cache/crc_vfkit_4.17.7_arm64.crcbundle 
crc.img:  31.00 GiB / 31.00 GiB [----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00%
oc:  125.37 MiB / 125.37 MiB [-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00%
INFO Checking if old launchd config for tray and/or daemon exists 
INFO Checking if crc daemon plist file is present and loaded 
INFO Adding crc daemon plist file and loading it  
INFO Checking SSH port availability               
Your system is correctly setup for using CRC. Use 'crc start' to start the instance

❯ crc start -p /Users/rmestrum/CRC/pull-secret.txt                  
INFO Using bundle path /Users/rmestrum/.crc/cache/crc_vfkit_4.17.7_arm64.crcbundle 
INFO Checking if running macOS version >= 13.x    
INFO Checking if running as non-root              
INFO Checking if crc-admin-helper executable is cached 
INFO Checking if running on a supported CPU architecture 
INFO Checking if crc executable symlink exists    
INFO Checking minimum RAM requirements            
INFO Check if Podman binary exists in: /Users/rmestrum/.crc/bin/oc 
INFO Checking if running emulated on Apple silicon 
INFO Checking if vfkit is installed               
INFO Checking if old launchd config for tray and/or daemon exists 
INFO Checking if crc daemon plist file is present and loaded 
INFO Checking SSH port availability               
INFO Loading bundle: crc_vfkit_4.17.7_arm64...    
INFO Creating CRC VM for OpenShift 4.17.7...      
INFO Generating new SSH key pair...               
INFO Generating new password for the kubeadmin user 
INFO Starting CRC VM for openshift 4.17.7...      
INFO CRC instance is running with IP 127.0.0.1    
INFO CRC VM is running                            
INFO Updating authorized keys...                  
INFO Resizing /dev/vda4 filesystem                
INFO Configuring shared directories               
INFO Check internal and public DNS query...       
INFO Check DNS query from host...                 
INFO Verifying validity of the kubelet certificates... 
INFO Starting kubelet service                     
INFO Waiting for kube-apiserver availability... [takes around 2min] 
INFO Adding user's pull secret to the cluster...  
INFO Updating SSH key to machine config resource... 
INFO Waiting until the user's pull secret is written to the instance disk... 
Failed to update pull secret on the disk: Temporary error: pull secret not updated to disk (x3)
failed to read /var/lib/kubelet/config.json file: ssh command error:
command : sudo cat /var/lib/kubelet/config.json
err     : Process exited with status 1
: sudo: unable to execute /bin/cat: Input/output error

@jmanteau
Copy link

jmanteau commented Dec 15, 2024

I also have the same error on 14.7.1 (and I have 200GB free)

❯ crc cleanup
INFO Unloading and removing the daemon plist file
INFO Removing /etc/resolver/testing file
INFO Stopping CRC vfkit process
INFO Removing CRC Specific entries from user's known_hosts file
INFO Removing hosts file records added by CRC
INFO Removing pull secret from the keyring
INFO Removing older logs
Cleanup finished


❯  crc setup
INFO Using bundle path /Users/to108637/.crc/cache/crc_vfkit_4.17.7_arm64.crcbundle
INFO Checking if running macOS version >= 13.x
INFO Checking if running as non-root
INFO Checking if crc-admin-helper executable is cached
INFO Checking if running on a supported CPU architecture
INFO Checking if crc executable symlink exists
INFO Creating symlink for crc executable
INFO Checking minimum RAM requirements
INFO Check if Podman binary exists in: /Users/to108637/.crc/bin/oc
INFO Checking if running emulated on Apple silicon
INFO Checking if vfkit is installed
INFO Checking if CRC bundle is extracted in '$HOME/.crc'
INFO Checking if /Users/to108637/.crc/cache/crc_vfkit_4.17.7_arm64.crcbundle exists
INFO Checking if old launchd config for tray and/or daemon exists
INFO Checking if crc daemon plist file is present and loaded
INFO Adding crc daemon plist file and loading it
INFO Checking SSH port availability
Your system is correctly setup for using CRC. Use 'crc start' to start the instance


❯ crc start
INFO Using bundle path /Users/to108637/.crc/cache/crc_vfkit_4.17.7_arm64.crcbundle
INFO Checking if running macOS version >= 13.x
INFO Checking if running as non-root
INFO Checking if crc-admin-helper executable is cached
INFO Checking if running on a supported CPU architecture
INFO Checking if crc executable symlink exists
INFO Checking minimum RAM requirements
INFO Check if Podman binary exists in: /Users/to108637/.crc/bin/oc
INFO Checking if running emulated on Apple silicon
INFO Checking if vfkit is installed
INFO Checking if old launchd config for tray and/or daemon exists
INFO Checking if crc daemon plist file is present and loaded
INFO Checking SSH port availability
INFO Loading bundle: crc_vfkit_4.17.7_arm64...
CRC requires a pull secret to download content from Red Hat.
You can copy it from the Pull Secret section of https://console.redhat.com/openshift/create/local.
? Please enter the pull secret *****************************************************************************************

INFO Creating CRC VM for OpenShift 4.17.7...
INFO Generating new SSH key pair...
INFO Generating new password for the kubeadmin user
INFO Starting CRC VM for openshift 4.17.7...
INFO CRC instance is running with IP 127.0.0.1
INFO CRC VM is running
INFO Updating authorized keys...
INFO Configuring shared directories
INFO Check internal and public DNS query...
INFO Check DNS query from host...
INFO Verifying validity of the kubelet certificates...
INFO Starting kubelet service
INFO Waiting for kube-apiserver availability... [takes around 2min]
INFO Adding user's pull secret to the cluster...
INFO Updating SSH key to machine config resource...
INFO Waiting until the user's pull secret is written to the instance disk...
Failed to update pull secret on the disk: Temporary error: pull secret not updated to disk (x19)```

@2manoj1
Copy link

2manoj1 commented Jan 3, 2025

Same issue in Mac M1
OS version: 14.6.1

CRC version: 2.45.0
Any solution?

@praveenkumar
Copy link
Member

When you folks hit this issue can use https://crc.dev/engineering-docs/Debugging.html#access-the-vm and see if able to ssh to the VM and if /var/lib/kubelet/config.json file present?

@2manoj1
Copy link

2manoj1 commented Jan 6, 2025

I followed that document, still no luck.
Setup 12GB vRAM
60 GB disk

Secret copy and paste.

Anything else we need to do?

@praveenkumar
Copy link
Member

I followed that document, still no luck.

Please be specific, what do you mean by no luck? does ssh to VM failed or config.json file was not present?

@2manoj1
Copy link

2manoj1 commented Jan 6, 2025

I follow -
Download latest crc in Macos.
Install it.

Run below command
crc setup
crc start

Also tried crc start -p ~/Downloads/pull-secret.txt

Image Image

@praveenkumar
Copy link
Member

Did you try #4513 (comment) what I have asked?

@2manoj1
Copy link

2manoj1 commented Jan 6, 2025

yes.

@praveenkumar
Copy link
Member

praveenkumar commented Jan 7, 2025

Looks like we forgot to update our docs around :(, can you execute ssh -i ~/.crc/machines/crc/id_ed25519 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p 2222 [email protected]

Also do you have docker-desktop/podman-desktop/minikube running on this system?

@2manoj1
Copy link

2manoj1 commented Jan 7, 2025

yes podman desktop on my system

I tried ssh -i ~/.crc/machines/crc/id_ed25519 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p 2222 [email protected]
Warning: Identity file /Users/mm/.crc/machines/crc/id_ed25519 not accessible: No such file or directory.
ssh: connect to host 127.0.0.1 port 2222: Connection refused


crc stop --force
crc cleanup
crc setup
crc start


INFO Loading bundle: crc_vfkit_4.17.7_arm64...
CRC requires a pull secret to download content from Red Hat.
You can copy it from the Pull Secret section of https://console.redhat.com/openshift/create/local.
? Please enter the pull secret *****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************

INFO Creating CRC VM for OpenShift 4.17.7...
INFO Generating new SSH key pair...
INFO Generating new password for the kubeadmin user
INFO Starting CRC VM for openshift 4.17.7...
INFO CRC instance is running with IP 127.0.0.1
INFO CRC VM is running
INFO Updating authorized keys...
INFO Resizing /dev/vda4 filesystem
INFO Configuring shared directories
INFO Check internal and public DNS query...
INFO Check DNS query from host...
INFO Verifying validity of the kubelet certificates...
INFO Starting kubelet service
INFO Waiting for kube-apiserver availability... [takes around 2min]
INFO Adding user's pull secret to the cluster...
INFO Updating SSH key to machine config resource...
INFO Waiting until the user's pull secret is written to the instance disk...
Failed to update pull secret on the disk: Temporary error: pull secret not updated to disk (x2)
failed to read /var/lib/kubelet/config.json file: ssh command error:
command : sudo cat /var/lib/kubelet/config.json
err : Process exited with status 1
: /bin/bash: Input/output error

@praveenkumar
Copy link
Member

yes podman desktop on my system

@2manoj1 Can you try following and see if that fixes it?

  • Stop the podman machine either from podman desktop UI or from cli podman machine stop .
  • crc delete => crc cleanup => crc setup => crc start

@2manoj1
Copy link

2manoj1 commented Jan 8, 2025

@praveenkumar I tried but getting same error. I stop podman and follow suggested step. In hard disk 220 GB free. 16GB RAM Apple MAC M1 Pro. OS version - 14.6.1

~ % podman machine stop
Machine "podman-machine-default" stopped successfully

~ % crc delete
Machine does not exist. Use 'crc start' to create it
~ % crc cleanup
INFO Unloading and removing the daemon plist file
INFO Removing /etc/resolver/testing file
INFO Stopping CRC vfkit process
INFO Removing CRC Specific entries from user's known_hosts file
INFO Removing hosts file records added by CRC
INFO Removing pull secret from the keyring
INFO Removing older logs
Cleanup finished
~ % crc setup
INFO Using bundle path /Users/mm/.crc/cache/crc_vfkit_4.17.7_arm64.crcbundle
INFO Checking if running macOS version >= 13.x
INFO Checking if running as non-root
INFO Checking if crc-admin-helper executable is cached
INFO Checking if running on a supported CPU architecture
INFO Checking if crc executable symlink exists
INFO Creating symlink for crc executable
INFO Checking minimum RAM requirements
INFO Check if Podman binary exists in: /Users/mm/.crc/bin/oc
INFO Checking if running emulated on Apple silicon
INFO Checking if vfkit is installed
INFO Checking if CRC bundle is extracted in '$HOME/.crc'
INFO Checking if /Users/mm/.crc/cache/crc_vfkit_4.17.7_arm64.crcbundle exists
INFO Checking if old launchd config for tray and/or daemon exists
INFO Checking if crc daemon plist file is present and loaded
INFO Adding crc daemon plist file and loading it
INFO Checking SSH port availability
Your system is correctly setup for using CRC. Use 'crc start' to start the instance
~ % crc start
INFO Using bundle path /Users/mm/.crc/cache/crc_vfkit_4.17.7_arm64.crcbundle
INFO Checking if running macOS version >= 13.x
INFO Checking if running as non-root
INFO Checking if crc-admin-helper executable is cached
INFO Checking if running on a supported CPU architecture
INFO Checking if crc executable symlink exists
INFO Checking minimum RAM requirements
INFO Check if Podman binary exists in: /Users/mm/.crc/bin/oc
INFO Checking if running emulated on Apple silicon
INFO Checking if vfkit is installed
INFO Checking if old launchd config for tray and/or daemon exists
INFO Checking if crc daemon plist file is present and loaded
INFO Checking SSH port availability
INFO Loading bundle: crc_vfkit_4.17.7_arm64...
CRC requires a pull secret to download content from Red Hat.
You can copy it from the Pull Secret section of https://console.redhat.com/openshift/create/local.
? Please enter the pull secret ************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
INFO Creating CRC VM for OpenShift 4.17.7...
INFO Generating new SSH key pair...
INFO Generating new password for the kubeadmin user
INFO Starting CRC VM for openshift 4.17.7...

INFO CRC instance is running with IP 127.0.0.1
INFO CRC VM is running
INFO Updating authorized keys...
INFO Resizing /dev/vda4 filesystem
INFO Configuring shared directories
INFO Check internal and public DNS query...
INFO Check DNS query from host...
INFO Verifying validity of the kubelet certificates...
INFO Starting kubelet service
INFO Waiting for kube-apiserver availability... [takes around 2min]
INFO Adding user's pull secret to the cluster...
INFO Updating SSH key to machine config resource...
INFO Waiting until the user's pull secret is written to the instance disk...
Failed to update pull secret on the disk: Temporary error: pull secret not updated to disk (x15)
failed to read /var/lib/kubelet/config.json file: ssh command error:
command : sudo cat /var/lib/kubelet/config.json

@praveenkumar
Copy link
Member

@2manoj1 Thanks for trying out and providing the info. Can you try one more thing instead of using OCP try using microshift preset and see if that works for you and ssh connectivity still working.

crc delete
crc cleanup
crc config set preset microshift
crc setup
crc start

@2manoj1
Copy link

2manoj1 commented Jan 8, 2025

@praveenkumar
microshift is install and start. OpenShift having issue. how to access microshift? I don't have idea microshift

@praveenkumar
Copy link
Member

https://www.redhat.com/en/topics/edge-computing/microshift explain what is microshift and if you want to consume it then kubeconfig file already added for same so you can run oc get pods -A and other queries using oc command.

@tylercreller
Copy link

tylercreller commented Jan 17, 2025

FYI nuking docker from my laptop completely resolved my issues here. Only using the podman binary now.

MacOS: Sequoia 15.2 (24C101)

@rmestrum
Copy link
Author

I check my mac and I don't have docker installed. I'll update to macos 15.2 soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants