Я использую kubevirt CDI для загрузки моего локального изображения в PV C.
В настоящее время мой кластер имеет класс хранения по умолчанию, и он отлично работает, когда я загружаю другие изображения (я пробовал 2 и 5 G).
, но когда я пытаюсь загрузить изображение windows, которое 17G, он всегда застрял в конце.
Я использую эту команду:
kubectl-virt image-upload \
--image-path=/mnt/disks/images/chen-win-server-disk.qcow2 \
--pvc-name=win-svr-image \
--access-mode=ReadOnlyMany \
--pvc-size=25G \
--uploadproxy-url=https://10.109.0.11:443 \
--insecure \
--wait-secs=1500
Через некоторое время он показывает, что прогресс загрузки равен 100% для следующего журнала и застрял там .
Uploading data completed successfully, waiting for processing to complete, you can hit ctrl-c without interrupting the progress.
Если я осматриваю объекты, у меня получается следующий результат:
k get datavolume
NAME PHASE PROGRESS AGE
iso-win2k12 Succeeded N/A 3h51m
node-vm-disk Succeeded N/A 25h
win-svr-image UploadReady N/A 120m
k get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
iso-win2k12 Bound pvc-f5a49723-e3e3-41cb-b960-50b9407758b5 5Gi ROX standard 3h53m
node-vm-disk Bound pvc-e2486ff6-5fbc-4f07-af66-ab694cadd491 25Gi RWO standard 25h
win-svr-image Bound pvc-1c911baa-bf4d-4589-9414-13e71a4b88b5 24Gi ROX standard 121m
win-svr-image-scratch Bound pvc-2d50fae6-d39f-4650-8159-6af1bde21d45 24Gi RWO standard 121m
k describe pvc win-svr-image-scratch
Name: win-svr-image-scratch
Namespace: default
StorageClass: standard
Status: Bound
Volume: pvc-2d50fae6-d39f-4650-8159-6af1bde21d45
Labels: app=containerized-data-importer
cdi-controller=cdi-upload-win-svr-image
cdi.kubevirt.io/storage.import.importPvcName=win-svr-image
Annotations: pv.kubernetes.io/bind-completed: yes
pv.kubernetes.io/bound-by-controller: yes
volume.beta.kubernetes.io/storage-provisioner: kubernetes.io/gce-pd
Finalizers: [kubernetes.io/pvc-protection]
Capacity: 24Gi
Access Modes: RWO
VolumeMode: Filesystem
Mounted By: cdi-upload-win-svr-image
Events: <none>
k get pods
NAME READY STATUS RESTARTS AGE
cdi-upload-win-svr-image 1/1 Running 1 125m
k logs cdi-upload-win-svr-image
I0402 07:46:17.736610 1 uploadserver.go:62] Upload destination: /data/disk.img
I0402 07:46:17.736718 1 uploadserver.go:64] Running server on 0.0.0.0:8443
k logs -n kube-system kube-controller-manager-chen-k8s-master
I0402 07:29:46.846875 1 event.go:278] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"default", Name:"win-svr-image", UID:"1c911baa-bf4d-4589-9414-13e71a4b88b5", APIVersion:"v1", ResourceVersion:"471463", FieldPath:""}): type: 'Normal' reason: 'ProvisioningSucceeded' Successfully provisioned volume pvc-1c911baa-bf4d-4589-9414-13e71a4b88b5 using kubernetes.io/gce-pd
I0402 07:29:47.380831 1 event.go:278] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"default", Name:"win-svr-image-scratch", UID:"2d50fae6-d39f-4650-8159-6af1bde21d45", APIVersion:"v1", ResourceVersion:"471468", FieldPath:""}): type: 'Normal' reason: 'ProvisioningSucceeded' Successfully provisioned volume pvc-2d50fae6-d39f-4650-8159-6af1bde21d45 using kubernetes.io/gce-pd
I0402 07:29:48.652503 1 reconciler.go:275] attacherDetacher.AttachVolume started for volume "pvc-1c911baa-bf4d-4589-9414-13e71a4b88b5" (UniqueName: "kubernetes.io/gce-pd/kubernetes-dynamic-pvc-1c911baa-bf4d-4589-9414-13e71a4b88b5") from node "chen-k8s-node-2"
I0402 07:29:48.652645 1 reconciler.go:275] attacherDetacher.AttachVolume started for volume "pvc-2d50fae6-d39f-4650-8159-6af1bde21d45" (UniqueName: "kubernetes.io/gce-pd/kubernetes-dynamic-pvc-2d50fae6-d39f-4650-8159-6af1bde21d45") from node "chen-k8s-node-2"
I0402 07:29:53.349141 1 operation_generator.go:361] AttachVolume.Attach succeeded for volume "pvc-2d50fae6-d39f-4650-8159-6af1bde21d45" (UniqueName: "kubernetes.io/gce-pd/kubernetes-dynamic-pvc-2d50fae6-d39f-4650-8159-6af1bde21d45") from node "chen-k8s-node-2"
I0402 07:29:53.349363 1 event.go:278] Event(v1.ObjectReference{Kind:"Pod", Namespace:"default", Name:"cdi-upload-win-svr-image", UID:"ea287917-80bb-4e7b-9e71-1f0e9c64c854", APIVersion:"v1", ResourceVersion:"471507", FieldPath:""}): type: 'Normal' reason: 'SuccessfulAttachVolume' AttachVolume.Attach succeeded for volume "pvc-2d50fae6-d39f-4650-8159-6af1bde21d45"
I0402 07:29:56.987153 1 operation_generator.go:361] AttachVolume.Attach succeeded for volume "pvc-1c911baa-bf4d-4589-9414-13e71a4b88b5" (UniqueName: "kubernetes.io/gce-pd/kubernetes-dynamic-pvc-1c911baa-bf4d-4589-9414-13e71a4b88b5") from node "chen-k8s-node-2"
I0402 07:29:56.987283 1 event.go:278] Event(v1.ObjectReference{Kind:"Pod", Namespace:"default", Name:"cdi-upload-win-svr-image", UID:"ea287917-80bb-4e7b-9e71-1f0e9c64c854", APIVersion:"v1", ResourceVersion:"471507", FieldPath:""}): type: 'Normal' reason: 'SuccessfulAttachVolume' AttachVolume.Attach succeeded for volume "pvc-1c911baa-bf4d-4589-9414-13e71a4b88b5"