diff --git a/01_install_requirements.sh b/01_install_requirements.sh index 919b8d99c..8e93bb5f3 100755 --- a/01_install_requirements.sh +++ b/01_install_requirements.sh @@ -25,6 +25,14 @@ if [ -z "${METAL3_DEV_ENV:-}" ]; then # Patch metal3-dev-env to use Ansible 8.x on centos9/rhel9. sed -i '/ANSIBLE_VERSION/{ s/10\.7\.0/8.7.0/; }' lib/common.sh + # Go tarball defaults hardcode linux-amd64; use GOARCH passed as extra var. + # Upstream fix: https://github.com/metal3-io/metal3-dev-env/pull/1694 + GO_DEFAULTS="vm-setup/roles/packages_installation/defaults/main.yml" + if grep -q 'linux-amd64' "${GO_DEFAULTS}"; then + sed -i 's/go_tarball: "go{{ go_version }}.linux-amd64.tar.gz"/go_tarball: "go{{ go_version }}.linux-{{ GOARCH | default('\''amd64'\'') }}.tar.gz"/' \ + "${GO_DEFAULTS}" + fi + popd fi diff --git a/02_configure_host.sh b/02_configure_host.sh index f6bcb1a97..6a234ee6d 100755 --- a/02_configure_host.sh +++ b/02_configure_host.sh @@ -129,6 +129,16 @@ export VNC_CONSOLE=true if [[ $(uname -m) == "aarch64" ]]; then VNC_CONSOLE=false echo "libvirt_cdrombus: scsi" >> vm_setup_vars.yml + # On native aarch64 KVM (e.g. AWS Graviton), the upstream metal3-dev-env + # template hardcodes cortex-a57 for all aarch64 VMs. That model only works + # under qemu emulation; native KVM requires host-passthrough. Narrow the + # CPU conditional so native aarch64 falls through to host-passthrough, + # without affecting the or sections that must still fire. + # Upstream fix: https://github.com/metal3-io/metal3-dev-env/pull/1694 + TEMPLATE="${VM_SETUP_PATH}/roles/libvirt/templates/baremetalvm.xml.j2" + if [ -f "${TEMPLATE}" ] && grep -q '{% if is_aarch64 %}' "${TEMPLATE}"; then + sed -i '/{% if is_aarch64 %}/{N; /