From b9c39cc36f99d2ce9d3255ca884695feae2df756 Mon Sep 17 00:00:00 2001 From: Orel Misan Date: Thu, 25 Jan 2024 19:51:40 +0200 Subject: [PATCH] VM boot script: Run driverctl from second boot Currently, `driverctl` is executed on every boot. There is no need to run it before we configure `tuned-adm profile` and reboot the VM. Signed-off-by: Orel Misan --- pkg/internal/checkup/vmi.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/internal/checkup/vmi.go b/pkg/internal/checkup/vmi.go index 4c059a56..bee6bad0 100644 --- a/pkg/internal/checkup/vmi.go +++ b/pkg/internal/checkup/vmi.go @@ -139,8 +139,6 @@ func generateBootScript() string { sb.WriteString("set -e\n") sb.WriteString("\n") sb.WriteString("checkup_tuned_adm_set_marker_full_path=" + config.BootScriptTunedAdmSetMarkerFileFullPath + "\n") - sb.WriteString("driverctl set-override " + config.VMIEastNICPCIAddress + " vfio-pci\n") - sb.WriteString("driverctl set-override " + config.VMIWestNICPCIAddress + " vfio-pci\n") sb.WriteString("\n") sb.WriteString("if [ ! -f \"$checkup_tuned_adm_set_marker_full_path\" ]; then\n") sb.WriteString(" echo \"isolated_cores=" + isolatedCores + "\" > /etc/tuned/cpu-partitioning-variables.conf\n") @@ -148,6 +146,9 @@ func generateBootScript() string { sb.WriteString(" touch $checkup_tuned_adm_set_marker_full_path\n") sb.WriteString(" reboot\n") sb.WriteString("fi\n") + sb.WriteString("\n") + sb.WriteString("driverctl set-override " + config.VMIEastNICPCIAddress + " vfio-pci\n") + sb.WriteString("driverctl set-override " + config.VMIWestNICPCIAddress + " vfio-pci\n") return sb.String() }