Skip to content

Conversation

@honza
Copy link
Member

@honza honza commented Dec 10, 2025

A few improvements in the multi-arch space:

  • Add an architecture field to flavors (defaults to libvirt arch)
  • Allow consumers to provide their own template for setting up VMs
  • Add some changes to allow us to boot an arm VM (largely provided by Claude)

Signed-off-by: Honza Pokorny <[email protected]>
@metal3-io-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign lentzi90 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@metal3-io-bot metal3-io-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 10, 2025
@metal3-io-bot metal3-io-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 10, 2025
@kashifest kashifest requested a review from Copilot December 11, 2025 07:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds ARM (aarch64) architecture support to the VM template system, enabling multi-architecture deployments. The changes introduce a new architecture field to VM flavors and allow cross-architecture VM emulation.

Key changes:

  • Add architecture field to flavors (defaults to libvirt_arch)
  • Implement ARM-specific VM configuration including EFI firmware, CPU model, and video driver
  • Enable custom VM template override via baremetal_vm_template variable

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
vm-setup/roles/libvirt/templates/baremetalvm.xml.j2 Adds ARM-specific VM configuration with conditional logic for OS setup, CPU model, and device settings based on flavor architecture
vm-setup/roles/libvirt/tasks/vm_setup_tasks.yml Allows consumers to specify a custom VM template via baremetal_vm_template variable
vm-setup/roles/common/templates/ironic_nodes.json.j2 Updates Ironic node properties to use flavor-specific architecture instead of global libvirt_arch
vm-setup/roles/common/defaults/main.yml Adds architecture field to default flavor configuration with libvirt_arch as the default value

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@kashifest kashifest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall lgtm

Copy link
Member

@Rozzii Rozzii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this contribution.
Generally looks fine but I am a bit confused related to EFI+ARM.
I have commented the at the relevant section.


{% if libvirt_arch != 'aarch64' %}
{% if is_arm %}
<os firmware='efi'>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK EFI + ARM are not a mandatory combination like on x86, many ARM systems and RISC systems (actually all that I have worked with) have no EFI firmware or ACPI or anything akin to the "BIOS/UEFI" that folks are used to on x86/amd64 motherboards.

That said I never emulated arm on libvirt so I am not familiar with how this section should look like, but I would suggest separating is_arm from is_arm_efi or something like that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude came up with checking libvirt_firmware, what do you think?

Assisted-by: claude-sonnet-4.5
Signed-off-by: Honza Pokorny <[email protected]>
Assisted-by: claude-sonnet-4.5
Signed-off-by: Honza Pokorny <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants