VMware Cloud Community
rgoto
Hot Shot
Hot Shot

Move-VM

I was attempting to vMotion VM Win-9 from sa-esxi-03,vclass.local to sa-esxi-01.vclass.local.  I tried to use Move-VM and specified the VM and the Destination in the following way:

Move-VM -VM Win-9 -Destination sa-esxi-01.vclass.local

If you look at the attached graphic, you will see the error indication I received.  I cannot find what I did wrong.  I had previously done a Connect-VIServer to add my vCenter Server.  I then executed a Get-VMHost and all the hosts were listed as expected.  I executed a Get-VM and a list of all the VMs was shown as expected.

Oh, I had also previously vMotion'd the same VM from sa-esxi-03,vclass.local to sa-esxi-01.vclass.local through the vSphere Client without incident.  So I know it works just fine.

vCetner Server Appliance 6.70 Build 8170161

ESXi 6.7.0 Build 8169922

PowerCLI 6.5 Release 1 Build 4624819

Can someone please point me in the right direction?

0 Kudos
1 Reply
LucD
Leadership
Leadership

Why are you still using that old PowerCLI version?

I would advise to go for the latest version from the PSGallery.

See Welcome PowerCLI to the PowerShell Gallery – Install Process Updates

I saw a similar error, and it was caused by a faulty PowerCLI installation.

See Get-VM Exception has been thrown by the target of an invocation.


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

0 Kudos