Hey all..
With a VM powered off, I'm trying to migrate a VM between datacenters within the same vCenter. There's no shared storage, different networks at the destination host. The GUI works (shows warning about missing network at destination), yet move-vm doesn't work between datacenters.
Trying: move-vm -vm test-20150309 -destination esx1 -datastore datastore1, I get the error:
move-vm : 3/9/2015 2:48:20 PM Move-VM Destination container must be in the same Datacenter.
At line:1 char:1
+ move-vm -vm test-20150309 -destination esx1. ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (esx1:VMHostImpl) [Move-VM], VimException
+ FullyQualifiedErrorId : Client20_VmHostServiceImpl_CheckMoveVmParameters_InvalidDatacenter,VMware.VimAutomation.
ViCore.Cmdlets.Commands.MoveVM
The manual states -Destination can be folder,host,cluster etc.. Since hosts AND folders are bound by datacenters, I'm guessing it needs to know the new host & new folder. I've tried to use -destination twice, and I've tried -destination host,folder.
Move-VM : Cannot bind parameter because parameter 'Destination' is specified more than once. To provide multiple values to parameters that can accept multiple values, use the array syntax. For example, "-parameter value1,value2,value3".
Move-VM : Missing an argument for parameter 'Destination'. Specify a parameter of type 'VMware.VimAutomation.ViCore.Types.V1.Inventory.VIContainer' and try again.
I'm using PowerCLI 5.8, and tried on vCenter 5.0 and 4.0.
move-vm : 3/9/2015 2:48:20 PM Move-VM Destination container must be in the same Datacenter.
At line:1 char:1
+ move-vm -vm test-20150309 -destination esx1. ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (esx1:VMHostImpl) [Move-VM], VimException
+ FullyQualifiedErrorId : Client20_VmHostServiceImpl_CheckMoveVmParameters_InvalidDatacenter,VMware.VimAutomation.
ViCore.Cmdlets.Commands.MoveVM