Skip to content

Commit

Permalink
test-incus-gpu-vm: Reboot on newer guest kernel
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <[email protected]>
  • Loading branch information
stgraber committed Dec 13, 2024
1 parent 12477d5 commit 7340424
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/test-incus-gpu-vm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ curl -sL https://pkgs.zabbly.com/get/incus-daily | sh
incus admin init --auto

if [ "${1}" = "nvidia" ]; then
# Reduce power draw
nvidia-smi -q -d POWER

# Enable SR-IOV
/usr/lib/nvidia/sriov-manage -e ALL

Expand Down Expand Up @@ -63,7 +66,10 @@ incus list
if [ "${1}" = "nvidia" ]; then
# Validate NVIDIA vGPU
incus exec v4 -- apt-get update
incus exec v4 -- apt-get dist-upgrade --yes
incus exec v4 -- apt-get install --no-install-recommends --yes build-essential wget pciutils linux-headers-virtual
incus restart v4
sleep 30
incus exec v4 -- wget -6 http://lab.linuxcontainers.org/nvidia/v14.0/nvidia-guest.deb
incus exec v4 -- apt-get install --yes /root/nvidia-guest.deb
incus exec v4 -- nvidia-smi
Expand Down

0 comments on commit 7340424

Please sign in to comment.