From 57ca88f13c090f2cfef2afe09f1efe8ffdba01de Mon Sep 17 00:00:00 2001 From: yaroslavborbat Date: Tue, 12 Nov 2024 18:38:15 +0300 Subject: [PATCH] fix Signed-off-by: yaroslavborbat --- .../pkg/controller/kvbuilder/kvvm.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/images/virtualization-artifact/pkg/controller/kvbuilder/kvvm.go b/images/virtualization-artifact/pkg/controller/kvbuilder/kvvm.go index 3d36136b8..21b1ba7a9 100644 --- a/images/virtualization-artifact/pkg/controller/kvbuilder/kvvm.go +++ b/images/virtualization-artifact/pkg/controller/kvbuilder/kvvm.go @@ -95,10 +95,10 @@ func (b *KVVM) SetKVVMIAnnotation(annoKey, annoValue string) { } func (b *KVVM) SetCPUModel(class *virtv2.VirtualMachineClass) error { - cpu := b.Resource.Spec.Template.Spec.Domain.CPU - if cpu == nil { - cpu = &virtv1.CPU{} + if b.Resource.Spec.Template.Spec.Domain.CPU == nil { + b.Resource.Spec.Template.Spec.Domain.CPU = &virtv1.CPU{} } + cpu := b.Resource.Spec.Template.Spec.Domain.CPU switch class.Spec.CPU.Type { case virtv2.CPUTypeHost: