[Users] Clone a Template using API
Tejesh M
tejeshmk at gmail.com
Wed Mar 5 11:01:18 UTC 2014
Hi,
While creating VM from Template via Web Admin portal, the default
provisioning is Clone. But while doing the same via API its is doing Thin
provisioning. Can someone share there view.
org.ovirt.engine.sdk.entities.Template templateData = new Template();
templateData.setName(templateName);
org.ovirt.engine.sdk.entities.Cluster clusterData = new Cluster();
clusterData.setName(clusterName);
org.ovirt.engine.sdk.entities.VM vmDataForCreate = new VM();
vmDataForCreate.setName(vmName);
vmDataForCreate.setCluster(clusterData);
vmDataForCreate.setTemplate(templateData);
api.getVMs().add(vmDataForCreate);
--
Thanks & Regards
Tejesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20140305/88d9c32b/attachment-0001.html>
More information about the Users
mailing list