Hi Craig,
This is is the vmware documentation for the spec.location.pool parameter:
"""
The resource pool to which this virtual machine should be attached. For a relocate or clone operation to a virtual machine, if the argument is not supplied, the current resource pool of virtual machine is used. For a clone operation to a template, this argument is ignored. For a clone operation from a template to a virtual machine, this argument is required.
"""
So, if you are cloning from template, you must provide a resource pool:
>> rps = server.get_resource_pools()
pick any mor (the returned dictionary keys in trunk r54)
>> rp = rps.keys()[0]
>> vm.clone('cas_new_tmp', resourcepool=rp)
What I'm hardcoding in this method is the 'template' parameter. So you can not clone (a vm or template) to a template.
I've just changed this (r56), so you can now do this:
>> vm.clone('can_new_tmp', template=True) #defaults to False
Summarizing, when cloning from:
VM to VM: resource pool is optional (if not set uses the same from the original vm)
VM to Template: resource pool is ignored
Template to Template: resource pool is ignored
Template to VM: resource pool is mandatory
Regards,
Sebastian.