12 Replies Latest reply on Jul 25, 2018 9:36 PM by LucD

    Unable to vMotion between 2 vCenter servers in different SSO domains

    birdylarry Novice

      Hi All,

       

      Getting the below error when trying to migrate using the attached script. Debug shows that the object types being passed to the Move-VM parameters are correct. Thanks in advance..

       

      None of the 2 Vmware flings for cross-VC migration also works

       

      Move-VM         The operation for the entity "FAPL_s65nbu05" failed with the following message: "A general system error occurred: The requested name is valid, but no data of the requested type was found"

      + $vm | Move-VM -Destination $destination -NetworkAdapter $networkAdapt ...

      +       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

          + CategoryInfo          : NotSpecified: (:) [Move-VM], SystemError

          + FullyQualifiedErrorId : Client20_TaskServiceImpl_CheckServerSideTaskUpdates_OperationFailed,VMware.VimAutomation.ViCore.Cmdlets.Commands.MoveVM

       

       

       

      #Variables

      $sourceVC = 'mySourceVC'

      $sourceVCUsername = 'administrator@vsphere.local'

      $sourceVCPassword= 'MySecurePW'

      $destVC = 'myDestinationVC'

      $destVCUsername = 'administrator@sso.mydomain.local'

      $destVCPassword= 'S3cur3p@$$'

      $Vmhosts = '10.10.10.10'

      $vms = 'vm_to_migrate'

       

      # Connect to the vCenter Servers

      $sourceVCConn = Connect-VIServer -Server $sourceVC -user $sourceVCUsername -password $sourceVCPassword

      $destVCConn = Connect-VIServer -Server $destVC -user $destVCUsername -password $destVCPassword

       

      Foreach ($vm in $vms) {

      $vmobj = Get-VM $vm -Server $sourceVC

      $strVMdatastore = ($vmobj | get-datastore).name

      $networkAdapter = $vmobj | Get-NetworkAdapter

      $strSourceVDPG = ($networkAdapter | Get-VDPortgroup).name

      $destinationHost = Get-VMHost -name $vmhosts -Server $destVCConn

      $destinationPortGroup = Get-VirtualPortGroup -name $strSourceVDPG -Server $destVCConn

      $destinationDatastore = Get-Datastore $strVMdatastore -Server $destVCConn

      Move-VM -VM $vmobj -Server $destVC -Destination $destinationHost -NetworkAdapter $networkAdapter -PortGroup $destinationPortGroup -Datastore $destinationDatastore

      }