apache / apache/cloudstack

Optional templateid param fails for KVM VM import

未關閉 適合新手
#13,067 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
bug
主要語言
Java
星號
3.1k
分支
1.4k
平均合併
7 天 14 小時
30 天內合併 PR
31

描述

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

Image

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.

貢獻指南

開啟貢獻指南

研究方向

先查看已記錄的 importUnmanagedInstance API 和 docs/en/4.22.0.0/adminguide/virtual_machines/importing_unmanaging_vms.html,接著檢查 UnmanagedVMsManagerImpl.java 中 1605-1607 行附近的內容,以確認 KVM 限制。與維護者確認預期結果是僅修改文件還是修改程式碼;當 API 文件和管理員文件準確描述 templateid 的行為時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
documentation
Issue 類型
文件
難度
2/5
預估耗時
1-3 小時
活躍度
活躍
描述清晰度
基本清楚
新手友好度
68/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。