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.26k stars 242 forks source link

[BUG] [macos] virtualization error: hypervisor virtualization error #4402

Open vandeand opened 1 month ago

vandeand commented 1 month ago

General information

CRC version

# Put `crc version` output here
CRC version: 2.42.0+6689ec
OpenShift version: 4.17.0
MicroShift version: 4.16.14

CRC status

DEBU CRC version: 2.42.0+6689ec                   
DEBU OpenShift version: 4.17.0                    
DEBU MicroShift version: 4.16.14                  
DEBU Running 'crc status'                         
CRC VM:          Stopped
OpenShift:       Stopped (v4.17.0)
RAM Usage:       0B of 0B
Disk Usage:      0B of 0B (Inside the CRC VM)
Cache Usage:     77.67GB
Cache Directory: /Users/vandeand/.crc/cache

CRC config

- consent-telemetry                     : no
- disk-size                             : 50
- memory                                : 16000

Host Operating System

ProductName:        macOS
ProductVersion:     14.5
BuildVersion:       23F79

Steps to reproduce

  1. Run crc start --log-level debug

Expected

crc to start up and allow access to do oc login and access https://console-openshift-console.apps-crc.testing/

Actual

Freezes after showing virtualization error: hypervisor virtualization error

Logs

Last part of logs for crc start --log-level debug

DEBU SSH command results: err: , output: machineconfig.machineconfiguration.openshift.io/99-master-ssh patched INFO Waiting until the user's pull secret is written to the instance disk... DEBU retry loop: attempt 0
DEBU Running SSH command:
DEBU SSH command succeeded
DEBU error: Temporary error: pull secret not updated to disk - sleeping 2s DEBU retry loop: attempt 1
DEBU Running SSH command:
DEBU SSH command succeeded
DEBU error: Temporary error: pull secret not updated to disk - sleeping 2s DEBU retry loop: attempt 2
DEBU Running SSH command:
DEBU SSH command succeeded
DEBU error: Temporary error: pull secret not updated to disk - sleeping 2s DEBU retry loop: attempt 3
DEBU Running SSH command:
DEBU SSH command succeeded
DEBU error: Temporary error: pull secret not updated to disk - sleeping 2s DEBU retry loop: attempt 4
DEBU Running SSH command:
DEBU SSH command succeeded
DEBU error: Temporary error: pull secret not updated to disk - sleeping 2s DEBU retry loop: attempt 5
DEBU Running SSH command:
DEBU SSH command succeeded
DEBU error: Temporary error: pull secret not updated to disk - sleeping 2s DEBU retry loop: attempt 6
DEBU Running SSH command:
DEBU SSH command succeeded
DEBU error: Temporary error: pull secret not updated to disk - sleeping 2s DEBU retry loop: attempt 7
DEBU Running SSH command:
DEBU SSH command succeeded
DEBU error: Temporary error: pull secret not updated to disk - sleeping 2s DEBU retry loop: attempt 8
DEBU Running SSH command:
DEBU SSH command succeeded
DEBU error: Temporary error: pull secret not updated to disk - sleeping 2s DEBU retry loop: attempt 9
DEBU Running SSH command:
DEBU SSH command succeeded
DEBU error: Temporary error: pull secret not updated to disk - sleeping 2s DEBU retry loop: attempt 10
DEBU Running SSH command:
DEBU SSH command succeeded
DEBU error: Temporary error: pull secret not updated to disk - sleeping 2s DEBU retry loop: attempt 11
DEBU Running SSH command:
DEBU SSH command succeeded
DEBU error: Temporary error: pull secret not updated to disk - sleeping 2s DEBU retry loop: attempt 12
DEBU Running SSH command:
DEBU SSH command succeeded
DEBU error: Temporary error: pull secret not updated to disk - sleeping 2s DEBU retry loop: attempt 13
DEBU Running SSH command:
DEBU SSH command succeeded
DEBU error: Temporary error: pull secret not updated to disk - sleeping 2s DEBU retry loop: attempt 14
DEBU Running SSH command:
DEBU SSH command succeeded
DEBU error: Temporary error: pull secret not updated to disk - sleeping 2s DEBU retry loop: attempt 15
DEBU Running SSH command:
DEBU Error: virtualization error: hypervisor virtualization error DEBU Usage:
DEBU vfkit [flags]
DEBU
DEBU Flags:
DEBU -b, --bootloader strings bootloader configuration (default []) DEBU -c, --cpus uint number of virtual CPUs (default 1) DEBU -d, --device stringArray devices
DEBU --gui display the contents of the virtual machine onto a graphical user interface DEBU -h, --help help for vfkit DEBU -i, --initrd string path to the virtual machine initrd DEBU -k, --kernel string path to the virtual machine linux kernel DEBU -C, --kernel-cmdline string linux kernel command line DEBU --log-level string set log level DEBU -m, --memory uint virtual machine RAM size in mibibytes (default 512) DEBU --restful-uri string URI address for RestFul services (default "none://") DEBU -t, --timesync string sync guest time when host wakes up from sleep DEBU -v, --version version for vfkit DEBU
DEBU virtualization error: hypervisor virtualization error

Before gather the logs try following if that fix your issue

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

Please consider posting the output of crc start --log-level debug on http://gist.github.com/ and post the link in the issue.

Sysiphos commented 2 weeks ago

Try reducing memory footprint ... that happens on my machine all the time when there is not enough memory ... you configured 16g are you sure you have more than that free memory?

vandenan commented 2 weeks ago

Try reducing memory footprint ... that happens on my machine all the time when there is not enough memory ... you configured 16g are you sure you have more than that free memory?

Thanks, that could be it, I will see if its possible to reduce the memory footprint of the application running in openshift

kaovilai commented 1 week ago

If memory is the case, I think it's better to test create vm early.. not wait until after several minutes.