Configuring CRC

About CRC configuration

Use the crc config command to configure both the crc executable and the CRC instance. The crc config command requires a subcommand to act on the configuration. The available subcommands are get, set, unset, and view. The get, set, and unset subcommands operate on named configurable properties. Run the crc config --help command to list the available properties.

You can also use the crc config command to configure the behavior of the startup checks for the crc start and crc setup commands. By default, startup checks report an error and stop execution when their conditions are not met. Set the value of a property starting with skip-check to true to skip the check.

Viewing CRC configuration

The CRC executable provides commands to view configurable properties and the current CRC configuration.

Procedure
  1. To view the complete current configuration diverting from default values:

    $ crc config view
  2. To list the available configurable properties:

    $ crc config --help
  3. To view the values for a configurable property:

    $ crc config get <property>

Configuring usage data collection

CRC prompts you before use for optional, anonymous usage data collection to assist with development. No personally identifiable information is collected.

Consenting usage data collection

You can grant consent for usage data collection at any time.

Procedure
  1. Configure CRC to grant consent for usage data collection.

    $ crc config set consent-telemetry yes
  2. Restart your CRC instance to enable the change.

    $ crc stop
    $ crc start

Revoking usage data collection

You can revoke consent for usage data collection at any time.

Procedure
  1. Configure CRC to revoke consent for usage data collection.

    $ crc config set consent-telemetry no
  2. Restart your CRC instance to enable the change.

    $ crc stop
    $ crc start

Changing the selected preset

You can change the container runtime used for the CRC instance by selecting the desired preset before creating the instance.

You cannot change the preset of an existing CRC instance.

Procedure
  1. Change the selected preset from the command line:

    $ crc config set preset <name>

    Valid preset names are:

    Table 1. Preset names
    Name Preset

    openshift

    OpenShift Container Platform

    okd

    OKD

    microshift

    MicroShift

  2. Save any desired information stored in your existing instance.

  3. Delete the existing CRC instance.

    $ crc delete
  4. Start the new CRC instance:

    $ crc start

Configuring the instance

Use the cpus and memory properties to configure the default number of vCPUs and amount of memory available to the CRC instance, respectively.

Alternatively, the number of vCPUs and amount of memory can be assigned using the --cpus and --memory flags to the crc start command, respectively.

You cannot change the configuration of a running CRC instance. To enable configuration changes, you must stop the running instance and start it again.

Procedure
  1. To configure the number of vCPUs available to the instance:

    $ crc config set cpus <number>

    The default value for the cpus property is 4. The number of vCPUs to assign must be greater than or equal to the default.

  2. To start the instance with the desired number of vCPUs:

    $ crc start --cpus <number>
  3. To configure the memory available to the instance:

    $ crc config set memory <number-in-mib>

    Values for available memory are set in mebibytes (MiB). One gibibyte (GiB) of memory is equal to 1024 MiB.

    The default value for the memory property is 10752. The amount of memory to assign must be greater than or equal to the default.

  4. To start the instance with the desired amount of memory:

    $ crc start --memory <number-in-mib>