Looking at this in more detail, that's not going to do it. If we have to create a template and call deployVirtualMachine, that will do--intentionally--what it was intended to do: spin up a new VM in the hypervisor and allocate a chunk of disk out of primary storage.
What we are looking to do, while still attempting to maintain vendor neutrality, would require a registerVirtualMachine method. With such a thing, anybody can drop an instance (thinking in terms of a root volume, and/or a data disk) on primary storage, then invoke the register method to make CloudStack _and_ the hypervisor aware of the new instance. This would allow rapid cloning of VMs to be offloaded to the storage layer, and then the registration just connects the dots between CS and the hypervisor, which would be another fast operation. If there is a way to do that today, by all means we are happy to take a look and go down that path. If there isn't, it seems that this registerVirtualMachine method could be a modified version of deployVirtualMachine, without the disk creation piece. Of course, there are other intricacies to take care of (UUIDs, naming and such), so by no means a super trivial task. Is there any expert in this area who can shed some light on the topic? We (NetApp) have created other products which have plugins for XenServer and vSphere that do just that: take advantage of hardware level cloning techniques, then make those clones available to the hypervisor. So, with all the CS code for dealing with the hypervisors, to me it seems like we could be close to providing such a registerVirtualMachine, given a pointer to the actual disk on storage. How that VM disk makes it to storage is another story, one that CS doesn't have to concern itself, IMO. Thx! David La Motta Technical Marketing Engineer Citrix Solutions NetApp 919.476.5042 dlamo...@netapp.com<mailto:dlamo...@netapp.com> On Jun 12, 2013, at 10:57 AM, "La Motta, David" <david.lamo...@netapp.com<mailto:david.lamo...@netapp.com>> wrote: Nope! That's the one I was looking for. Too close to destroyVirtualMachine… didn't even see it ;-) Thanks again. David La Motta Technical Marketing Engineer Citrix Solutions NetApp 919.476.5042 dlamo...@netapp.com<mailto:dlamo...@netapp.com><mailto:dlamo...@netapp.com> On Jun 12, 2013, at 10:54 AM, Chip Childers <chip.child...@sungard.com<mailto:chip.child...@sungard.com><mailto:chip.child...@sungard.com>> wrote: On Wed, Jun 12, 2013 at 02:49:42PM +0000, La Motta, David wrote: Ok, thanks. So it is doable. The question now being how fast this process will be, since the VM creation will ultimately be done on the hypervisor. What is the API that I could use to create a VM from a template? I am looking at the 4.1 REST API and there is nothing for creating under the Virtual Machine section for Root, Domain, or User. Thanks, Chip. You always have to specify a templateid param for the deployVirtualMachine API call [1]. Are you looking at some other API call? -chip [1] http://cloudstack.apache.org/docs/api/apidocs-4.1/user/deployVirtualMachine.html