diff --git a/pkg/cloudprovider/providers/vsphere/vsphere.go b/pkg/cloudprovider/providers/vsphere/vsphere.go index 0dc5f103797..486a6ecffd1 100644 --- a/pkg/cloudprovider/providers/vsphere/vsphere.go +++ b/pkg/cloudprovider/providers/vsphere/vsphere.go @@ -94,6 +94,9 @@ func readInstanceID(cfg *VSphereConfig) (string, error) { if err != nil { return "", err } + if out.Len() == 0 { + return "", fmt.Errorf("unable to retrieve Instance ID") + } // Create context ctx, cancel := context.WithCancel(context.Background())