From 8013ce5ef040d94ef1656f8b665fa40388a5b852 Mon Sep 17 00:00:00 2001 From: Dmitry Lopatin Date: Wed, 27 May 2026 19:28:13 +0300 Subject: [PATCH 01/12] feat: add support new network plugin Signed-off-by: Dmitry Lopatin --- build/components/versions.yml | 2 +- images/virt-artifact/werf.inc.yaml | 12 ++++++++++++ images/virt-handler/werf.inc.yaml | 6 ++++++ .../pkg/controller/kvbuilder/kvvm.go | 10 +++++++++- templates/kubevirt/kubevirt.yaml | 5 +++++ 5 files changed, 33 insertions(+), 2 deletions(-) diff --git a/build/components/versions.yml b/build/components/versions.yml index fa5a5e00e8..69b9475ef1 100644 --- a/build/components/versions.yml +++ b/build/components/versions.yml @@ -3,7 +3,7 @@ firmware: libvirt: v10.9.0 edk2: stable202411 core: - 3p-kubevirt: v1.6.2-v12n.42 + 3p-kubevirt: feat/vm/disable-tap-veth-bridge 3p-containerized-data-importer: v1.60.3-v12n.19 distribution: 2.8.3 package: diff --git a/images/virt-artifact/werf.inc.yaml b/images/virt-artifact/werf.inc.yaml index 542d241165..4d44c3c8cd 100644 --- a/images/virt-artifact/werf.inc.yaml +++ b/images/virt-artifact/werf.inc.yaml @@ -13,8 +13,10 @@ secrets: - id: SOURCE_REPO value: {{ $.SOURCE_REPO }} shell: + installCacheVersion: "{{ now | date "Mon Jan 2 15:04:05 MST 2006" }}" install: - | + echo "$date --------- new ---- 123456789 " echo "Git clone {{ $gitRepoName }} repository..." git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $tag }} /src/kubevirt @@ -28,6 +30,8 @@ altPackages: - pkg-config - libtool - gcc-c++ +- clang +- libbpf-devel packages: - libmnl - ncurses @@ -113,6 +117,7 @@ shell: - export GOOS=linux - export GOARCH=amd64 - export CGO_ENABLED=0 + - export BPF_CLANG=clang - echo ============== Build container-disk =================== {{- $_ := set $ "ProjectName" (list .ImageName "container-disk" | join "/") }} @@ -201,6 +206,13 @@ shell: - | {{- include "image-build.build" (set $ "BuildCommand" `go build -ldflags="-s -w" -o /kubevirt-binaries/sidecars ./cmd/sidecars/`) | nindent 6 }} + - echo ============== Build bpf_bridge.o ===================== + {{- $_ := set $ "ProjectName" (list $.ImageName "bpf-bridge-obj" | join "/") }} + - mkdir -p /kubevirt-binaries/network-bpf-bridge-binding-assets + - | + {{- include "image-build.build" (set $ "BuildCommand" `clang -O2 -g -target bpf -I/usr/include -c ./pkg/network/bpfbridge/bpf/bpf_bridge.c -o /kubevirt-binaries/network-bpf-bridge-binding-assets/bpf_bridge.o`) | nindent 6 }} + - echo "Built bpf object:" && ls -l /kubevirt-binaries/network-bpf-bridge-binding-assets/ && file /kubevirt-binaries/network-bpf-bridge-binding-assets/bpf_bridge.o || true + - echo ============== Build virtctl ========================== {{- $_ := set $ "ProjectName" (list .ImageName "virtctl" | join "/") }} - | diff --git a/images/virt-handler/werf.inc.yaml b/images/virt-handler/werf.inc.yaml index 760e013749..be325737b8 100644 --- a/images/virt-handler/werf.inc.yaml +++ b/images/virt-handler/werf.inc.yaml @@ -31,6 +31,12 @@ import: after: install includePaths: - .version +- image: {{ .ModuleNamePrefix }}virt-artifact + add: /kubevirt-binaries/network-bpf-bridge-binding-assets/ + to: /usr/share/network-bpf-bridge-binding + after: install + includePaths: + - bpf_bridge.o - image: {{ .ModuleNamePrefix }}virt-artifact add: /kubevirt/cmd/{{ .ImageName }}/ to: /etc diff --git a/images/virtualization-artifact/pkg/controller/kvbuilder/kvvm.go b/images/virtualization-artifact/pkg/controller/kvbuilder/kvvm.go index 4bef9ab624..a0fa7986a4 100644 --- a/images/virtualization-artifact/pkg/controller/kvbuilder/kvvm.go +++ b/images/virtualization-artifact/pkg/controller/kvbuilder/kvvm.go @@ -94,6 +94,10 @@ func DefaultOptions(current *v1alpha2.VirtualMachine) KVVMOptions { } } +func (b *KVVM) Options() KVVMOptions { + return b.opts +} + func NewEmptyKVVM(name types.NamespacedName, opts KVVMOptions) *KVVM { return &KVVM{ opts: opts, @@ -811,7 +815,11 @@ func (b *KVVM) SetNetworkInterface(name, macAddress string, acpiIndex int) { Model: devPreset.InterfaceModel, ACPIIndex: acpiIndex, } - iface.Bridge = &virtv1.InterfaceBridge{} + if name == "default" { + iface.Binding = &virtv1.PluginBinding{Name: "bpfbridge"} + } else { + iface.Bridge = &virtv1.InterfaceBridge{} + } if macAddress != "" { iface.MacAddress = macAddress } diff --git a/templates/kubevirt/kubevirt.yaml b/templates/kubevirt/kubevirt.yaml index be76ae70bc..375f500a28 100644 --- a/templates/kubevirt/kubevirt.yaml +++ b/templates/kubevirt/kubevirt.yaml @@ -39,6 +39,11 @@ spec: {{- end }} evictionStrategy: LiveMigrate vmRolloutStrategy: LiveUpdate + network: + binding: + bpfbridge: + domainAttachmentType: tap + migration: {} developerConfiguration: logVerbosity: virtLauncher: {{ $logVerbosity }} From 3fb5a9188fefdf9c503944224665b78b274a7e75 Mon Sep 17 00:00:00 2001 From: MaxiHunter Date: Thu, 28 May 2026 17:10:12 +0300 Subject: [PATCH 02/12] Build commit Signed-off-by: Maksim Garmonov --- images/virt-artifact/werf.inc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/virt-artifact/werf.inc.yaml b/images/virt-artifact/werf.inc.yaml index 4d44c3c8cd..4a8ce0324b 100644 --- a/images/virt-artifact/werf.inc.yaml +++ b/images/virt-artifact/werf.inc.yaml @@ -16,7 +16,7 @@ shell: installCacheVersion: "{{ now | date "Mon Jan 2 15:04:05 MST 2006" }}" install: - | - echo "$date --------- new ---- 123456789 " + echo "$date --------- new ---- 1234567899 " echo "Git clone {{ $gitRepoName }} repository..." git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $tag }} /src/kubevirt From b281e23b5ceadab36ffd64f3065801427fad81a3 Mon Sep 17 00:00:00 2001 From: Maksim Garmonov Date: Fri, 29 May 2026 00:52:44 +0300 Subject: [PATCH 03/12] New build Signed-off-by: Maksim Garmonov Signed-off-by: Dmitry Lopatin --- images/virt-artifact/werf.inc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/virt-artifact/werf.inc.yaml b/images/virt-artifact/werf.inc.yaml index 4a8ce0324b..2952b89799 100644 --- a/images/virt-artifact/werf.inc.yaml +++ b/images/virt-artifact/werf.inc.yaml @@ -16,7 +16,7 @@ shell: installCacheVersion: "{{ now | date "Mon Jan 2 15:04:05 MST 2006" }}" install: - | - echo "$date --------- new ---- 1234567899 " + echo "$date --------- new ---- 123456789987 " echo "Git clone {{ $gitRepoName }} repository..." git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $tag }} /src/kubevirt From c05ec54c3cb65d6d3230ab8c314ab3d8a9ac4b0f Mon Sep 17 00:00:00 2001 From: Maksim Garmonov Date: Fri, 5 Jun 2026 20:21:52 +0300 Subject: [PATCH 04/12] fix Signed-off-by: Maksim Garmonov --- images/virt-artifact/werf.inc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/virt-artifact/werf.inc.yaml b/images/virt-artifact/werf.inc.yaml index 2952b89799..fd04fa2640 100644 --- a/images/virt-artifact/werf.inc.yaml +++ b/images/virt-artifact/werf.inc.yaml @@ -16,7 +16,7 @@ shell: installCacheVersion: "{{ now | date "Mon Jan 2 15:04:05 MST 2006" }}" install: - | - echo "$date --------- new ---- 123456789987 " + echo "$date --------- new ----- 123456789987 " echo "Git clone {{ $gitRepoName }} repository..." git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $tag }} /src/kubevirt From 9635e38c7f3f7bafc3296b072b95d4f14c261115 Mon Sep 17 00:00:00 2001 From: Dmitry Lopatin Date: Sun, 7 Jun 2026 21:03:46 +0300 Subject: [PATCH 05/12] feat: add support new network plugin Signed-off-by: Dmitry Lopatin --- .../pkg/controller/kvbuilder/kvvm.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/images/virtualization-artifact/pkg/controller/kvbuilder/kvvm.go b/images/virtualization-artifact/pkg/controller/kvbuilder/kvvm.go index a0fa7986a4..3068bba438 100644 --- a/images/virtualization-artifact/pkg/controller/kvbuilder/kvvm.go +++ b/images/virtualization-artifact/pkg/controller/kvbuilder/kvvm.go @@ -814,12 +814,9 @@ func (b *KVVM) SetNetworkInterface(name, macAddress string, acpiIndex int) { Name: name, Model: devPreset.InterfaceModel, ACPIIndex: acpiIndex, + Binding: &virtv1.PluginBinding{Name: "bpfbridge"}, } - if name == "default" { - iface.Binding = &virtv1.PluginBinding{Name: "bpfbridge"} - } else { - iface.Bridge = &virtv1.InterfaceBridge{} - } + if macAddress != "" { iface.MacAddress = macAddress } From 78d470bb1c8ccf30540c376cd02625b8984e8792 Mon Sep 17 00:00:00 2001 From: Dmitry Lopatin Date: Sun, 7 Jun 2026 21:47:56 +0300 Subject: [PATCH 06/12] wip Signed-off-by: Dmitry Lopatin --- images/virt-artifact/werf.inc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/virt-artifact/werf.inc.yaml b/images/virt-artifact/werf.inc.yaml index fd04fa2640..1d2834b418 100644 --- a/images/virt-artifact/werf.inc.yaml +++ b/images/virt-artifact/werf.inc.yaml @@ -16,7 +16,7 @@ shell: installCacheVersion: "{{ now | date "Mon Jan 2 15:04:05 MST 2006" }}" install: - | - echo "$date --------- new ----- 123456789987 " + echo "$date --------- new ----- 1234567899876 " echo "Git clone {{ $gitRepoName }} repository..." git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $tag }} /src/kubevirt From 7c1ca0ea3fac87bfea9fb199359bec58862b010b Mon Sep 17 00:00:00 2001 From: Dmitry Lopatin Date: Sun, 7 Jun 2026 22:20:39 +0300 Subject: [PATCH 07/12] wip Signed-off-by: Dmitry Lopatin --- images/virt-artifact/werf.inc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/virt-artifact/werf.inc.yaml b/images/virt-artifact/werf.inc.yaml index 1d2834b418..56d31b6b67 100644 --- a/images/virt-artifact/werf.inc.yaml +++ b/images/virt-artifact/werf.inc.yaml @@ -16,7 +16,7 @@ shell: installCacheVersion: "{{ now | date "Mon Jan 2 15:04:05 MST 2006" }}" install: - | - echo "$date --------- new ----- 1234567899876 " + echo "$date --------- new ----- 12345678998765 " echo "Git clone {{ $gitRepoName }} repository..." git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $tag }} /src/kubevirt From 9326abdb3a7ab34030050aca3f6e6a168d69fb1c Mon Sep 17 00:00:00 2001 From: Dmitry Lopatin Date: Mon, 8 Jun 2026 22:03:35 +0300 Subject: [PATCH 08/12] wip Signed-off-by: Dmitry Lopatin --- images/virt-artifact/werf.inc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/virt-artifact/werf.inc.yaml b/images/virt-artifact/werf.inc.yaml index 56d31b6b67..84bf36fd8f 100644 --- a/images/virt-artifact/werf.inc.yaml +++ b/images/virt-artifact/werf.inc.yaml @@ -16,7 +16,7 @@ shell: installCacheVersion: "{{ now | date "Mon Jan 2 15:04:05 MST 2006" }}" install: - | - echo "$date --------- new ----- 12345678998765 " + echo "$date --------- new ----- 123456789987654 " echo "Git clone {{ $gitRepoName }} repository..." git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $tag }} /src/kubevirt From 4299f1d7bb9c0e9fe034195d9817403e5e9b7878 Mon Sep 17 00:00:00 2001 From: Dmitry Lopatin Date: Mon, 8 Jun 2026 22:34:26 +0300 Subject: [PATCH 09/12] wip Signed-off-by: Dmitry Lopatin --- images/virt-artifact/werf.inc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/virt-artifact/werf.inc.yaml b/images/virt-artifact/werf.inc.yaml index 84bf36fd8f..f99fe20137 100644 --- a/images/virt-artifact/werf.inc.yaml +++ b/images/virt-artifact/werf.inc.yaml @@ -16,7 +16,7 @@ shell: installCacheVersion: "{{ now | date "Mon Jan 2 15:04:05 MST 2006" }}" install: - | - echo "$date --------- new ----- 123456789987654 " + echo "$date --------- new ----- 1234567899876543 " echo "Git clone {{ $gitRepoName }} repository..." git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $tag }} /src/kubevirt From d0680fde80b62dbfc3473056a9ba52dd2c124cad Mon Sep 17 00:00:00 2001 From: Dmitry Lopatin Date: Mon, 8 Jun 2026 23:33:17 +0300 Subject: [PATCH 10/12] wip Signed-off-by: Dmitry Lopatin --- images/virt-artifact/werf.inc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/virt-artifact/werf.inc.yaml b/images/virt-artifact/werf.inc.yaml index f99fe20137..b32f06c853 100644 --- a/images/virt-artifact/werf.inc.yaml +++ b/images/virt-artifact/werf.inc.yaml @@ -16,7 +16,7 @@ shell: installCacheVersion: "{{ now | date "Mon Jan 2 15:04:05 MST 2006" }}" install: - | - echo "$date --------- new ----- 1234567899876543 " + echo "$date --------- new ----- 12345678998765432 " echo "Git clone {{ $gitRepoName }} repository..." git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $tag }} /src/kubevirt From 7cba2f5ffb8a333221b8db77fe5dddd5b488f34c Mon Sep 17 00:00:00 2001 From: Dmitry Lopatin Date: Tue, 9 Jun 2026 07:35:58 +0300 Subject: [PATCH 11/12] wip Signed-off-by: Dmitry Lopatin --- images/virt-artifact/werf.inc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/virt-artifact/werf.inc.yaml b/images/virt-artifact/werf.inc.yaml index b32f06c853..f8da844e51 100644 --- a/images/virt-artifact/werf.inc.yaml +++ b/images/virt-artifact/werf.inc.yaml @@ -16,7 +16,7 @@ shell: installCacheVersion: "{{ now | date "Mon Jan 2 15:04:05 MST 2006" }}" install: - | - echo "$date --------- new ----- 12345678998765432 " + echo "$date --------- new ----- 123456789987654321 " echo "Git clone {{ $gitRepoName }} repository..." git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $tag }} /src/kubevirt From fcc60d955f4d14ca280165536c98e5d99e06f153 Mon Sep 17 00:00:00 2001 From: Dmitry Lopatin Date: Tue, 9 Jun 2026 09:53:00 +0300 Subject: [PATCH 12/12] wip Signed-off-by: Dmitry Lopatin --- images/virt-artifact/werf.inc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/virt-artifact/werf.inc.yaml b/images/virt-artifact/werf.inc.yaml index f8da844e51..55d5e5c3db 100644 --- a/images/virt-artifact/werf.inc.yaml +++ b/images/virt-artifact/werf.inc.yaml @@ -16,7 +16,7 @@ shell: installCacheVersion: "{{ now | date "Mon Jan 2 15:04:05 MST 2006" }}" install: - | - echo "$date --------- new ----- 123456789987654321 " + echo "$date --------- new ----- 1234567899876543210 " echo "Git clone {{ $gitRepoName }} repository..." git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $tag }} /src/kubevirt