7.18.9.2. 데이터 볼륨에 빈 디스크 이미지 만들기

데이터 볼륨 구성 파일을 사용자 정의하고 배포하여 영구 볼륨 클레임에 빈 디스크 이미지를 새로 만들 수 있습니다.

사전 요구 사항

  • 사용 가능한 영구 볼륨이 1개 이상 있습니다.
  • OpenShift CLI(oc)를 설치합니다.

절차

  1. 데이터 볼륨 구성 파일을 편집합니다.

    apiVersion: cdi.kubevirt.io/v1beta1
    kind: DataVolume
    metadata:
      name: blank-image-datavolume
    spec:
      source:
          blank: {}
      pvc:
        # Optional: Set the storage class or omit to accept the default
        # storageClassName: "hostpath"
        accessModes:
          - ReadWriteOnce
        resources:
          requests:
            storage: 500Mi
  2. 다음 명령을 실행하여 빈 디스크 이미지를 만듭니다.

    $ oc create -f <blank-image-datavolume>.yaml