---
title: Configuring CDI to override CPU and memory quotas
---

# Configuring CDI to override CPU and memory quotas {#virt-configuring-cdi-for-namespace-resourcequota}

You can configure the Containerized Data Importer (CDI) to import, upload, and clone virtual machine disks into namespaces that are subject to CPU and memory resource restrictions.

## About CPU and memory quotas in a namespace {#virt-about-cpu-and-memory-quota-namespace_virt-configuring-cdi-for-namespace-resourcequota}

A *resource quota*, defined by the `ResourceQuota` object, imposes restrictions on a namespace that limit the total amount of compute resources that can be consumed by resources within that namespace.

The `HyperConverged` custom resource (CR) defines the user configuration for the Containerized Data Importer (CDI). The CPU and memory request and limit values are set to a default value of `0`. This ensures that pods created by CDI that do not specify compute resource requirements are given the default values and are allowed to run in a namespace that is restricted with a quota.

## Overriding CPU and memory defaults {#virt-overriding-cpu-and-memory-defaults_virt-configuring-cdi-for-namespace-resourcequota}

Modify the default settings for CPU and memory requests and limits for your use case by adding the `spec.resourceRequirements.storageWorkloads` stanza to the `HyperConverged` custom resource (CR).

**Prerequisites**

- Install the OpenShift CLI (`oc`).

**Procedure**

1. Edit the `HyperConverged` CR by running the following command:

   ```terminal
   $ oc edit hyperconvergeds.v1beta1.hco.kubevirt.io kubevirt-hyperconverged -n openshift-cnv
   ```
2. Add the `spec.resourceRequirements.storageWorkloads` stanza to the CR, setting the values based on your use case. For example:

   ```yaml
   apiVersion: hco.kubevirt.io/v1beta1
   kind: HyperConverged
   metadata:
     name: kubevirt-hyperconverged
   spec:
     resourceRequirements:
       storageWorkloads:
         limits:
           cpu: "500m"
           memory: "2Gi"
         requests:
           cpu: "250m"
           memory: "1Gi"
   ```
3. Save and exit the editor to update the `HyperConverged` CR.

**Additional resources**
{._additional-resources}

- [Resource quotas per project](/openshift-docs-markdown/applications/quotas/quotas-setting-per-project#quotas-setting-per-project)
