Openshift CodeReady 容器无法在 Mac M1 Max 上启动

问题描述 投票:0回答:1

我正在尝试使用 crc 在本地设置 openshift。

所以在我的 mac m1 max 上运行

crc setup
crc start
。看起来虚拟机已创建,但未启动。

见下图:

crc 设置输出

 ~/oc  crc setup
INFO Using bundle path /Users/myuser/.crc/cache/crc_vfkit_4.13.12_arm64.crcbundle
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 Checking if running emulated on a M1 CPU
INFO Checking if vfkit is installed
INFO Checking if CRC bundle is extracted in '$HOME/.crc'
INFO Checking if /Users/myuser/.crc/cache/crc_vfkit_4.13.12_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
Your system is correctly setup for using CRC. Use 'crc start' to start the instance

crc 开始 - 调试

~/oc  crc start --log-level debug
DEBU CRC version: 2.27.0+71615e
DEBU OpenShift version: 4.13.12
DEBU Podman version: 4.4.4
DEBU Running 'crc start'
DEBU Total memory of system is 68719476736 bytes
DEBU No new version available. The latest version is 2.27.0
DEBU Checking file: /Users/myuser/.crc/machines/crc/.crc-exist
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
DEBU GOARCH is arm64 GOOS is darwin
INFO Checking if crc executable symlink exists
INFO Checking minimum RAM requirements
DEBU Total memory of system is 68719476736 bytes
INFO Checking if running emulated on a M1 CPU
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
DEBU Running 'bash -c launchctl list | grep com.redhat.crc.daemon | awk '{print $1}''
DEBU Checking file: /Users/myuser/.crc/machines/crc/.crc-exist
INFO Loading bundle: crc_vfkit_4.13.12_arm64...
DEBU Checking file: /Users/myuser/.crc/machines/crc/.crc-exist
INFO Starting CRC VM for openshift 4.13.12...
DEBU Updating CRC VM configuration
DEBU kern.osproductversion is: 12.2.1
DEBU Running /usr/local/crc/vfkit --cpus 5 --memory 9216 --kernel /Users/myuser/.crc/cache/crc_vfkit_4.13.12_arm64/vmlinuz-5.14.0-70.30.1.el9_0.aarch64 --initrd /Users/myuser/.crc/cache/crc_vfkit_4.13.12_arm64/initramfs-5.14.0-70.30.1.el9_0.aarch64.img --kernel-cmdline console=hvc0 BOOT_IMAGE=(hd0,gpt3)/ostree/rhcos-c7219cc2bd3d3735e9a3d08cbffb148914ba3f1553bf63068eaa8a734729a596/vmlinuz-5.14.0-70.30.1.el9_0.aarch64 ignition.platform.id=qemu ostree=/ostree/boot.1/rhcos/c7219cc2bd3d3735e9a3d08cbffb148914ba3f1553bf63068eaa8a734729a596/0 root=UUID=1c55fafe-7172-496b-93ff-c6299dec6903 rw rootflags=prjquota boot=UUID=9e5dad5d-8e75-40c2-a868-d104afe67bf5 systemd.unified_cgroup_hierarchy=0 systemd.legacy_systemd_cgroup_controller=1 --device virtio-serial,logFilePath=/Users/myuser/.crc/machines/crc/vfkit.log --device virtio-fs,sharedDir=/Users/myuser,mountTag=dir0 --device virtio-rng --device virtio-blk,path=/Users/myuser/.crc/machines/crc/crc.img --device virtio-vsock,port=1024,socketURL=/Users/myuser/.crc/tap.sock,listen --timesync vsockPort=1234
DEBU time="2023-10-04T16:24:51-04:00" level=info msg="&{5 9216 /Users/myuser/.crc/cache/crc_vfkit_4.13.12_arm64/vmlinuz-5.14.0-70.30.1.el9_0.aarch64 console=hvc0 BOOT_IMAGE=(hd0,gpt3)/ostree/rhcos-c7219cc2bd3d3735e9a3d08cbffb148914ba3f1553bf63068eaa8a734729a596/vmlinuz-5.14.0-70.30.1.el9_0.aarch64 ignition.platform.id=qemu ostree=/ostree/boot.1/rhcos/c7219cc2bd3d3735e9a3d08cbffb148914ba3f1553bf63068eaa8a734729a596/0 root=UUID=1c55fafe-7172-496b-93ff-c6299dec6903 rw rootflags=prjquota boot=UUID=9e5dad5d-8e75-40c2-a868-d104afe67bf5 systemd.unified_cgroup_hierarchy=0 systemd.legacy_systemd_cgroup_controller=1 /Users/myuser/.crc/cache/crc_vfkit_4.13.12_arm64/initramfs-5.14.0-70.30.1.el9_0.aarch64.img {[] false} vsockPort=1234 [virtio-serial,logFilePath=/Users/myuser/.crc/machines/crc/vfkit.log virtio-fs,sharedDir=/Users/myuser,mountTag=dir0 virtio-rng virtio-blk,path=/Users/myuser/.crc/machines/crc/crc.img virtio-vsock,port=1024,socketURL=/Users/myuser/.crc/tap.sock,listen] none://  false}"
DEBU time="2023-10-04T16:24:51-04:00" level=info msg="boot parameters: &{VmlinuzPath:/Users/myuser/.crc/cache/crc_vfkit_4.13.12_arm64/vmlinuz-5.14.0-70.30.1.el9_0.aarch64 KernelCmdLine:console=hvc0 BOOT_IMAGE=(hd0,gpt3)/ostree/rhcos-c7219cc2bd3d3735e9a3d08cbffb148914ba3f1553bf63068eaa8a734729a596/vmlinuz-5.14.0-70.30.1.el9_0.aarch64 ignition.platform.id=qemu ostree=/ostree/boot.1/rhcos/c7219cc2bd3d3735e9a3d08cbffb148914ba3f1553bf63068eaa8a734729a596/0 root=UUID=1c55fafe-7172-496b-93ff-c6299dec6903 rw rootflags=prjquota boot=UUID=9e5dad5d-8e75-40c2-a868-d104afe67bf5 systemd.unified_cgroup_hierarchy=0 systemd.legacy_systemd_cgroup_controller=1 InitrdPath:/Users/myuser/.crc/cache/crc_vfkit_4.13.12_arm64/initramfs-5.14.0-70.30.1.el9_0.aarch64.img}"
DEBU time="2023-10-04T16:24:51-04:00" level=info
DEBU time="2023-10-04T16:24:51-04:00" level=info msg="virtual machine parameters:"
DEBU time="2023-10-04T16:24:51-04:00" level=info msg="\tvCPUs: 5"
DEBU time="2023-10-04T16:24:51-04:00" level=info msg="\tmemory: 9216 MiB"
DEBU time="2023-10-04T16:24:51-04:00" level=info
DEBU time="2023-10-04T16:24:51-04:00" level=info msg="Adding virtio-serial device (logFile: /Users/myuser/.crc/machines/crc/vfkit.log)"
DEBU time="2023-10-04T16:24:51-04:00" level=info msg="Adding virtio-fs device"
DEBU time="2023-10-04T16:24:51-04:00" level=info msg="Adding virtio-rng device"
DEBU time="2023-10-04T16:24:51-04:00" level=info msg="Adding virtio-blk device (imagePath: /Users/myuser/.crc/machines/crc/crc.img)"
DEBU time="2023-10-04T16:24:51-04:00" level=info msg="Adding virtio-vsock device"
DEBU time="2023-10-04T16:24:51-04:00" level=info msg="virtual machine is running"
DEBU time="2023-10-04T16:24:51-04:00" level=info msg="Exposing vsock port 1024 on /Users/myuser/.crc/tap.sock (listening)"
DEBU time="2023-10-04T16:24:51-04:00" level=info msg="Setting up host/guest time synchronization"
DEBU time="2023-10-04T16:24:51-04:00" level=info msg="waiting for VM to stop"
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
Error starting machine: Error in driver during machine start: exit status 1

crc 状态

 ~/oc  crc status
CRC VM:          Stopped
OpenShift:       Stopped (v4.13.12)
RAM Usage:       0B of 0B
Disk Usage:      0B of 0B (Inside the CRC VM)
Cache Usage:     37.62GB
Cache Directory: /Users/myuser/.crc/cache

系统规格

~/  system_profiler SPSoftwareDataType SPHardwareDataType
Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro18,4
      Chip: Apple M1 Max
      Total Number of Cores: 10 (8 performance and 2 efficiency)
      Memory: 64 GB
      System Firmware Version: 7429.81.3
      OS Loader Version: 7429.81.3
      Activation Lock Status: Enabled

Software:

    System Software Overview:

      System Version: macOS 12.2.1 (21D62)
      Kernel Version: Darwin 21.3.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Secure Virtual Memory: Enabled
      System Integrity Protection: Enabled
      Time since boot: 7:44

crc 配置视图

 ~/oc  crc config view
- consent-telemetry                     : no
- cpus                                  : 5
- pull-secret-file                      : /Users/myuser/oc/secret

crc ip

 ~/oc  crc ip
127.0.0.1
openshift
1个回答
0
投票

对于遇到此问题的任何人,将 macOS 升级到最新版本应该可以解决问题。

之前:

 ~  sw_vers
ProductName:    macOS
ProductVersion: 12.2.1
BuildVersion:   21D62

之后:

 ~  sw_vers
ProductName:    macOS
ProductVersion: 12.7
BuildVersion:   21G816
© www.soinside.com 2019 - 2024. All rights reserved.