Skip to content

Commit 4960943

Browse files
Merge pull request openshift#8454 from nutanix-cloud-native/OCPBUGS-33570
OCPBUGS-33570: Nutanix IPI install with capi failed to set bootType
2 parents c8febae + a012e7a commit 4960943

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pkg/asset/machines/nutanix/capimachines.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ func generateNutanixMachine(machineName string, providerSpec *machinev1.NutanixM
164164
},
165165
Subnets: []capnv1.NutanixResourceIdentifier{},
166166
AdditionalCategories: categoryIdentifiers,
167-
BootType: capnv1.NutanixBootType(providerSpec.BootType),
168167
},
169168
}
170169
ntxMachine.SetGroupVersionKind(capnv1.GroupVersion.WithKind("NutanixMachine"))
@@ -185,8 +184,13 @@ func generateNutanixMachine(machineName string, providerSpec *machinev1.NutanixM
185184
})
186185
}
187186

188-
if providerSpec.BootType != "" {
189-
ntxMachine.Spec.BootType = capnv1.NutanixBootType(providerSpec.BootType)
187+
switch providerSpec.BootType {
188+
case machinev1.NutanixLegacyBoot:
189+
ntxMachine.Spec.BootType = capnv1.NutanixBootTypeLegacy
190+
case machinev1.NutanixUEFIBoot, machinev1.NutanixSecureBoot:
191+
ntxMachine.Spec.BootType = capnv1.NutanixBootTypeUEFI
192+
default:
193+
// Use the default boot type
190194
}
191195

192196
if providerSpec.Project.Type != "" {

0 commit comments

Comments
 (0)