I am having trouble moving my vCenter VM to a new ESXi host.
(VMotion is currently unabailable)
Old Host 192.168.1.6
New Host 192.168.1.9
Version 5.1.0 Build 914609
The Move-VM cmdlet uses vMotion. So if you have powered off the vCenter server, then you can not use the Move-VM cmdlet to move it.
You could unregister the vCenter server from the old host and register it again on the new host.
Something like:
Connect-VIserver oldHostRemove-VM -VM vCenter -Confirm:$false
Disconnect-VIserver oldHost -Confirm:$false
Connect-VIserver newHost
cd vmstores:\newHost@443\Datacenter\Storage1\vCenter\
$vmxFile = Get-Item vCenter.vmx
$vmhost = Get-VMHost -Name newHostNew-VM -VMHost $vmhost -VMFilePath $vmxFile.DatastoreFullPath
Disconnect-VIserver newHost -Confirm:$false
I moved your question from VMware ESXi 5 to VMware vSphere™ PowerCLI.
You should specify the name with wich the host is known in the vCenter server. Something like:
Get-VM -Name vCenter | Move-VM -Destination (Get-VMHost -Name NewHost,yourdomain.com)
Thanks for responding. Unfortunately I received the same message.
The VM I need to move, vCenter, is powered off.
vMotion is currently unavailable becase I have two hosts that are currently running on very different hardware.
We are replacing both hosts which will be identical but I can't shut the old host down until I migrate all the VMs off of it.
Connect-VIServer 192.168.1.6
Name Port User
---- ---- ----
192.168.1.6 443 root
Get-VM -Name vCenter | Move-VM -Destination vHost2.internal.housingnm.org
Move-VM : 12/29/2012 12:14:10 PM Move-VM Could not find VIContainer with name 'vHost2.internal.housingnm.org'.
The Move-VM cmdlet uses vMotion. So if you have powered off the vCenter server, then you can not use the Move-VM cmdlet to move it.
You could unregister the vCenter server from the old host and register it again on the new host.
Something like:
Connect-VIserver oldHostRemove-VM -VM vCenter -Confirm:$false
Disconnect-VIserver oldHost -Confirm:$false
Connect-VIserver newHost
cd vmstores:\newHost@443\Datacenter\Storage1\vCenter\
$vmxFile = Get-Item vCenter.vmx
$vmhost = Get-VMHost -Name newHostNew-VM -VMHost $vmhost -VMFilePath $vmxFile.DatastoreFullPath
Disconnect-VIserver newHost -Confirm:$false