Optional templateid param fails for KVM VM import
- Langage dominant
- Java
- Étoiles
- 3.1k
- Forks
- 1.4k
- Merge moyen
- 6 j 19 h
- PR mergées (30 j)
- 32
Description
### problem
When importing a KVM VM via API and if a template is not specified, import fails with error,
**Template is needed and unable to use default template for hypervisor KVM**
Even though templateid parameter is specified as optional in the API documentation:
https://cloudstack.apache.org/api/apidocs-4.22/apis/importUnmanagedInstance.html
In UI, template is a required field though.
Documentation doesn't talk about this restriction on KVM
https://docs.cloudstack.apache.org/en/4.22.0.0/adminguide/virtual_machines/importing_unmanaging_vms.html
This is more of a documentation issue if the following block can not be updated:
https://github.com/apache/cloudstack/blob/4.22.0.0/server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java#L1605-L1607
### versions
4.22; Maybe other versions as well
Import VM
### The steps to reproduce the bug
_No response_
### What to do about it?
Either update the documentation or remove the restriction to use default dummy template.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par l’API importUnmanagedInstance documentée et docs/en/4.22.0.0/adminguide/virtual_machines/importing_unmanaging_vms.html, puis examinez UnmanagedVMsManagerImpl.java autour des lignes 1605-1607 pour confirmer la restriction KVM. Vérifiez avec les maintainers si le résultat attendu est uniquement une modification de la documentation ou une modification du code ; le travail est terminé lorsque la documentation de l’API et celle destinée aux administrateurs décrivent correctement le comportement de templateid.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java
- Domaine
- documentation
- Type d'issue
- Documentation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- Active
- Clarté
- Plutôt claire
- Accessibilité débutants
- 68/100