apache / apache/cloudstack

SystemVM template registration failure in upgrading to 4.22

未关闭
#12,077 3 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
component:upgrade
主要语言
Java
星标
3.1k
派生
1.4k
平均合并
6 天 19 小时
30 天内合并 PR
32

描述

### problem

When upgrading an environment on 4.20.1 with KVM,VMware and Xenserver hypervisors the upgrade process reported an error in upgrading HyperV SystemVM template.

Workaround : Download the template from https://download.cloudstack.org/systemvm/4.22/systemvmtemplate-4.22.0-x86_64-hyperv.vhd.zip to /usr/share/cloudstack-management/templates/systemvm/ on the management server before upgrade. Or use the old method to register the systemVM templates after restarting the service.

```
2025-11-14 05:55:59,844 DEBUG [c.c.u.SystemVmTemplateRegistration] (main:[]) (logid:) /usr/share/cloudstack-management/templates/systemvm/systemvmtemplate-4.22.0-x86_64-hyperv.vhd.zip is not present
2025-11-14 05:55:59,844 ERROR [o.a.c.u.s.DigestHelper] (main:[]) (logid:) Failed to calculate sha512 checksum of template
2025-11-14 05:55:59,847 ERROR [c.c.u.SystemVmTemplateRegistration] (main:[]) (logid:) Exception while registering/updating system VM templates for hypervisors in metadata com.cloud.utils.exception.CloudRuntimeException: Failed to register 4.22.0 templates for hypervisors: [vmware,xenserver,kvm-x86_64,hyperv]. Cannot upgrade system VMs
at com.cloud.upgrade.SystemVmTemplateRegistration.registerOrUpdateSystemVmTemplate(SystemVmTemplateRegistration.java:1040)
```

### versions

4.20.1

### The steps to reproduce the bug

Upgrade 4.20.1 to .422 with KVM,VMware and Xenserver

### What to do about it?

Something is wrong in the upgrade process, needs to be fixed. The issue was not seen when upgraded to RC versions of 4.22, only with KVM.

贡献指南

打开贡献指南

调研方向

从 SystemVmTemplateRegistration.java:1040 的 com.cloud.upgrade.SystemVmTemplateRegistration.registerOrUpdateSystemVmTemplate 开始,检查升级日志中 /usr/share/cloudstack-management/templates/systemvm/ 下缺失的 HyperV 模板。使用列出的 hypervisor 重现从 4.20.1 到 4.22 的升级,然后验证 4.22 SystemVM 模板注册时不会出现 checksum 或 Cannot upgrade system VMs 错误。

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
cloud, infrastructure
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。