Open GoogleCodeExporter opened 8 years ago
I'm also wondering about templates.
There is a clone feature, but it doesn't work for me.
If i try to clone a regular vm (non-template) I get
VIException: [Task Error]: The operation is not supported on the object.
new_vm = vm2.clone("Ubuntu_Cluster_02", sync_run=True, template=False,
power_on=True, resourcepool="redacted.com" )
Templates don't show up in server.get_registered_vms().
So i can't try on a template.
The vm clones fine in vsphere.
So what objects can I clone on?
thanks
kesten
---------------------------------------------------------------------------
VIException Traceback (most recent call last)
<ipython-input-41-d9895f03b036> in <module>()
1 # only new name is required. These are all the defualt values (folder, resourcepool same as parent)
2 # , folder="Templates"
----> 3 new_vm = vm2.clone("Ubuntu_Cluster_02", sync_run=True, template=False,
power_on=True, resourcepool="21ct-lynxesx02.21technologies.com" )
/Library/Python/2.7/site-packages/pysphere/vi_virtual_machine.pyc in
clone(self, name, sync_run, folder, resourcepool, datastore, host, power_on,
template, snapshot, linked)
535 if status == vi_task.STATE_ERROR:
536 raise VIException(vi_task.get_error_message(),
--> 537 FaultTypes.TASK_ERROR)
538 return VIVirtualMachine(self._server, vi_task.get_result()._obj)
539
VIException: [Task Error]: The operation is not supported on the object.
Original comment by kesten.b...@gmail.com
on 11 Oct 2013 at 3:01
Original issue reported on code.google.com by
tniliesf...@gmail.com
on 12 Sep 2013 at 8:16