apache / apache/cloudstack

Optional templateid param fails for KVM VM import

オープン 初心者向け
#13,067 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Java
スター
3.1k
フォーク
1.4k
平均マージ
6日 19時間
マージ済み PR(30日)
32

説明

### 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 の制限を確認します。意図されている結果がドキュメントのみの変更なのかコード変更なのかを maintainers に確認してください。API と管理者向けドキュメントが templateid の動作を正確に説明していれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
documentation
issue の種類
ドキュメント
難易度
2/5
見積もり時間
1〜3時間
活発さ
活発
明瞭さ
おおむね明確
初心者へのやさしさ
68/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。