@@ -227,6 +227,15 @@ func validateHostGroups(validationCtx *validationContext, cluster, hostGroup str
227227 return append (allErrs , field .NotFound (fldPath , hostGroup ))
228228}
229229
230+ /* Support Scenario Notes
231+ * <7 not supported - validation fail
232+ * <7.0.2 not supported because of CSI drivers - validation fail
233+ * >= 7.0.2 <8 - eol warning only - validation pass
234+ * >=8 - validation pass
235+ * https://knowledge.broadcom.com/external/article/326316/build-numbers-and-versions-of-vmware-vce.html
236+ * https://knowledge.broadcom.com/external/article/314608/correlating-vmware-cloud-foundation-vers.html
237+ */
238+
230239const (
231240 eolVSphereVersion int = 7
232241
@@ -239,31 +248,31 @@ const (
239248 // GA build of vCenter 8, there are no constraints with csi.
240249 supportedVCenterBuild int = 20519528
241250 supportedEsxiBuildNumber int = 20513097
251+
252+ vSphereCsiMinimumVersion string = "7.0.2"
242253)
243254
244- func getVSphereConstraints () (version.Constraints , version.Constraints , error ) {
245- eolConstraints , err := version .NewConstraint (fmt .Sprintf (">= %d, < %d" , eolVSphereVersion , supportedVSphereVersion ))
255+ func validateVCenterVersion (validationCtx * validationContext , fldPath * field.Path ) field.ErrorList {
256+ allErrs := field.ErrorList {}
257+
258+ // constraints
259+ // CSI version constraint
260+ csiConstraint , err := version .NewConstraint (fmt .Sprintf (">= %d, < %s" , eolVSphereVersion , vSphereCsiMinimumVersion ))
246261 if err != nil {
247- return nil , nil , err
262+ allErrs = append ( allErrs , field . InternalError ( fldPath , err ))
248263 }
249264
250- // We support vSphere 8 only, so >= 8 (covers semver minor and patch)
251- supportedConstraints , err := version .NewConstraint (fmt .Sprintf (">= %d, < %d" , supportedVSphereVersion , supportedVSphereVersion + 1 ))
265+ eolConstraints , err := version .NewConstraint (fmt .Sprintf (">= %d, < %d" , eolVSphereVersion , supportedVSphereVersion ))
252266 if err != nil {
253- return nil , nil , err
267+ allErrs = append ( allErrs , field . InternalError ( fldPath , err ))
254268 }
255- return eolConstraints , supportedConstraints , nil
256- }
257269
258- func validateVCenterVersion (validationCtx * validationContext , fldPath * field.Path ) field.ErrorList {
259- allErrs := field.ErrorList {}
260-
261- eolConstraints , supportedConstraints , err := getVSphereConstraints ()
270+ // We support vSphere 8 and VVF/VCF 9
271+ supportedConstraints , err := version .NewConstraint (fmt .Sprintf (">= %d" , supportedVSphereVersion ))
262272 if err != nil {
263273 allErrs = append (allErrs , field .InternalError (fldPath , err ))
264274 }
265275
266- // Current vCenter version
267276 vCenterVersion , err := version .NewVersion (validationCtx .Client .ServiceContent .About .Version )
268277 if err != nil {
269278 allErrs = append (allErrs , field .InternalError (fldPath , err ))
@@ -279,7 +288,13 @@ func validateVCenterVersion(validationCtx *validationContext, fldPath *field.Pat
279288 validationCtx .Client .ServiceContent .About .Version , validationCtx .Client .ServiceContent .About .Build )
280289
281290 switch {
291+ // case: vCenter < 7.0.2
292+ case csiConstraint .Check (vCenterVersion ):
293+ // case: < 7.0.2
294+ logrus .Warnf ("VMware vSphere 7 is end of service as of 10/2/2025. Current vCenter version: %s, build: %d" , vCenterVersion .String (), build )
295+ allErrs = append (allErrs , field .Required (fldPath , detail ))
282296 case eolConstraints .Check (vCenterVersion ):
297+ // case: >= 7.0.0 < 8.0.0
283298 // While vSphere 7 is EOL we can't block installs because a customer could
284299 // have an extended support and a support exception
285300 logrus .Warnf ("VMware vSphere 7 is end of service as of 10/2/2025. Current vCenter version: %s, build: %d" , vCenterVersion .String (), build )
@@ -289,13 +304,14 @@ func validateVCenterVersion(validationCtx *validationContext, fldPath *field.Pat
289304 allErrs = append (allErrs , field .Required (fldPath , detail ))
290305 }
291306 case supportedConstraints .Check (vCenterVersion ):
307+ // case: >= 8.0.0
292308 // This is currently set to the GA build number, all of vSphere 8 is supported
293309 if build < supportedVCenterBuild {
294310 allErrs = append (allErrs , field .Required (fldPath , detail ))
295311 }
296- // This covers prior to 7 and VCF 9 which is currently not tested
297312 default :
298- detail = fmt .Sprintf ("Unsupported or untested version of vSphere. Current vCenter version: %s, build: %s" ,
313+ // case: < 7.0.0
314+ detail = fmt .Sprintf ("Unsupported version of vSphere. Current vCenter version: %s, build: %s" ,
299315 validationCtx .Client .ServiceContent .About .Version , validationCtx .Client .ServiceContent .About .Build )
300316 allErrs = append (allErrs , field .Required (fldPath , detail ))
301317 }
@@ -310,7 +326,18 @@ func validateESXiVersion(validationCtx *validationContext, clusterPath string, v
310326 ctx , cancel := context .WithTimeout (context .TODO (), 60 * time .Second )
311327 defer cancel ()
312328
313- eolConstraints , supportedConstraints , err := getVSphereConstraints ()
329+ csiConstraint , err := version .NewConstraint (fmt .Sprintf (">= %d, < %s" , eolVSphereVersion , vSphereCsiMinimumVersion ))
330+ if err != nil {
331+ allErrs = append (allErrs , field .InternalError (vSphereFldPath , err ))
332+ }
333+
334+ eolConstraints , err := version .NewConstraint (fmt .Sprintf (">= %d, < %d" , eolVSphereVersion , supportedVSphereVersion ))
335+ if err != nil {
336+ allErrs = append (allErrs , field .InternalError (vSphereFldPath , err ))
337+ }
338+
339+ // We support vSphere 8 and VVF/VCF 9
340+ supportedConstraints , err := version .NewConstraint (fmt .Sprintf (">= %d" , supportedVSphereVersion ))
314341 if err != nil {
315342 allErrs = append (allErrs , field .InternalError (vSphereFldPath , err ))
316343 }
@@ -371,24 +398,28 @@ func validateESXiVersion(validationCtx *validationContext, clusterPath string, v
371398 }
372399
373400 switch {
401+ // case: vCenter < 7.0.2
402+ case csiConstraint .Check (esxiHostVersion ):
403+ // case: < 7.0.2
404+ logrus .Warnf ("VMware vSphere 7 is end of service as of 10/2/2025. The ESXi host: %s is version: %s and build: %s" ,
405+ h .Name (), mh .Config .Product .Version , mh .Config .Product .Build )
406+ allErrs = append (allErrs , field .Required (vSphereFldPath , detail ))
374407 case eolConstraints .Check (esxiHostVersion ):
375- // While vSphere 7 is EOL we can't block installs because a customer could
376- // have an extended support and a support exception
377408 logrus .Warnf ("VMware vSphere 7 is end of service as of 10/2/2025. The ESXi host: %s is version: %s and build: %s" ,
378409 h .Name (), mh .Config .Product .Version , mh .Config .Product .Build )
379-
380410 // Still running vSphere 7 but wrong build to use CSI driver
381411 if build < minimumEsxiBuildNumber {
382412 allErrs = append (allErrs , field .Required (vSphereFldPath , detail ))
383413 }
384414 case supportedConstraints .Check (esxiHostVersion ):
415+ // case: >= 8.0.0
385416 // This is currently set to the GA build number, all of vSphere 8 is supported
386417 if build < supportedEsxiBuildNumber {
387418 allErrs = append (allErrs , field .Required (vSphereFldPath , detail ))
388419 }
389- // This covers prior to 7 and VCF 9 which is currently not tested
390420 default :
391- detail = fmt .Sprintf ("Unsupported or untested version of vSphere. The ESXi host: %s is version: %s and build: %s" ,
421+ // case: < 7.0.0
422+ detail = fmt .Sprintf ("Unsupported version of vSphere. The ESXi host: %s is version: %s and build: %s" ,
392423 h .Name (), mh .Config .Product .Version , mh .Config .Product .Build )
393424 allErrs = append (allErrs , field .Required (vSphereFldPath , detail ))
394425 }
0 commit comments