Hello people,
I have a query regarding how to duplicate/reproduce my vsphere inventory. For example if I have a VC A which consists of a certain hierarchy, and if I want to traverse it and reproduce the same on a different VC B, how will I do it? Please help.
Thanks.
There are several scripts around to migrate a structure from one vCenter to another.
Some links:
These scripts will probably need some local addaptations to cope with the specifics of your vCenter layout, but they should give you a good start.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Have a look at my Get the folderpath post.
The function in there exports your folder structure from a vCenter.
In the comments there is a skeleton script to import this folder structure and recreate it on another vCenter
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
if you mean you want to recreate the folder heirarchy,
get-folder and new-folder will get you started
both powercli commands.
edit: looks like lucd got there first. you are in good hands
Thanks Luc for your help.
But what I am looking for not only the folders but to re create the same inventory ( DC-cluster-host-VMs) from one VC to another. How can I recreate at the same time while I am traversing the first one?
There are several scripts around to migrate a structure from one vCenter to another.
Some links:
These scripts will probably need some local addaptations to cope with the specifics of your vCenter layout, but they should give you a good start.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks Luc .. Looks like I am in the right direction!
Thanks again.