vCenter

 View Only
  • 1.  PowerCLI cross vCenter vMotion fails

    Posted Apr 01, 2017 08:07 AM

    Morning all,

    Am trying to script some vMotions for lots of our VMs that we are moving to a new vSAN cluster.  VMs in the same vCenter are fine and complete without any issues.  VMs in the other vCenter (same SSO domain behind LB PSC) fail though with the following error:

    Move-VM : 01/04/2017 08:52:41    Move-VM        The operation for the entity "TSTLDNVET1" failed with the following message: "A general system error occurred: Host not found (authoritative)"

    At line:29 char:1

    + Move-VM -vm $drvm -Destination $destcluster -VMotionPriority High -Da ...

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

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

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

    The command I am running (as part of a bigger script block):

    elseif($vm.ParentHost -like "drldne*")

      {

      $drvm = Get-VM $vm.name -Server $SourceVCConn

      $targetPort = Get-VDPortGroup -VDSwitch $switch -Name $vm.DestinationPortGroup -Server $TarVCConn

      Move-VM -vm $drvm -Destination $destcluster -VMotionPriority High -Datastore $destinationDatastore -PortGroup $targetPort

      }

    This vmotion works though through the Web Client.  Anyone seen this error before?  I cannot seem to see anything else in teh detail of it that can tell me why it is breaking.

    EDIT: So I purchased "VMware vSphere PowerCLI Reference" second edition and found a script in there for cross vcenter vmotion.  Alas I get the same error trying to migrate a vm that migrates fine in the web client.



  • 2.  RE: PowerCLI cross vCenter vMotion fails

    Posted Nov 23, 2017 03:21 AM

    I had the same problem, I found that I had to pass the -Server parameter of the source vCenter in the Move-VM Cmdlet.

    eg:

    Move-VM -Server $SourceVCConn -vm $drvm -Destination $destcluster -VMotionPriority High -Datastore $destinationDatastore -PortGroup $targetPort



  • 3.  RE: PowerCLI cross vCenter vMotion fails

    Posted Jan 19, 2018 06:12 AM

    I have the same issue , Adding -Server of the source vcentre dint work for me . Am i missing something ?

    PowerCLI C:\> Move-VM -VM $vm -Server inf-p-ma-mvsph-001 -Destination $d -Datastore $dds -NetworkAdapter $na -PortGroup $dpg -Confirm:$false

    Move-VM : 1/19/2018 1:11:28 AM  Move-VM         The operation for the entity "hyb-p-ma-nwk-pxy-002" failed with the following message: "A general system error occurred: Host not found (authoritative)"

    At line:1 char:1

    + Move-VM -VM $vm -Server inf-p-ma-mvsph-001 -Destination $d -Datastore ...

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

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

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

    Move-VM : 1/19/2018 1:11:28 AM  Move-VM         1/19/2018 1:11:28 AM    Move-VM         The operation for the entity "hyb-p-ma-nwk-pxy-002" failed with the following message: "A general system error occurred: Host not found (authoritative)"

    At line:1 char:1

    + Move-VM -VM $vm -Server inf-p-ma-mvsph-001 -Destination $d -Datastore ...

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

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

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

    PowerCLI C:\>



  • 4.  RE: PowerCLI cross vCenter vMotion fails

    Posted Jan 25, 2018 05:16 PM

    I am also having the same problem running Move-VM in an cross vCenter use case.  I wrote some code yesterday, and it worked great.  I ran it again today and it doesn't work and throws the error "A general system error occurred: Host not found (authoritative)". 

    Adding -server <object of source vCenter> does not make a difference.  I am using the latest build of PowerCLI from the gallery against linked vCenters running 6.0 U3 and hosts running 6.0 U3.

    $destVM = new-vm -Server $sourceVcenter -VM $sourceVM -Name $destVmName -Location ($sourceVM.Folder) -ResourcePool ($sourceVM | Get-ResourcePool)`

                    -Datastore ($sourceVM | Get-Datastore) -ErrorAction Stop

    move-vm -server $sourceVcenter -VM $destVM -Destination $destEsxHost -PortGroup $destPortGroup -InventoryLocation $destFolder -Datastore $destDatastore -DiskStorageFormat Thin -ErrorAction Stop



  • 5.  RE: PowerCLI cross vCenter vMotion fails

    Posted Jan 25, 2018 06:49 PM

    I found what was breaking it in my case.  It only works when I use the FQDN of the vcenter for my vCenter Server connection objects.

    This works when passed to the Move-VM cmdlet:

    $sourceVcenter= Connect-VIServer hostname.domain.com

    $destVcenter= Connect-VIServer hostname.domain.com

    This does not, and causes the 'Host Not Found (authoritative)' error when passed to the Move-VM cmdlet:

    $sourceVcenter= Connect-VIServerhostname

    $destVcenter= Connect-VIServer hostname

    I'm guessing FQDN is a requirement for operations between vCenter instances; i.e., x-vCenter vMotion.



  • 6.  RE: PowerCLI cross vCenter vMotion fails

    Posted May 14, 2019 02:53 PM

    ****THIS!!!****

    Thank you for posting!

    I spent most of my morning trying to figure out why my migrations were failing when all my previous uses of the tool had no problems.  Apparently today I chose to not type the FQDN where previously I had been without even thinking about it.