OpenShift: unable to start CRC

3 min read | by Jordi Prats

While trying to setup CRC (a OpenShift version of minikube) on your laptop, while trying to start crc it might fail starting with the following crypting message:

$ crc start
requires memory in MiB >= 9216

This message might seem like it is not able to start it due to the lack of available resource, but what's really happening is that we haven't configured any resources at all for the VM that's going to run OpenShift. We can configure them using crc config set cpus and crc config set memory. For the CPUs, we should check the project's documentation for updated requirements, but setting it to 4 is going to be enough for most use-cases:

$ crc config set cpus 4
Changes to configuration property 'cpus' are only applied when the CRC instance is started.
If you already have a running CRC instance, then for this configuration change to take effect, stop the CRC instance with 'crc stop' and restart it with 'crc start'.

Regarding the memory size, we can start with 9216 as well:

$ crc config set memory 9216
Changes to configuration property 'memory' are only applied when the CRC instance is started.
If you already have a running CRC instance, then for this configuration change to take effect, stop the CRC instance with 'crc stop' and restart it with 'crc start'.

Once these settings have been set, we'll be able to start the VM using crc start:

$ crc start
INFO Checking if running as non-root
INFO Checking if crc-admin-helper executable is cached
INFO Checking for obsolete admin-helper executable
INFO Checking if running on a supported CPU architecture
INFO Checking minimum RAM requirements
INFO Checking if crc executable symlink exists
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
INFO Loading bundle: crc_vfkit_4.11.0_arm64...
INFO Creating CRC VM for openshift 4.11.0...
INFO Generating new SSH key pair...
INFO Generating new password for the kubeadmin user
INFO Starting CRC VM for openshift 4.11.0...
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]
(...)

Once this command finish, we'll be able to see how we are running OpenShift on a single virtual node on our local machine:

$ kubectl get nodes
NAME                 STATUS   ROLES           AGE   VERSION
crc-2src5-master-0   Ready    master,worker   14d   v1.24.0+9546431

Posted on 23/08/2022