pyvmomi
pyvmomi copied to clipboard
Cloning a template while deleting several machines throws ManagedObjectNotFound
This occurs every so often in my codebase, sometimes when deleting a few machines at once, and then cloning a machine(simultaneously), this exception is thrown and the machine is not cloned.
pyVmomi.VmomiSupport.ManagedObjectNotFound: (vmodl.fault.ManagedObjectNotFound) {
dynamicType = <unset>,
dynamicProperty = (vmodl.DynamicProperty) [],
msg = "The object 'vim.VirtualMachine:vm-58107' has already been deleted or has not been completely created",
faultCause = <unset>,
faultMessage = (vmodl.LocalizableMessage) [],
obj = 'vim.VirtualMachine:vm-58107'
}