mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
37 lines
1.0 KiB
Plaintext
37 lines
1.0 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * virt/storage/virt-using-preallocation-for-datavolumes.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="virt-enabling-preallocation-for-dv_{context}"]
|
|
= Enabling preallocation for a data volume
|
|
|
|
[role="_abstract"]
|
|
You can enable preallocation for specific data volumes by including the `spec.preallocation` field in the data volume manifest. You can enable preallocation mode in either the web console or by using the OpenShift CLI (`oc`).
|
|
|
|
Preallocation mode is supported for all CDI source types.
|
|
|
|
.Procedure
|
|
|
|
* Specify the `spec.preallocation` field in the data volume manifest:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
apiVersion: cdi.kubevirt.io/v1beta1
|
|
kind: DataVolume
|
|
metadata:
|
|
name: preallocated-datavolume
|
|
spec:
|
|
source: <1>
|
|
registry:
|
|
url: <image_url> <2>
|
|
storage:
|
|
resources:
|
|
requests:
|
|
storage: 1Gi
|
|
preallocation: true
|
|
# ...
|
|
----
|
|
<1> All CDI source types support preallocation. However, preallocation is ignored for cloning operations.
|
|
<2> Specify the URL of the data source in your registry.
|