Cold Vmotion Script

Hi All,

Do we have any script for cold migration of multiple vm from one cluster to another.
Techie solutionVMware SpecialistAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Techie solutionVMware SpecialistAuthor Commented:
How can I connect to the server via cli also please guide from basic commands. I never performed it.
0
Murali SripadaCommented:
Connect vi-server vcenterfqdn
0
Powerful Yet Easy-to-Use Network Monitoring

Identify excessive bandwidth utilization or unexpected application traffic with SolarWinds Bandwidth Analyzer Pack.

Techie solutionVMware SpecialistAuthor Commented:
Error: Invalid server certificate. Use Set-powerCLIConfigurationto set the value for the InvalidCertification option prompt.
0
Murali SripadaCommented:
Set-PowerCLIConfiguration -InvalidCertificateAction ignore -confirm:$false
https://be-virtual.net/powercli-10-0-0-error-invalid-server-certificate/
http://www.pragmaticio.com/2015/01/vmware-powercli-suppress-vcenter-certificate-warnings/

You can set them to ignore and then connect through vi-server again
0
Techie solutionVMware SpecialistAuthor Commented:
Used below command

Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -ParticipateInCEIP $true
0
Murali SripadaCommented:
Before you try the steps in production, i request you to try in a lab setup environment and test the scripts..

Thanks,
MS
0
Jitu SSystem EngineerCommented:
Hi,

You can use below code to migrate multiple virtual machines at a time. You mentioned cold VMotion so I included a line to turn off the virtual machine gracefully and then migrate them to the destination. Please let me know if this helps.

$Servers = Get-Content "C:\temp\Servers.txt"
Foreach ($server in $servers)
{
Shutdown-VMguest $server -Confirm:$false
Write-Host -Foregroundcolorcolor Green "Virtual Machine Powered off"
Move-VM $server -Destination "Destination ESX IP or FQDN"
Write-Host -Foregroudcolorcolor Green "Virtual Machine Migrated to Destination"
}
0
Techie solutionVMware SpecialistAuthor Commented:
I am still fetching help on this.
Though it helped with few knowledge but script is throwing error as I need to change both source network and Datastore.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Virtualization

From novice to tech pro — start learning today.