When attempting to restore a Velero backup to another cluster, you might encounter an error messages like those listed below:
CloneFromSnapshot crd:
Message: cloneFromSnapshot: Failed at calling SnapshotManager CreateVolumeFromSnapshotWithMetadata with peId pvc:testpvc/local-test-pvc, err: PVC "test │
│ -testpv-0" did not become Bound: PersistentVolumeClaims [local
-testpv-0
] not all in phase Bound within 3m0s │
│ Error creating volume from metadata"
download crd:
Message: Failed to download snapshot, ivd:ee02v032-9176-8017-167c-08b87ad6397c:de13592f-36a2-8948-70f1-35f2d6745a084, from durable object storage. Data copy failed fro │
│ m PE ivd:b7c7c89s-0192-9lk7-bhk1-27d72hh172al, to PE ivd:ee02v032-9176-8017-167c-08b87ad6397c:de13592f-36a2-8948-70f1-35f2d6745a084: Open virtual disk file failed. The error code is 1 │
│ . with error code: 1
Velero pod logs:
│ time="2024-06-25T10:02:36Z" level=error msg="Failed to download snapshot,ivd:es02v032-9176-8017-167c-08b87ad6397c:de13592f-36a2-8948-70f1-35f2d6745a08, from durable object storage. │
│ Data copy failed from PE ivd:892f7c57-1cc8-9c71-9097-87c2a9ck01kx, to PE ivd:es02v032-9176-8017-167c-08b87ad6397c:de13592f-36a2-8948-70f1-35f2d6745a08: Open virtual disk file faile │
│ d. The error code is 1. with error code: 1" controller=download generation=5 logSource="/go/src/github.com/vmware-tanzu/velero-plugin-for-vsphere/pkg/controller/download_controller. │
│ go:289" name=download-DGdWJXkR-WnQk-7XZ7-2hRd-WJRkDn2ZJQh7-2nJkDd2h-XRDp-7nZD-p2p2-QXJnnRJnhDZo namespace=velero phase=Retry
This issue can be caused by a known limitation with Velero.
REF:
https://github.com/vmware-tanzu/velero-plugin-for-vsphere/blob/main/docs/vanilla.md#restore
Using a StorageClass with the WaitForFirstConsumer Volume Binding Mode is not supported at restore time. Only a StorageClass with the Immediate Volume Binding Mode is supported at restore time. You'll have to change the Volume Binding Mode from WaitForFirstConsumer to Immediate for restore to work.