Skip to content

Commit bf82f44

Browse files
[Azure] Downgrade Linux Kernel to 6.8 as a workaround to install Grid driver
1 parent e3b6571 commit bf82f44

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

scripts/packer/azure-image-grid.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"image_publisher": "canonical",
2525
"image_offer": "ubuntu-24_04-lts",
2626
"image_sku": "server",
27-
"image_version": "24.04.202509170",
2827
"azure_tags": {
2928
"Name": "DSTACK-GRID"
3029
},
@@ -64,6 +63,15 @@
6463
"./install-docker.sh --version {{user `docker_version`}}"
6564
]
6665
},
66+
{
67+
"type": "shell",
68+
"script": "provisioners/downgrade-azure-kernel.sh"
69+
},
70+
{
71+
"type": "shell",
72+
"inline": ["sudo reboot"],
73+
"expect_disconnect": true
74+
},
6775
{
6876
"type": "shell",
6977
"script": "provisioners/install-nvidia-grid-driver-for-azure.sh"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
# based on https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/hpccompute-gpu-linux#known-issues
4+
# this is a temporary solution only required until the issue is fixed
5+
6+
set -e
7+
8+
# Install 6.8 kernel
9+
sudo apt-get update
10+
sudo DEBIAN_FRONTEND=noninteractive sudo apt install linux-image-6.8.0-1015-azure linux-headers-6.8.0-1015-azure -y
11+
12+
# Update the Grub entry name
13+
sudo grub_entry_name=$(sudo grep -Po "menuentry '\KUbuntu, with Linux 6.8[^(']+" /boot/grub/grub.cfg | sort -V | head -1)
14+
sudo sed -i "s/^\s*GRUB_DEFAULT=.*$/GRUB_DEFAULT='Advanced options for Ubuntu>$grub_entry_name'/" /etc/default/grub
15+
sudo update-grub
16+
17+
# Disable the kernel package upgrade
18+
sudo apt-mark hold $(dpkg --get-selections | grep -Po "^linux[^\t]+${grub_entry_name##* }")

0 commit comments

Comments
 (0)