From 2723554b2a36f199be696a2ddd80008c41ca9966 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Thu, 26 Jan 2023 16:56:06 +0100 Subject: [PATCH] distro/rhel8: add Azure aarch64 platform and include image types The Azure image types require hyperv-daemons which isn't available on RHEL 8 prior to 8.6. --- internal/distro/rhel8/distro.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/internal/distro/rhel8/distro.go b/internal/distro/rhel8/distro.go index fe0139c85..a762ccde8 100644 --- a/internal/distro/rhel8/distro.go +++ b/internal/distro/rhel8/distro.go @@ -404,6 +404,13 @@ func newDistro(name string, minor int) *distribution { }, } + azureAarch64Platform := &platform.Aarch64{ + UEFIVendor: rd.vendor, + BasePlatform: platform.BasePlatform{ + ImageFormat: platform.FORMAT_VHD, + }, + } + rawUEFIx86Platform := &platform.X86{ BasePlatform: platform.BasePlatform{ ImageFormat: platform.FORMAT_RAW, @@ -431,6 +438,9 @@ func newDistro(name string, minor int) *distribution { edgeRawImgType(), edgeSimplifiedInstallerImgType(rd), ) + + // The Azure image types require hyperv-daemons which isn't available on older versions + aarch64.addImageTypes(azureAarch64Platform, azureRhuiImgType(), azureByosImgType()) } // add azure to RHEL distro only @@ -470,6 +480,8 @@ func newDistro(name string, minor int) *distribution { edgeRawImgType(), edgeSimplifiedInstallerImgType(rd), ) + + aarch64.addImageTypes(azureAarch64Platform, azureImgType()) } rd.addArches(x86_64, aarch64, ppc64le) return &rd