SystemVM template registration failure in upgrading to 4.22
- Langage dominant
- Java
- Étoiles
- 3.1k
- Forks
- 1.4k
- Merge moyen
- 6 j 19 h
- PR mergées (30 j)
- 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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par com.cloud.upgrade.SystemVmTemplateRegistration.registerOrUpdateSystemVmTemplate dans SystemVmTemplateRegistration.java:1040 et examinez les journaux de mise à niveau pour rechercher le modèle HyperV manquant sous /usr/share/cloudstack-management/templates/systemvm/. Reproduisez la mise à niveau de 4.20.1 vers 4.22 avec les hyperviseurs indiqués, puis vérifiez que les modèles SystemVM de 4.22 s’enregistrent sans erreurs checksum ni Cannot upgrade system VMs.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java
- Domaine
- cloud, infrastructure
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100