Skip to content

Bluefield: add customization example for DOCA 3.2.1#370

Merged
alexsander-souza merged 3 commits intocanonical:mainfrom
trentindav:bluefield-doca-3-2-1
Feb 12, 2026
Merged

Bluefield: add customization example for DOCA 3.2.1#370
alexsander-souza merged 3 commits intocanonical:mainfrom
trentindav:bluefield-doca-3-2-1

Conversation

@trentindav
Copy link
Contributor

Starting with the release of DOCA 3.2.0, NVIDIA Bluefield images are based on Noble instead of Jammy. This MR adds a new example targeting the latest DOCA 3.2.1 LTS, to highlight the differences introduced compared to previous releases.

The disk_size specified in ubuntu/ubuntu-cloudimg.pkr.hcl is increased from 6G to 8G to avoid disk full errors during the creation of the customized image.

The existing example for DOCA 2.9.3 is also fixed to address the removal of mlxbf-bootimages packages from the NVIDIA repository.

- This commit adds a customization example to create Noble images
for Bluefield DPUs including DOCA 3.2.1
- The README is updated to mention how to use this script
- Increased QEMU disk_size is required to successfully build
an image with the proposed customization script
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

Adds a new BlueField customization example for DOCA 3.2.1 (Ubuntu 24.04/Noble), updates docs to reflect Jammy vs Noble requirements by DOCA version, and increases Packer disk size to reduce build failures.

Changes:

  • Increase base cloud image build disk size from 6G to 8G.
  • Add a new DOCA 3.2.1 (Noble) BlueField customization script.
  • Update the existing DOCA 2.9.3 example to install mlxbf-bootimages-signed via a direct .deb download and refresh README examples.

Reviewed changes

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

File Description
ubuntu/ubuntu-cloudimg.pkr.hcl Increase disk size to reduce “disk full” errors during image customization.
ubuntu/scripts/examples/bluefield-doca-3-2-1.sh New Noble/DOCA 3.2.1 customization example script (kernel + DOCA + system config).
ubuntu/scripts/examples/bluefield-doca-2-9-3.sh Update DOCA 2.9.3 script to fetch/install bootimages from a signed .deb.
ubuntu/README.md Document Jammy vs Noble usage and add the new DOCA 3.2.1 example command.

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

rm /etc/udev/rules.d/92-oob_net.rules
# OVS bridges creation will be managed by MAAS and cloud-init
sed -i 's/CREATE_OVS_BRIDGES="yes"/CREATE_OVS_BRIDGES="no"/' /etc/mellanox/mlnx-ovs.conf
# hw-offload is not applied when CREATE_OVS_BRIDGES="no", so enforce it here
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

ovs-vsctl is invoked but there is no explicit package installation in this script that guarantees the binary is present. If it’s missing, the command will fail and the intended hw-offload=true setting won’t be applied. Either ensure the relevant OVS package is installed before this point, or guard the command with an explicit presence check/fallback handling.

Suggested change
# hw-offload is not applied when CREATE_OVS_BRIDGES="no", so enforce it here
# hw-offload is not applied when CREATE_OVS_BRIDGES="no", so enforce it here
if ! command -v ovs-vsctl >/dev/null 2>&1; then
apt-get update
apt-get install -y openvswitch-switch
fi

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

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

add openvswitch-switch to the existing list of packages to be installed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not required because we are actually installing a fork of it from NVIDIA that includes acceleration for their NICs: doca-openvswitch-switch is installed as a dependency for the doca-runtime metapackage.

Copy link
Contributor

@alexsander-souza alexsander-souza left a comment

Choose a reason for hiding this comment

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

+1 from me. the suggestions from copilot are reasonable, so let me know if you intend to implement them

@trentindav
Copy link
Contributor Author

I applied the suggested improvements (except for the openvswitch-switch installation as mentioned in that thread). I am validating that everything still builds and installs correctly and I will notify here when everything is tested.

@trentindav
Copy link
Contributor Author

Images built and tested without errors for both example scripts

@alexsander-souza alexsander-souza merged commit edb4b44 into canonical:main Feb 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants