Skip to content

Add Azure Gen2 and NVMe support for stemcells#469

Open
s4heid wants to merge 2 commits intocloudfoundry:ubuntu-noblefrom
s4heid:gen2-metadata
Open

Add Azure Gen2 and NVMe support for stemcells#469
s4heid wants to merge 2 commits intocloudfoundry:ubuntu-noblefrom
s4heid:gen2-metadata

Conversation

@s4heid
Copy link
Contributor

@s4heid s4heid commented Feb 6, 2026

Summary

This PR enhances Azure stemcell images with Gen2 capabilities and NVMe storage support to enable compatibility with latest generation VM types (e.g., Dv6+).

The stemcell metadata have been extended for Azure and now include the following capabilities:

  • generation: gen2 - Marks image as Gen2 compatible
  • accelerated_networking: true - Enables accelerated networking support
  • hibernation: true - Enables hibernation capability
  • disk_controller_types: ['scsi', 'nvme'] - Supported disk controller types: This setting allows compatibility with older VM types (such as Dv4) that use SCSI, VM types that support both SCSI and NVMe (like Dv5), as well as newer VM types (for example, Dv6) that only support NVMe.
  • security_type: TrustedLaunchSupported - Enables deployment of both standard VMs and TrustedLaunch VMs using the same image. For TrustedLaunch to work, addtional changes in the stemcell are required, which will be provided in a separate change.

Note

The BOSH Azure CPI1 will parse and use the Azure-specific metadata to create Azure Compute Gallery Images with the features mentioned above. These features could not be configured with generation 1.

Additionally, this PR introduces NVMe configuration specifically for Azure:

  • NVMe I/O timeout (nvme_core.io_timeout=240) in GRUB settings as recommended by Microsoft to avoid I/O timeouts and let Azure handle disk failures
  • azure-vm-utils package: includes udev rules for NVMe disks and SR-IOV interfaces. Previously, SR-IOV udev rules were manually created2 in the stemcell, but with this package, manual creation and ongoing maintenance are no longer needed.

Testing

After this change, the stemcell.MF looks like this:

tar -Oxzf tmp/bosh-stemcell-4.0.10-azure-hyperv-ubuntu-noble.tgz stemcell.MF
---
name: bosh-azure-hyperv-ubuntu-noble
version: 4.0.10
bosh_protocol: 1
api_version: 3
sha1: f881420ba6f08641e1bbc9854d14c5284b7f2cbd
operating_system: ubuntu-noble
stemcell_formats:
- azure-vhd
cloud_properties:
  name: bosh-azure-hyperv-ubuntu-noble
  version: 4.0.10
  infrastructure: azure
  hypervisor: hyperv
  disk: 5120
  disk_format: vhd
  container_format: bare
  os_type: linux
  os_distro: ubuntu
  architecture: x86_64
  root_device_name: "/dev/sda1"
  generation: gen2
  accelerated_networking: true
  hibernation: true
  disk_controller_types:
  - scsi
  - nvme
  security_type: TrustedLaunchSupported

Related Issues

cloudfoundry/bosh-azure-cpi-release#706

Footnotes

  1. https://github.com/cloudfoundry/bosh-azure-cpi-release/pull/734

  2. https://github.com/cloudfoundry/bosh-linux-stemcell-builder/pull/443

* Set i/o timeouts for NVMe, as suggested by Microsoft
* Create NVMe capable Gen2 images, to enable support for NVMe, which is
  required for latest VM types, e.g. Dv6+.
* Add package `azure-vm-utils`, which contains udev rules for NVMe disks, as
  well as SRIOV interfaces.

(cherry picked from commit 1418ec0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant