From 3f64e248837104a46aa48860feef12c5ce263be0 Mon Sep 17 00:00:00 2001 From: Felix Matouschek Date: Thu, 20 Jun 2024 15:20:41 +0200 Subject: [PATCH] fix: Enable networkInterfaceMultiqueue only if sockets > 1 Enable networkInterfaceMultiqueue only if the amount of sockets is greater than one, since networkInterfaceMultiqueue requires at least two sockets. Signed-off-by: Felix Matouschek --- templates/centos-stream8.tpl.yaml | 2 ++ templates/centos-stream9.tpl.yaml | 2 ++ templates/centos6.tpl.yaml | 2 ++ templates/centos7.tpl.yaml | 2 ++ templates/fedora.tpl.yaml | 2 ++ templates/opensuse.tpl.yaml | 2 ++ templates/rhel7.tpl.yaml | 2 ++ templates/rhel8.tpl.yaml | 2 ++ templates/rhel9.tpl.yaml | 2 ++ templates/ubuntu.tpl.yaml | 2 ++ templates/windows10.tpl.yaml | 2 +- templates/windows11.tpl.yaml | 2 +- templates/windows2k12.tpl.yaml | 2 +- templates/windows2k16.tpl.yaml | 2 +- templates/windows2k19.tpl.yaml | 2 +- templates/windows2k22.tpl.yaml | 2 +- 16 files changed, 26 insertions(+), 6 deletions(-) diff --git a/templates/centos-stream8.tpl.yaml b/templates/centos-stream8.tpl.yaml index 6410a85b..de2c92bc 100644 --- a/templates/centos-stream8.tpl.yaml +++ b/templates/centos-stream8.tpl.yaml @@ -112,7 +112,9 @@ objects: guest: {{ item.memsize }} devices: rng: {} +{% if item.cpus > 1 %} networkInterfaceMultiqueue: true +{% endif %} {% if item.tablet %} inputs: - type: tablet diff --git a/templates/centos-stream9.tpl.yaml b/templates/centos-stream9.tpl.yaml index bbb0a60b..679791f9 100644 --- a/templates/centos-stream9.tpl.yaml +++ b/templates/centos-stream9.tpl.yaml @@ -112,7 +112,9 @@ objects: guest: {{ item.memsize }} devices: rng: {} +{% if item.cpus > 1 %} networkInterfaceMultiqueue: true +{% endif %} {% if item.tablet %} inputs: - type: tablet diff --git a/templates/centos6.tpl.yaml b/templates/centos6.tpl.yaml index 6bdb27b4..a8ac8147 100644 --- a/templates/centos6.tpl.yaml +++ b/templates/centos6.tpl.yaml @@ -101,7 +101,9 @@ objects: memory: guest: {{ item.memsize }} devices: +{% if item.cpus > 1 %} networkInterfaceMultiqueue: true +{% endif %} useVirtioTransitional: true rng: {} {% if item.tablet %} diff --git a/templates/centos7.tpl.yaml b/templates/centos7.tpl.yaml index 76c66ad1..849addae 100644 --- a/templates/centos7.tpl.yaml +++ b/templates/centos7.tpl.yaml @@ -112,7 +112,9 @@ objects: guest: {{ item.memsize }} devices: rng: {} +{% if item.cpus > 1 %} networkInterfaceMultiqueue: true +{% endif %} {% if item.tablet %} inputs: - type: tablet diff --git a/templates/fedora.tpl.yaml b/templates/fedora.tpl.yaml index 8b97bea7..5d7b1c75 100644 --- a/templates/fedora.tpl.yaml +++ b/templates/fedora.tpl.yaml @@ -123,7 +123,9 @@ objects: guest: {{ item.memsize }} devices: rng: {} +{% if item.cpus > 1 %} networkInterfaceMultiqueue: true +{% endif %} {% if item.tablet %} inputs: - type: tablet diff --git a/templates/opensuse.tpl.yaml b/templates/opensuse.tpl.yaml index 6fd6e9c9..3110b286 100644 --- a/templates/opensuse.tpl.yaml +++ b/templates/opensuse.tpl.yaml @@ -106,7 +106,9 @@ objects: guest: {{ item.memsize }} devices: rng: {} +{% if item.cpus > 1 %} networkInterfaceMultiqueue: true +{% endif %} {% if item.tablet %} inputs: - type: tablet diff --git a/templates/rhel7.tpl.yaml b/templates/rhel7.tpl.yaml index 8b85f64e..c40b3434 100644 --- a/templates/rhel7.tpl.yaml +++ b/templates/rhel7.tpl.yaml @@ -112,7 +112,9 @@ objects: guest: {{ item.memsize }} devices: rng: {} +{% if item.cpus > 1 %} networkInterfaceMultiqueue: true +{% endif %} {% if item.tablet %} inputs: - type: tablet diff --git a/templates/rhel8.tpl.yaml b/templates/rhel8.tpl.yaml index 2c26a053..cf195a8b 100644 --- a/templates/rhel8.tpl.yaml +++ b/templates/rhel8.tpl.yaml @@ -114,7 +114,9 @@ objects: guest: {{ item.memsize }} devices: rng: {} +{% if item.cpus > 1 %} networkInterfaceMultiqueue: true +{% endif %} {% if item.tablet %} inputs: - type: tablet diff --git a/templates/rhel9.tpl.yaml b/templates/rhel9.tpl.yaml index 09026ed2..70b1af29 100644 --- a/templates/rhel9.tpl.yaml +++ b/templates/rhel9.tpl.yaml @@ -114,7 +114,9 @@ objects: guest: {{ item.memsize }} devices: rng: {} +{% if item.cpus > 1 %} networkInterfaceMultiqueue: true +{% endif %} {% if item.tablet %} inputs: - type: tablet diff --git a/templates/ubuntu.tpl.yaml b/templates/ubuntu.tpl.yaml index 0b5b976c..59012857 100644 --- a/templates/ubuntu.tpl.yaml +++ b/templates/ubuntu.tpl.yaml @@ -112,7 +112,9 @@ objects: guest: {{ item.memsize }} devices: rng: {} +{% if item.cpus > 1 %} networkInterfaceMultiqueue: true +{% endif %} {% if item.tablet %} inputs: - type: tablet diff --git a/templates/windows10.tpl.yaml b/templates/windows10.tpl.yaml index f79ea9d2..2f3c4fdb 100644 --- a/templates/windows10.tpl.yaml +++ b/templates/windows10.tpl.yaml @@ -149,7 +149,7 @@ objects: efi: secureBoot: true devices: -{% if item.multiqueue %} +{% if item.multiqueue and item.cpus > 1 %} networkInterfaceMultiqueue: True {% endif %} disks: diff --git a/templates/windows11.tpl.yaml b/templates/windows11.tpl.yaml index c6e012b2..ec60e0f8 100644 --- a/templates/windows11.tpl.yaml +++ b/templates/windows11.tpl.yaml @@ -155,7 +155,7 @@ objects: efi: secureBoot: true devices: -{% if item.multiqueue %} +{% if item.multiqueue and item.cpus > 1 %} networkInterfaceMultiqueue: True {% endif %} disks: diff --git a/templates/windows2k12.tpl.yaml b/templates/windows2k12.tpl.yaml index 552b53be..83542f3b 100644 --- a/templates/windows2k12.tpl.yaml +++ b/templates/windows2k12.tpl.yaml @@ -150,7 +150,7 @@ objects: efi: secureBoot: true devices: -{% if item.multiqueue %} +{% if item.multiqueue and item.cpus > 1 %} networkInterfaceMultiqueue: True {% endif %} disks: diff --git a/templates/windows2k16.tpl.yaml b/templates/windows2k16.tpl.yaml index 3647cb4c..fedc0726 100644 --- a/templates/windows2k16.tpl.yaml +++ b/templates/windows2k16.tpl.yaml @@ -149,7 +149,7 @@ objects: efi: secureBoot: true devices: -{% if item.multiqueue %} +{% if item.multiqueue and item.cpus > 1 %} networkInterfaceMultiqueue: True {% endif %} disks: diff --git a/templates/windows2k19.tpl.yaml b/templates/windows2k19.tpl.yaml index 78439f05..e8e9c6bd 100644 --- a/templates/windows2k19.tpl.yaml +++ b/templates/windows2k19.tpl.yaml @@ -149,7 +149,7 @@ objects: efi: secureBoot: true devices: -{% if item.multiqueue %} +{% if item.multiqueue and item.cpus > 1 %} networkInterfaceMultiqueue: True {% endif %} disks: diff --git a/templates/windows2k22.tpl.yaml b/templates/windows2k22.tpl.yaml index 1327b330..97ac3b91 100644 --- a/templates/windows2k22.tpl.yaml +++ b/templates/windows2k22.tpl.yaml @@ -149,7 +149,7 @@ objects: efi: secureBoot: true devices: -{% if item.multiqueue %} +{% if item.multiqueue and item.cpus > 1 %} networkInterfaceMultiqueue: True {% endif %} disks: