Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 182126

Migrate vm to another vCenter

$
0
0

I have two vCenters and I want to migrate Virtual Machine from vCenter1 to vCenter2. vCenter2 has Datastore Cluster with Turned ON Storage DRS. I use StorageResourceManager object and invoke method RecommendDatastores. During execution I get:

msg = "The object 'vim.VirtualMachine:vm-325' has already been deleted or has not been completely created"

But vCenter2 doesn’t have this Virtual Machine. My question: Can I get StoragePlacementResult if I do migrate Virtual Machine from one vCenter to another?

 

Traceback (most recent call last):

  File "/---/migrate_vm", line 815, in <module>

    sys.exit(main())

  File "/---/migrate_vm", line 380, in get_spec

    storagePlacementResult = storage_res_manager.RecommendDatastores(storage_spec)

  File "/usr/lib/python3.7/site-packages/pyVmomi/VmomiSupport.py", line 580, in <lambda>

    self.f(*(self.args + (obj,) + args), **kwargs)

  File "/usr/lib/python3.7/site-packages/pyVmomi/VmomiSupport.py", line 386, in _InvokeMethod

    return self._stub.InvokeMethod(self, info, args)

  File "/usr/lib/python3.7/site-packages/pyVmomi/SoapAdapter.py", line 1374, in InvokeMethod

    raise obj # pylint: disable-msg=E0702

pyVmomi.VmomiSupport.ManagedObjectNotFound: (vmodl.fault.ManagedObjectNotFound) {

   dynamicType = <unset>,

   dynamicProperty = (vmodl.DynamicProperty) [],

   msg = "The object 'vim.VirtualMachine:vm-325' has already been deleted or has not been completely created",

   faultCause = <unset>,

   faultMessage = (vmodl.LocalizableMessage) [],

   obj = 'vim.VirtualMachine:vm-325'

}


Viewing all articles
Browse latest Browse all 182126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>