Fix AMD GPU driver installation failure on Ubuntu 22.04 (jammy)#652
Merged
Fix AMD GPU driver installation failure on Ubuntu 22.04 (jammy)#652
Conversation
Detect Ubuntu codename from /etc/os-release and resolve the correct ROCm installation URL from a built-in mapping (focal->5.5, jammy->6.3.3). This fixes BabelStream failures on Ubuntu 22.04 where ROCm 5.5's amdgpu-dkms module fails to build on kernel 6.8.x, leaving dpkg broken and crashing VirtualClient repeatedly. Changes: - Add SupportedInstallationFiles codename-to-URL mapping - Add DetectOsVersionCodenameAsync and ResolveLinuxInstallationFile - Add dpkg cleanup commands for broken amdgpu-dkms package state - Fix bashrc path for root users via GetUserHomePath - Add unit tests for codename resolution, fallback, and error cases Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
.NET ProcessStartInfo on Linux does not handle single quotes for argument grouping - only double quotes work. The previous bash -c commands with single quotes caused argv to be split incorrectly, resulting in 'unexpected EOF' errors. Also removed 2>/dev/null redirects since stderr is captured by the process proxy anyway. Verified on Ubuntu 22.04 VM: dpkg cleanup runs successfully, codename detection resolves to jammy, and ROCm 6.3.3 driver installation begins correctly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
@microsoft-github-policy-service agree company="Microsoft" |
ericavella
approved these changes
Mar 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The AMD GPU driver installation fails on Ubuntu 22.04 (jammy) Azure VMs
because it hardcodes a ROCm 5.5 driver URL targeting Ubuntu 20.04
(focal). The amdgpu-dkms kernel module from ROCm 5.5 cannot build
against kernel 6.8.x, leaving dpkg in a broken state that poisons all
subsequent apt-get commands. VirtualClient retries 6 times and then
gives up.
Changes
AMDGPUDriverInstallation.cs
/etc/os-release during InitializeAsync
to the correct ROCm driver URLs (focal → ROCm
5.5, jammy → ROCm 6.3.3)
LinuxInstallationFile parameter as override if provided, otherwise
auto-resolves from the built-in mapping
in bash -c wrappers (.NET ProcessStartInfo on Linux does not handle
single quotes for argument grouping)
dpkg cleanup commands
AMDGPUDriverInstallationTests.cs
profile parameter override, unsupported codename error
Validation
Tested on an Azure VM (Standard_D2s_v5, Ubuntu 22.04 jammy, kernel
6.8.0-1044-azure):
6.3.3 URL resolved: wget https://repo.radeon.com/amdgpu-install/6.3.3/
ubuntu/jammy/amdgpu-install_6.3.60303-1_all.deb
6.10.5 on kernel 6.8.0 (the exact step that was failing with ROCm 5.5)