From a55e08e95fce4fc975a1cf33bb243e0c3df5cce8 Mon Sep 17 00:00:00 2001
From: Arik Hadas <ahadas@redhat.com>
Date: Thu, 26 Oct 2023 18:47:32 +0300
Subject: [PATCH] Require KVM for OVA conversion pod

Signed-off-by: Arik Hadas <ahadas@redhat.com>
---
 pkg/controller/plan/kubevirt.go | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/pkg/controller/plan/kubevirt.go b/pkg/controller/plan/kubevirt.go
index 72f9c367c..69eeb49fc 100644
--- a/pkg/controller/plan/kubevirt.go
+++ b/pkg/controller/plan/kubevirt.go
@@ -701,7 +701,11 @@ func (r *KubeVirt) createPodToBindPVCs(vm *plan.VMStatus, pvcNames []string) (er
 
 // Sets KVM requirement to the pod and container.
 func (r *KubeVirt) setKvmOnPodSpec(podSpec *core.PodSpec) {
-	if *r.Plan.Provider.Source.Spec.Type == v1beta1.VSphere && !Settings.VirtV2vDontRequestKVM {
+	if Settings.VirtV2vDontRequestKVM {
+		return
+	}
+	switch *r.Plan.Provider.Source.Spec.Type {
+	case v1beta1.VSphere, v1beta1.Ova:
 		if podSpec.NodeSelector == nil {
 			podSpec.NodeSelector = make(map[string]string)
 		}