From f3dd5681e3cbf49c67f961a14494969d5086dc42 Mon Sep 17 00:00:00 2001 From: Ivan Mikheykin Date: Thu, 19 Sep 2024 15:18:09 +0300 Subject: [PATCH] - virtualization-controller: remove Macvtap support. Signed-off-by: Ivan Mikheykin --- .../pkg/controller/kvbuilder/kvvm.go | 9 ++------- .../pkg/controller/vm/internal/sync_kvvm.go | 7 +++---- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/images/virtualization-artifact/pkg/controller/kvbuilder/kvvm.go b/images/virtualization-artifact/pkg/controller/kvbuilder/kvvm.go index eef84dd0e..9f5ca7155 100644 --- a/images/virtualization-artifact/pkg/controller/kvbuilder/kvvm.go +++ b/images/virtualization-artifact/pkg/controller/kvbuilder/kvvm.go @@ -47,8 +47,7 @@ type KVVMOptions struct { OsType virtv2.OsType // These options are for local development mode - ForceBridgeNetworkBinding bool - DisableHypervSyNIC bool + DisableHypervSyNIC bool } type KVVM struct { @@ -494,11 +493,7 @@ func (b *KVVM) SetNetworkInterface(name string) { Name: name, Model: devPreset.InterfaceModel, } - if b.opts.ForceBridgeNetworkBinding { - iface.InterfaceBindingMethod.Bridge = &virtv1.InterfaceBridge{} - } else { - iface.InterfaceBindingMethod.Macvtap = &virtv1.InterfaceMacvtap{} - } + iface.InterfaceBindingMethod.Bridge = &virtv1.InterfaceBridge{} b.Resource.Spec.Template.Spec.Domain.Devices.Interfaces = util.SetArrayElem( b.Resource.Spec.Template.Spec.Domain.Devices.Interfaces, iface, func(v1, v2 virtv1.Interface) bool { diff --git a/images/virtualization-artifact/pkg/controller/vm/internal/sync_kvvm.go b/images/virtualization-artifact/pkg/controller/vm/internal/sync_kvvm.go index 3b4794640..51be2b9ce 100644 --- a/images/virtualization-artifact/pkg/controller/vm/internal/sync_kvvm.go +++ b/images/virtualization-artifact/pkg/controller/vm/internal/sync_kvvm.go @@ -323,10 +323,9 @@ func (h *SyncKvvmHandler) makeKVVMFromVMSpec(ctx context.Context, s state.Virtua kvvmName := common.NamespacedName(current) kvvmOpts := kvbuilder.KVVMOptions{ - EnableParavirtualization: current.Spec.EnableParavirtualization, - OsType: current.Spec.OsType, - ForceBridgeNetworkBinding: os.Getenv("FORCE_BRIDGE_NETWORK_BINDING") == "1", - DisableHypervSyNIC: os.Getenv("DISABLE_HYPERV_SYNIC") == "1", + EnableParavirtualization: current.Spec.EnableParavirtualization, + OsType: current.Spec.OsType, + DisableHypervSyNIC: os.Getenv("DISABLE_HYPERV_SYNIC") == "1", } kvvm, err := s.KVVM(ctx)