@@ -65,24 +65,27 @@ var (
6565 defaultAzureNetworkResourceGroup = func (clusterID string ) string {
6666 return fmt .Sprintf ("%s-rg" , clusterID )
6767 }
68- defaultAzureImageResourceID = func (clusterID string ) string {
69- // image gallery names cannot have dashes
70- galleryName := strings .Replace (clusterID , "-" , "_" , - 1 )
71- imageName := clusterID
68+ defaultAzureImage = func () machinev1beta1.Image {
7269 if arch == ARM64 {
73- // append gen2 to the image name for ARM64.
74- // Although the installer creates a gen2 image for AMD64, we cannot guarantee that clusters created
75- // before that change will have a -gen2 image.
76- imageName = fmt .Sprintf ("%s-gen2" , clusterID )
70+ return urnToImage (defaultAzureARMImageURN )
7771 }
78- return fmt . Sprintf ( "/resourceGroups/%s/providers/Microsoft.Compute/galleries/gallery_%s/images/%s/versions/%s" , clusterID + "-rg" , galleryName , imageName , azureRHCOSVersion )
72+ return urnToImage ( defaultAzureX86ImageURN )
7973 }
8074 defaultAzureManagedIdentiy = func (clusterID string ) string {
8175 return fmt .Sprintf ("%s-identity" , clusterID )
8276 }
8377 defaultAzureResourceGroup = func (clusterID string ) string {
8478 return fmt .Sprintf ("%s-rg" , clusterID )
8579 }
80+ urnToImage = func (urn string ) machinev1beta1.Image {
81+ attributes := strings .Split (urn , ":" )
82+ return machinev1beta1.Image {
83+ Publisher : attributes [0 ],
84+ Offer : attributes [1 ],
85+ SKU : attributes [2 ],
86+ Version : attributes [3 ],
87+ }
88+ }
8689
8790 // GCP Defaults
8891 defaultGCPNetwork = func (clusterID string ) string {
@@ -164,6 +167,8 @@ const (
164167 defaultAzureCredentialsSecret = "azure-cloud-credentials"
165168 defaultAzureOSDiskOSType = "Linux"
166169 defaultAzureOSDiskStorageType = "Premium_LRS"
170+ defaultAzureX86ImageURN = "azureopenshift:aro4:aro_420:9.6.20251015" // hyperV Gen1
171+ defaultAzureARMImageURN = "azureopenshift:aro4:420-arm:9.6.20251015"
167172
168173 // Azure OSDisk constants
169174 azureMaxDiskSizeGB = 32768
@@ -1012,7 +1017,7 @@ func defaultAzure(m *machinev1beta1.Machine, config *admissionConfig) (bool, []s
10121017 }
10131018
10141019 if providerSpec .Image == (machinev1beta1.Image {}) {
1015- providerSpec .Image . ResourceID = defaultAzureImageResourceID ( config . clusterID )
1020+ providerSpec .Image = defaultAzureImage ( )
10161021 }
10171022
10181023 if providerSpec .UserDataSecret == nil {
0 commit comments