   ([type name within] (.searchManagedEntity within type name)))
 
 (defn resource-pools [dcname]
-  (first (find-all "ResourcePool" (navigator (find* "Datacenter" dcname)))))
+  (find-all "ResourcePool" (navigator (find* "Datacenter" dcname))))
 
 (defn relocation-spec [dcname]
   (doto (VirtualMachineRelocateSpec.) 
+    (.setTransform (VirtualMachineRelocateTransformation/sparse))
     (.setPool (.getMOR (first (resource-pools dcname))))))
 
 (defn clone-spec [dcname]

  (:import 
    java.net.URL
    com.vmware.vim25.mo.InventoryNavigator
    com.vmware.vim25.mo.ServiceInstance
    com.vmware.vim25.VirtualMachineCloneSpec
    com.vmware.vim25.VirtualMachineRelocateSpec

      (wait-for (.cloneVM_Task vm (.getParent vm) vmname (clone-spec dcname))))))

(comment
  (clone "ubuntu-13.04_puppet-3.1" "foo" "playground")
  )


