Recently, I am playing around TCE(Tanzu Community Edition) 0.10 in my homelab. I found something interesting and would like to share my findings here.
The environment is like below:
vSphere vCenter: 7.0.3
ESXi: 7.0.3
TCE: 0.10
Kubernetes : v1.21.5+vmware.1
vSphere CSI: csi.vsphere.vmware.com
k10: 4.5.10/4.5.11
Location profile: Minio S3/VBR v11a
The backup policy :
So that the policy will keep 1 daily snapshot in vSphere FCD. I can see the snapshot vmdk from the datastore after successful policy runs.
I can also do a restore job from my Minio S3. The restore job seems to work fine. But if I restore it into the original namespace and the original application is still existing, I may get an alarm from the vSphere side.
The error message is “A specified parameter was not correct: id Cannot be performed on FCD with snapshots.”
The reason for this alarm is k10 kicks off a pvc deletion task from Kubernetes side and Kubernetes passes it to vSphere directly. But from the vSphere side, the pvc is mapping to a vmdk with snapshot. vSphere couldn't delete this parent vmdk directly, it would break the snapshot chain.
To avoid this issue, we just need to remove all the snapshots from K10 GUI before we do the restore job.
So, for the vSphere integration, may I request that the restore job could check the existing snapshot and remove all the snapshots before kick off pvc deletion task?