apache / apache/cloudstack

SystemVM template registration failure in upgrading to 4.22

Open
#12,077 3 comments 1 reaction 0 assignees View on GitHub
component:upgrade
Dominant language
Java
Stars
3.1k
Forks
1.4k
Avg merge
6d 19h
Merged PRs (30d)
32

Description

### 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.

Contributor guide

Open the contributing guide

Research direction

Start with com.cloud.upgrade.SystemVmTemplateRegistration.registerOrUpdateSystemVmTemplate at SystemVmTemplateRegistration.java:1040 and review the upgrade logs for the missing HyperV template under /usr/share/cloudstack-management/templates/systemvm/. Reproduce the 4.20.1-to-4.22 upgrade with the listed hypervisors, then verify that 4.22 SystemVM templates register without the checksum or Cannot upgrade system VMs errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.