Automation

 View Only
  • 1.  cross-vCenter migration error

    Posted Jul 12, 2022 06:15 PM

    I'm attempting my first cross-vCenter migration but getting the following error;

    PS C:\> $vm = Get-VM vmGuest -Server 'SourceVC'
    PS C:\> $vm | Move-VM -Destination (Get-VMHost 'DestHost' -Server 'DestVC') -NetworkAdapter (Get-NetworkAdapter $vm -Server 'SourceVC') -PortGroup (Get-VDPortgroup -VDSwitch 'dvSwitch' -Name 'VLAN1') -Datastore (Get-Datastore 'DS01' -Server 'DestVC')

    Move-VM : Move-VM Could not obtain the result of task '/VIServer=domain.com\admin@SourceVC:443/Task=Task-task-748415/'. Task name is 'RelocateVM_Task'. The following error occured:
    Unexpected error occured. Cannot convert type 'VirtualMachineFeatureRequirement' to 'Object'.
    At line:1 char:7
    + $vm | Move-VM -Destination (Get-VMHost 'DestHost' ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Move-VM], VimException
    + FullyQualifiedErrorId : ViCore_TaskCoreService_ConvertTaskResult_Failed,VMware.VimAutomation.ViCore.Cmdlets.Commands.MoveVM



  • 2.  RE: cross-vCenter migration error

    Posted Jul 12, 2022 06:26 PM

    Which PowerCLI version are you using?
    And which PowerShell version?

    Is there a reason why you did not use the Server parameter on the Portgroup parameter value?



  • 3.  RE: cross-vCenter migration error

    Posted Jul 12, 2022 06:46 PM

    Get-PowerCLIVersion is showing VMware PowerCLI 12.0.0 build 15947286 and $PSVersionTable is showing 5.1.14393.5127.

    Good catch on the missing server parameter for my Portgroup - I added that in but still got the same error. 



  • 4.  RE: cross-vCenter migration error

    Posted Jul 12, 2022 06:50 PM

    As the next step, I would suggest upgrading your PowerCLI version.

    Which vSphere version is this running against?
    Source and destination VCSA



  • 5.  RE: cross-vCenter migration error
    Best Answer

    Broadcom Employee
    Posted Jul 13, 2022 12:51 PM

    It looks like an error reporting issue, but from "Cannot convert type 'VirtualMachineFeatureRequirement' to 'Object'." I would say that it's likely that the migration fails due to some hardware features that are required on the target host and are not matched. Are you migrating a powered on or powered off VM?



  • 6.  RE: cross-vCenter migration error

    Posted Jul 13, 2022 04:26 PM

    You are correct - after looking at the logs I learned that the version of the destination vDswitch is older than the source version.