Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 251495

Re: Moving powered off VM to a different host with PowerCLI

$
0
0

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 oldHost

Remove-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 newHost

New-VM -VMHost $vmhost -VMFilePath $vmxFile.DatastoreFullPath
Disconnect-VIserver newHost -Confirm:$false


Viewing all articles
Browse latest Browse all 251495

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>