rajujith opened a new issue, #11603:
URL: https://github.com/apache/cloudstack/issues/11603
### problem
Importing VM using `importVm` API with QCOW2 image in a shared primary
storage with the `templateid` parameter results in creating a VM that uses the
default template for imports.
Example:
`cmk import vm name=Sept8-3 displayname=Sept8-3 importsource=shared
hypervisor=kvm templateid=09fdc31b-7412-4340-94c2-e04c8c246fab
storageid=d1289b49-db52-33f7-bd0e-3f7feeb3527b
diskpath=/mnt/d1289b49-db52-33f7-bd0e-3f7feeb3527b/Sept8-1-3.qcow2
networkid=a03547c4-4fed-42e8-aa1c-43fed36b6fc9
serviceofferingid=e96cd0d6-2f4c-4bd2-a5b1-be311cb8e911 migrateallowed=true
zoneid=664da58b-ab80-409a-a320-b0d6afad1b82
clusterid=0d7ec7cf-d63a-48ab-9391-8c4b5c794a1c details[1].UEFI="LEGACY"
details[0].cpuNumber="1" details[0].cpuSpeed="1000" details[0].memory="1024"`
`2025-09-08 07:04:44,212 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
(API-Job-Executor-1:[ctx-91c57878, job-76, ctx-4eaf5361]) (logid:1e261c70)
Trying to deploy VM
[{"displayName":"Sept8-3","updateParameters":true,"id":28,"hostName":"Sept8-3","vncPassword":"ccmuHljaJBW9jEWO3wIRRg","state":"Stopped","instanceName":"i-2-27-VM","templateId":202,"guestOSId":1,"dataCenterId":1,`
### versions
4.20.1
### The steps to reproduce the bug
1.Use the API `importVm` as given the example above, pass the `templateid`.
2.Check the imported VM's template.
...
### What to do about it?
Imported VM should use the desired template.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]