In certain environments, administrators may observe that Harbor pods fail to start and remain stuck in the PodVMCreationFailed state. Running kubectl describe pod -n <namespace> shows the following error message:
Status: FailedReason: PodVMCreationFailedMessage: Cannot find VM vm-<ID>
This condition prevents Harbor pods from running successfully and can disrupt container registry services. The issue is typically encountered when the underlying VM resources required for pod scheduling are unavailable.
VMware vSphere Kubernetes Service
Supervisor Service using vSphere Pods
The PodVMCreationFailed state occurs when Kubernetes attempts to schedule a pod onto a virtual machine that is no longer available or accessible. In such cases, the scheduler references a VM ID that cannot be found, resulting in the error message:
Reason: PodVMCreationFailedMessage: Cannot find VM vm-<ID>
This condition is typically triggered by underlying infrastructure faults such as:
Because the pod depends on the control plane VM for creation, any disruption to that VM prevents the pod from being instantiated successfully, leaving it stuck in the PodVMCreationFailed state.
To remediate the issue perform the following resolution:
Follow the steps outlined in the resolution of Broadcom Knowledge Base article: 🔗 https://knowledge.broadcom.com/external/article?articleNumber=389895
1. Delete all pods that are not in a running state:
kubectl delete pod -n <namespace> $(kubectl get pods -n <namespace> --field-selector=status.phase!=Running -o jsonpath='{.items[*].metadata.name}')
2. Force delete pods if standard deletion fails:
kubectl delete pod <pod-name> --grace-period=0 --force
For detailed instructions and further context, refer to the Broadcom Knowledge Base article: 🔗 https://knowledge.broadcom.com/external/article?articleNumber=389895