// Module included in the following assemblies:
//
// * storage/container_storage_interface/persistent-storage-csi-group-snapshots.adoc

:_mod-docs-content-type: PROCEDURE
[id="persistent-storage-csi-group-snapshots-create-admin_{context}"]
= Creating a volume group snapshot class

[role="_abstract"]
Create a `VolumeGroupSnapshotClass` to define how volume group snapshots are provisioned, including the Container Storage Interface (CSI) driver and deletion policy. Cluster administrators must create this class before users can provision volume group snapshots.

.Prerequisites
* Logged in to a running {product-title} cluster with administrator privileges.
* Enabled this feature using feature gates. For information about how to use feature gates, see "Enabling features sets by using feature gates".

.Procedure
. Create a `VolumeGroupSnapshotClass` YAML file using the following example file:
+
.Example volume group snapshot class YAML file
[source, yaml]
----
apiVersion: groupsnapshot.storage.k8s.io/v1beta2
kind: VolumeGroupSnapshotClass
metadata:
  name: csi-hostpath-groupsnapclass
deletionPolicy: Delete
driver: hostpath.csi.k8s.io 
     …...
----
+
* `kind`: Specifies the `VolumeGroupSnapshotClass` object.
* `metadata.name`: Name of the `VolumeGroupSnapshotClass`.

. Create the 'VolumeGroupSnapshotClass' object by running the following command:
+
[source,terminal]
----
$ oc create -f <volume-group-snapshot-class-filename>.yaml
----
