VMware Cloud Community
AnonAdmin
Enthusiast
Enthusiast
Jump to solution

cross-vCenter migration error

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

0 Kudos
1 Solution

Accepted Solutions
knikolov
VMware Employee
VMware Employee
Jump to solution

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?

View solution in original post

0 Kudos
5 Replies
LucD
Leadership
Leadership
Jump to solution

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?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
AnonAdmin
Enthusiast
Enthusiast
Jump to solution

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. 

0 Kudos
LucD
Leadership
Leadership
Jump to solution

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

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


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
knikolov
VMware Employee
VMware Employee
Jump to solution

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?

0 Kudos
AnonAdmin
Enthusiast
Enthusiast
Jump to solution

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

0 Kudos