# CDI — Containerized Data Importer KubeVirt's `containerized-data-importer` for populating PVCs from external sources (HTTP, HTTPS, container registry, S3, virtctl upload). Required to import the Windows Server 2025 ISO into the `windows-server-2025-iso` PVC that `apps/kubevirt-vms/ci1.yaml` mounts as a CDROM. ## Files | File | Source | Purpose | | ----------------- | ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | | `cdi-operator.yaml` | [`v1.65.0`](https://github.com/kubevirt/containerized-data-importer/releases/tag/v1.65.0) — verbatim copy | Installs operator + CRDs (5779 lines, large) | | `cdi-cr.yaml` | [`v1.65.0`](https://github.com/kubevirt/containerized-data-importer/releases/tag/v1.65.0) — annotated + commented | Tells operator to deploy CDI components | `cdi-operator.yaml` is **vendored verbatim** from the upstream release for air-gap reproducibility (no internet fetch at deploy time, ArgoCD prune contracts hold). To bump versions: ```bash CDI_VER=v1.66.0 # for example curl -sL "https://github.com/kubevirt/containerized-data-importer/releases/download/${CDI_VER}/cdi-operator.yaml" \ -o apps/cdi/cdi-operator.yaml curl -sL "https://github.com/kubevirt/containerized-data-importer/releases/download/${CDI_VER}/cdi-cr.yaml" \ -o /tmp/cdi-cr-new.yaml # then re-apply project header diff git diff apps/cdi/ # review git commit + push ``` ## Verify after deploy ```bash kubectl -n cdi get pods # operator + apiserver + deployment + uploadproxy kubectl get cdis cdi -o jsonpath='{.status.phase}' # "Deployed" kubectl get crd | grep cdi.kubevirt.io # Expected CRDs: datavolumes.cdi.kubevirt.io, cdiconfigs.cdi.kubevirt.io, # storageprofiles.cdi.kubevirt.io, dataimportcrons.cdi.kubevirt.io, # datasources.cdi.kubevirt.io, objecttransfers.cdi.kubevirt.io ``` ## Use after install ```yaml # Example DataVolume that imports from HTTP apiVersion: cdi.kubevirt.io/v1beta1 kind: DataVolume metadata: name: my-iso spec: source: http: url: "https://server/path/to.iso" pvc: accessModes: [ReadWriteOnce] resources: requests: storage: 10Gi storageClassName: longhorn ``` ```bash # Or upload from local disk via virtctl virtctl image-upload pvc my-iso \ --image-path ./my.iso \ --size 10Gi \ --storage-class longhorn \ --access-mode ReadWriteOnce \ --uploadproxy-url https://cdi-uploadproxy.cdi.svc:443 \ --insecure ```