Hello CLIers,
Recently wrote a migration script for moving from vcenter 4.0 to vcenter 5.0. (Contains pieces of many scripts I have found across the internet + some knowledge I have learned)
Rather than just perform the upgade we wanted to have clean slate, so we decided to script the migration activity.
Here is the what it does:
Starts a UI
Connects to vcenters you define
Generates datacenters available to migrate(selection list)
Generates clusters to migrate (selection list)
Begins Migration:
Copies Folders
VM locations
Roles and permissions
Creates cluster in Datacenter (datacenter object needs to already exist in 5.0)
Imports hosts
Sets Cluster settings Defined in XML document
Imports VM folders
Sets VM in locations
Imports Roels and permissions
Opens folder to show you what was exported.
Thats it!
How to run it:
Place all three of these files in a folder together.
In Powershell script, insert vCenter authentication and Host authentication (first 4 lines or so)
Run the Batch script.
NOTE: the UI progress bar doesnt want to work because of windows forms and single threading, so don't depend on it.
Thanks for everyones help and happy migrations!
-JKB5054
Great script, thanks for sharing.
Why don't you place it in the Documents section of the PowerCLI Community ?
It will be easier to find in there imho.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference