VMwareUser22011
Contributor
Contributor

Duplicate vSphere inventory

Jump to solution

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.

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

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

View solution in original post

0 Kudos
5 Replies
LucD
Leadership
Leadership

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

sparrowangelste
Virtuoso
Virtuoso

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

--------------------- Sparrowangelstechnology : Vmware lover http://sparrowangelstechnology.blogspot.com
0 Kudos
VMwareUser22011
Contributor
Contributor

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? 

0 Kudos
LucD
Leadership
Leadership

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

View solution in original post

0 Kudos
VMwareUser22011
Contributor
Contributor

Thanks Luc .. Looks like I am in the right direction!

Thanks again.

0 Kudos