diff options
| author | Li-Wen Hsu <lwhsu@FreeBSD.org> | 2025-11-07 05:10:44 +0000 |
|---|---|---|
| committer | Li-Wen Hsu <lwhsu@FreeBSD.org> | 2025-11-07 05:10:44 +0000 |
| commit | 36095c942031f7f1613eec554f1c7615cbd891fd (patch) | |
| tree | 2d82ab6dae29df2290330ca71bcce9b39720f34e | |
| parent | 51c5e2b60247b3deb204a1d78ea6edc91a8ac652 (diff) | |
release: Comply with Azure Marketplace requirements for aarch64
Azure requires the first 1 MB (2,048 sectors) of the OS disk to remain
empty for VM images:
https://learn.microsoft.com/partner-center/marketplace-offers/azure-vm-certification-faq#vm-images-must-have-1-mb-of-free-space
Also append the BOOTPARTSOFFSET suffix for aarch64 images, which only
has an ESP partition for booting.
Co-authored-by: Brad Davis <brd@FreeBSD.org>
Approved by: cperciva
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53628
| -rw-r--r-- | release/tools/vmimage.subr | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 8531e9b8f2d6..92f00f9cf7c3 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -449,7 +449,11 @@ vm_create_disk() { # Create an ESP espfilename=$(mktemp /tmp/efiboot.XXXXXX) make_esp_file ${espfilename} ${fat32min} ${BOOTFILES}/efi/loader_lua/loader_lua.efi - BOOTPARTS="${BOOTPARTS} -p efi/efiboot0:=${espfilename}" + espsuffix="" + if [ -z "${BOOTPARTS}" ]; then + espsuffix="${BOOTPARTSOFFSET}" + fi + BOOTPARTS="${BOOTPARTS} -p efi/efiboot0:=${espfilename}${espsuffix}" # Add this to fstab mkdir -p ${DESTDIR}/boot/efi |
