Re-factored script for Cross VC vMotion via API error when running
Opened this issue · 0 comments
Th3NightHawk commented
When running the script the below error gets logged:
Wait-Task : 2017-02-23 08:37:28 AM Wait-Task The operation for the
entity "ubuntu-iperf_01" failed with the following message: "A specified
parameter was not correct: ServiceLocator.instanceUuid"
At D:\xmove.ps1:151 char:14
-
$task1 | Wait-Task -Verbose
-
~~~~~~~~~~~~~~~~~~
- CategoryInfo : NotSpecified: (:) [Wait-Task], InvalidArgument
- FullyQualifiedErrorId : Client20_TaskServiceImpl_CheckServerSideTaskUpda
tes_OperationFailed,VMware.VimAutomation.ViCore.Cmdlets.Commands.WaitTask
A couple of users commented the they fixed the issue by doing the below:
Line 101: $service.instanceUuid = $destVCConn.InstanceUuid.ToUpper()
After adding .ToUpper() the script runs through properly. Could you perhaps update the script if this is the correct fix?