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.
Murali SripadaCommented:
Connect vi-server vcenterfqdn
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.
Murali SripadaCommented:
Set-PowerCLIConfiguration -InvalidCertificateAction ignore -confirm:$false

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

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

Jitu SSystem EngineerCommented:

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"
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.
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

From novice to tech pro — start learning today.