From 098e9181eeb683997e6806334d29a440a001d7fa Mon Sep 17 00:00:00 2001 From: Moritz Sanft <58110325+msanft@users.noreply.github.com> Date: Thu, 19 Dec 2024 16:21:18 +0100 Subject: [PATCH] node-installer: add GPU-specific options --- nodeinstaller/internal/constants/constants.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nodeinstaller/internal/constants/constants.go b/nodeinstaller/internal/constants/constants.go index db0e05db3..a245b8f43 100644 --- a/nodeinstaller/internal/constants/constants.go +++ b/nodeinstaller/internal/constants/constants.go @@ -94,6 +94,14 @@ func KataRuntimeConfig(baseDir string, platform platforms.Platform, qemuExtraKer if debug { config.Hypervisor["qemu"]["enable_debug"] = true } + // GPU-specific settings + if platform == platforms.K3sQEMUSNPGPU { + config.Hypervisor["qemu"]["guest_hook_path"] = "/usr/share/oci/hooks" + config.Hypervisor["qemu"]["cold_plug_vfio"] = "root-port" + // GPU images tend to be larger, so give a better default timeout that + // allows for pulling those. + config.Runtime["create_container_timeout"] = 600 + } default: return nil, fmt.Errorf("unsupported platform: %s", platform) }