engine/schema: fix new systemvm template is not registered during upgrade if hypervisor is not KVM (#12952)

* engine/schema: fix new systemvm template is not registered during upgrade if hypervisor is not KVM
This commit is contained in:
Wei Zhou 2026-04-06 13:49:04 +02:00 committed by GitHub
parent e2497cfc4d
commit 6f1aa96b4c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -315,11 +315,11 @@ public class SystemVmTemplateRegistration {
public static final List<Pair<Hypervisor.HypervisorType, CPU.CPUArch>> hypervisorList = Arrays.asList(
new Pair<>(Hypervisor.HypervisorType.KVM, CPU.CPUArch.amd64),
new Pair<>(Hypervisor.HypervisorType.KVM, CPU.CPUArch.arm64),
new Pair<>(Hypervisor.HypervisorType.VMware, null),
new Pair<>(Hypervisor.HypervisorType.XenServer, null),
new Pair<>(Hypervisor.HypervisorType.Hyperv, null),
new Pair<>(Hypervisor.HypervisorType.LXC, null),
new Pair<>(Hypervisor.HypervisorType.Ovm3, null)
new Pair<>(Hypervisor.HypervisorType.VMware, CPU.CPUArch.amd64),
new Pair<>(Hypervisor.HypervisorType.XenServer, CPU.CPUArch.amd64),
new Pair<>(Hypervisor.HypervisorType.Hyperv, CPU.CPUArch.amd64),
new Pair<>(Hypervisor.HypervisorType.LXC, CPU.CPUArch.amd64),
new Pair<>(Hypervisor.HypervisorType.Ovm3, CPU.CPUArch.amd64)
);
public static final Map<String, MetadataTemplateDetails> NewTemplateMap = new HashMap<>();

View File

@ -155,7 +155,7 @@ public class SystemVmTemplateRegistrationTest {
templateDetails =
SystemVmTemplateRegistration.NewTemplateMap.get("vmware");
assertNotNull(templateDetails);
assertNull(templateDetails.getArch());
assertEquals(CPU.CPUArch.amd64, templateDetails.getArch());
assertEquals(Hypervisor.HypervisorType.VMware, templateDetails.getHypervisorType());
}