Skip to content

Fix deprecated Ubuntu pool images in Batch samples#328

Open
xinlaoda wants to merge 1 commit into
Azure-Samples:masterfrom
xinlaoda:fix-deprecated-ubuntu-images
Open

Fix deprecated Ubuntu pool images in Batch samples#328
xinlaoda wants to merge 1 commit into
Azure-Samples:masterfrom
xinlaoda:fix-deprecated-ubuntu-images

Conversation

@xinlaoda

Copy link
Copy Markdown

What

Several samples reference Ubuntu pool images that are no longer available in the Azure Marketplace / no longer supported by Batch node agents, so pool allocation currently fails with these samples:

  • UbuntuServer 18.04-LTS — the UbuntuServer offer now only publishes SKUs up to 16.04.
  • 0001-com-ubuntu-server-focal 20.04batch.node.ubuntu 20.04 is no longer supported for new pools.

Fix

Update them to Ubuntu Server 24.04 LTS (canonical / ubuntu-24_04-lts / server-gen1, node agent batch.node.ubuntu 24.04), which is currently Batch-verified (confirmed via list_supported_images).

The Gen1 sku (server-gen1) is used intentionally so the pools keep booting on the existing default VM sizes (Standard_DS1_V2 / Standard_D1_V2), which support Hyper-V Gen1 (V1) only.

Affected samples

  • Python/Batch/sample1_helloworld.py
  • Python/Batch/sample1_jobprep_and_release.py
  • Python/Batch/sample2_pools_and_resourcefiles.py
  • Python/Batch/sample3_encrypted_resourcefiles.py
  • JavaScript/Node.js/sample.js

Validation

  • flake8 gate on Python/Batch passes.
  • py_compile (Python) and node --check (JS) succeed.

The Ubuntu images referenced by several samples are no longer available in
the Azure Marketplace / no longer supported by Batch node agents, which
causes pool allocation to fail:

- UbuntuServer 18.04-LTS (offer retired; only <=16.04 remains under that
  offer)
- 0001-com-ubuntu-server-focal 20.04 (batch.node.ubuntu 20.04 no longer
  supported for new pools)

Update them to Ubuntu Server 24.04 LTS (canonical / ubuntu-24_04-lts /
server-gen1, node agent batch.node.ubuntu 24.04), a currently Batch-verified
image. The Gen1 sku (server-gen1) is used so the pools keep working with the
existing default VM sizes (Standard_DS1_V2 / Standard_D1_V2 / Standard_A1_v2),
which are Gen1 (V1) only.

Affected samples:
- Python/Batch/sample1_helloworld.py
- Python/Batch/sample1_jobprep_and_release.py
- Python/Batch/sample2_pools_and_resourcefiles.py
- Python/Batch/sample3_encrypted_resourcefiles.py
- JavaScript/Node.js/sample.js

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@xinlaoda

Copy link
Copy Markdown
Author

@NickKouds could you please review and merge this PR? 🙏

It fixes deprecated Ubuntu pool images that currently cause pool allocation to fail:

  • UbuntuServer 18.04-LTS (offer no longer publishes 18.04)
  • 0001-com-ubuntu-server-focal 20.04 (batch.node.ubuntu 20.04 no longer supported for new pools)

Updated to Ubuntu Server 24.04 LTS (canonical / ubuntu-24_04-lts / server-gen1, node agent batch.node.ubuntu 24.04) — verified via list_supported_images — across 4 Python samples + the Node.js sample. Gen1 sku is used so the existing default VM sizes keep working. CLA green; flake8 / py_compile / node --check all pass. Tagging you directly since there's no CODEOWNERS. Thanks!

@jingjlii jingjlii self-assigned this Jul 15, 2026
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