When ever you need to migrate to from one vCenter instance to another there are lots of things you need to migrate.
This PowerCLI script will help you migrate members from one DRS VM group to another. It can easily be modified to be part of a bigger context, or migrate all groups available.
The prerequisites are that you have both the new and the old vCenter running, and that you have disconnected you hosts in the old vCenter and connected them to the new one. Do NOT remove them from you old vCenter. Leave them disconnected.
The purpose of this script is to migrate from one vCenter to another when using dvSwitches. The dvSwitch is bound to vCenter, so in order to migrate hosts from one vCenter to another you can map the networks using this script. All you need to do is disconnect the host from the original vCenter with the VMs still running, but not remove it. Then you connect it to the new vCenter.
When upgrading to vSphere 7 or any other version, you might choose to create a brand new vCenter instead of migrating the old one. But what about folder structure, tags, distributed switches and so on.
Here I will demonstrate how you can easily migrate your tags from one vCenter to another using VMware PowerCLI.
Todays announcement of vRealize Automation 8.1 reveals the possibility to use Custom resources in vRA.
I am super exited about that ability. Those who know me, knows that I am a HUGE fan of vRO (vRealize Orchestrator) and the possibility to add anything as a resource in a vRA really opens the product to so many possibilities.
When upgrading from vRealize Automation 7.4 to 7.5 or other versions you might get the error:
Applying automatic fix for PowershellScriptExecution prerequisite failed
Pre-install: failed (code p-1)
There can be many reasons for this, but in my case it was a GPO that prohibited PowerShell from executing scripts. as referenced here: VMware
For you it might be something else. Tto figure out what the error was you can start of by looking in the logs, but there is actually much more information available in the original output which gets parsed, and then deleted.
Please be aware that the following is quite technical, and it is not very likely that you can use the fix demonstrated here out of the box, but I might give you a hint or two on how to troubleshoot your own issue.
Sometimes I find it easier to create a new vCenter server then migrate the old one, and it is a perfectly good solution in many cases.
But annoyingly there is a lot of manual work involved.
One problem is the VM’s and Templates folders. They do not follow the host, so you have to create the folder structure manually and move each VM into the correct folder. Well I am way to lazy to do that by hand, so it’s time to Automate!