From e10eed83fc54a688b5be6a94cc2816f01efd9263 Mon Sep 17 00:00:00 2001 From: Jian Qiu Date: Sun, 6 Aug 2023 21:18:07 +0800 Subject: [PATCH] fix: set vcpu vendor_id based on host cpu vendor_id (#17711) Co-authored-by: Qiu Jian --- pkg/hostman/guestman/arch/x86.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/hostman/guestman/arch/x86.go b/pkg/hostman/guestman/arch/x86.go index 526fd09e4c..af6e1905ac 100644 --- a/pkg/hostman/guestman/arch/x86.go +++ b/pkg/hostman/guestman/arch/x86.go @@ -136,6 +136,11 @@ func (x86 *X86) GenerateCpuDesc(cpus uint, cpuMax uint, s KVMGuestInstance) (*de var accel, cpuType, vendor, level string var features = make(map[string]bool, 0) if s.IsKvmSupport() { + if isCPUIntel { + vendor = "GenuineIntel" + } else if isCPUAMD { + vendor = "AuthenticAMD" + } accel = "kvm" if s.GetOsName() == qemu.OS_NAME_MACOS { cpuType = "Penryn"