Hello,

When trying to create a VM by cloning a template, I found out I couldn't choose the target storage domain :

[...]
vm_storage_domain = api.storagedomains.get(name=storage_domain)
vm_params = params.VM(name=vm_name,
                        memory=vm_memory,
                        cluster=vm_cluster,
                        template=vm_template,
                        os=vm_os,
                        storage_domain=vm_storage_domain,
                        )
try:
        api.vms.add(vm=vm_params)
[...]

I'm getting :
Failed to create VM from Template:

status: 400
reason: Bad Request
detail: Cannot add VM. The selected Storage Domain does not contain the VM Template.

... which I know, but I thought that, as with the GUI, I could specify the target storage domain.

I made my homework, and I found a nice answer from Juan :
http://lists.ovirt.org/pipermail/users/2016-January/037321.html
but this relates to snapshots, and not to template usage, so I'm still stuck.
May I ask an advice?

--
Nicolas ECARNOT
_______________________________________________
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users

Reply via email to