From 7a6b333cd432986bf415b69ef83bf69b181585ee Mon Sep 17 00:00:00 2001 From: Sebastian Heid <8442432+s4heid@users.noreply.github.com> Date: Wed, 10 Dec 2025 17:31:35 +0100 Subject: [PATCH 1/2] Support ACG gen2 features --- bosh-stemcell/lib/bosh/stemcell/infrastructure.rb | 9 ++++++++- bosh-stemcell/spec/bosh/stemcell/infrastructure_spec.rb | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/bosh-stemcell/lib/bosh/stemcell/infrastructure.rb b/bosh-stemcell/lib/bosh/stemcell/infrastructure.rb index b7c0c97b5c..cc9c5b5c7f 100644 --- a/bosh-stemcell/lib/bosh/stemcell/infrastructure.rb +++ b/bosh-stemcell/lib/bosh/stemcell/infrastructure.rb @@ -188,7 +188,14 @@ def initialize end def additional_cloud_properties - {'root_device_name' => '/dev/sda1'} + { + 'root_device_name' => '/dev/sda1', + 'generation' => 'gen2', + 'accelerated_networking' => true, + 'hibernation' => true, + 'disk_controller_types' => ['scsi'], + 'security_type' => 'TrustedLaunchSupported' + } end end diff --git a/bosh-stemcell/spec/bosh/stemcell/infrastructure_spec.rb b/bosh-stemcell/spec/bosh/stemcell/infrastructure_spec.rb index f661728449..a71b64d1e5 100644 --- a/bosh-stemcell/spec/bosh/stemcell/infrastructure_spec.rb +++ b/bosh-stemcell/spec/bosh/stemcell/infrastructure_spec.rb @@ -162,7 +162,14 @@ module Bosh::Stemcell it { should eq Infrastructure.for('azure') } it 'has azure specific additional cloud properties' do - expect(subject.additional_cloud_properties).to eq({'root_device_name' => '/dev/sda1'}) + expect(subject.additional_cloud_properties).to eq({ + 'root_device_name' => '/dev/sda1', + 'generation' => 'gen2', + 'accelerated_networking' => true, + 'hibernation' => true, + 'disk_controller_types' => ['scsi'], + 'security_type' => 'TrustedLaunchSupported' + }) end end From 52285f513139dc05aa75680d344be0eda549ea0d Mon Sep 17 00:00:00 2001 From: Sebastian Heid <8442432+s4heid@users.noreply.github.com> Date: Mon, 19 Jan 2026 14:26:35 +0000 Subject: [PATCH 2/2] Add NVMe settings for Azure * 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 1418ec05e59c03d7bf74ca0362cea80384545320) --- bosh-stemcell/lib/bosh/stemcell/infrastructure.rb | 2 +- .../spec/assets/dpkg-list-ubuntu-azure-additions.txt | 1 + bosh-stemcell/spec/bosh/stemcell/infrastructure_spec.rb | 2 +- stemcell_builder/stages/image_install_grub/apply.sh | 5 +++++ stemcell_builder/stages/system_azure_init/apply.sh | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/bosh-stemcell/lib/bosh/stemcell/infrastructure.rb b/bosh-stemcell/lib/bosh/stemcell/infrastructure.rb index cc9c5b5c7f..f94eb323ca 100644 --- a/bosh-stemcell/lib/bosh/stemcell/infrastructure.rb +++ b/bosh-stemcell/lib/bosh/stemcell/infrastructure.rb @@ -193,7 +193,7 @@ def additional_cloud_properties 'generation' => 'gen2', 'accelerated_networking' => true, 'hibernation' => true, - 'disk_controller_types' => ['scsi'], + 'disk_controller_types' => ['scsi', 'nvme'], 'security_type' => 'TrustedLaunchSupported' } end diff --git a/bosh-stemcell/spec/assets/dpkg-list-ubuntu-azure-additions.txt b/bosh-stemcell/spec/assets/dpkg-list-ubuntu-azure-additions.txt index d146a75161..39fbb77d61 100644 --- a/bosh-stemcell/spec/assets/dpkg-list-ubuntu-azure-additions.txt +++ b/bosh-stemcell/spec/assets/dpkg-list-ubuntu-azure-additions.txt @@ -1,3 +1,4 @@ +azure-vm-utils cloud-init netplan.io python-is-python3 diff --git a/bosh-stemcell/spec/bosh/stemcell/infrastructure_spec.rb b/bosh-stemcell/spec/bosh/stemcell/infrastructure_spec.rb index a71b64d1e5..dbb49d7632 100644 --- a/bosh-stemcell/spec/bosh/stemcell/infrastructure_spec.rb +++ b/bosh-stemcell/spec/bosh/stemcell/infrastructure_spec.rb @@ -167,7 +167,7 @@ module Bosh::Stemcell 'generation' => 'gen2', 'accelerated_networking' => true, 'hibernation' => true, - 'disk_controller_types' => ['scsi'], + 'disk_controller_types' => ['scsi', 'nvme'], 'security_type' => 'TrustedLaunchSupported' }) end diff --git a/stemcell_builder/stages/image_install_grub/apply.sh b/stemcell_builder/stages/image_install_grub/apply.sh index d085dbf2c0..f65b430295 100755 --- a/stemcell_builder/stages/image_install_grub/apply.sh +++ b/stemcell_builder/stages/image_install_grub/apply.sh @@ -73,6 +73,11 @@ case "${stemcell_infrastructure}" in aws) grub_suffix="nvme_core.io_timeout=4294967295" ;; +azure) + # For NVMe storage, Microsoft recommends setting nvme_core.io_timeout to 240 seconds + # to avoid IO timeouts and let Azure handle disk failures or interruptions. + grub_suffix="nvme_core.io_timeout=240" + ;; cloudstack) grub_suffix="console=hvc0" ;; diff --git a/stemcell_builder/stages/system_azure_init/apply.sh b/stemcell_builder/stages/system_azure_init/apply.sh index 53c518bdfd..ac0f6f9a09 100755 --- a/stemcell_builder/stages/system_azure_init/apply.sh +++ b/stemcell_builder/stages/system_azure_init/apply.sh @@ -5,7 +5,7 @@ set -e base_dir=$(readlink -nf $(dirname $0)/../..) source $base_dir/lib/prelude_apply.bash -packages="python3 python3-pyasn1 python3-setuptools python3-distro python-is-python3 cloud-init" +packages="python3 python3-pyasn1 python3-setuptools python3-distro python-is-python3 cloud-init azure-vm-utils" pkg_mgr install $packages wala_release=2.9.1.1