VMware {code} Community
ummak
Contributor
Contributor

Need help with Copying nested Resource Pools

I have one cluster now that has a complex resource pool configuration with many sub-pools. I've been trying to use the Perl VI SDK to somehow copy the resourcepool structure and settings from one cluster to another. Or even export it and imports it to another cluster.

Soming like: copyResource.pl SourceClusterName DestinationClusterName

Any thoughts/ideas?

Reply
0 Kudos
4 Replies
hrobinson
VMware Employee
VMware Employee

So, how would this work:

a) Would the cluster be on the same VC or a different one?

b) What should the tool do with regards to hosts on these resource pools. Ignore them?

c) Same question with VMs?

Reply
0 Kudos
ummak
Contributor
Contributor

Yes they will be on the same VIRTUAL CENTER server.

All hosts in a cluster will be part of the new resource pool.

No VMs on new cluster or pool, assume its a new cluster. All VMs will inherit from parent pool.

It takes me about 3-4 hours to create all my resource pools eveytime I add a new cluster. It looks something like this:

Cluster 1

-GlobalPool (my root pool)

--Department1 (this has 15 nested subpools)

--Department2 (this has 15 nested subpools)

--Department3 (this has 15 nested subpools)

.

.

.

--Department10 (this has 15 nested subpools)

Cluster 2

-GlobalPool (my root pool)

--Department1 (this has 15 nested subpools)

--Department2 (this has 15 nested subpools)

--Department3 (this has 15 nested subpools)

.

.

.

--Department10 (this has 15 nested subpools)

Reply
0 Kudos
tschoergez
Leadership
Leadership

Is your problem still remaining?

I would use the viperltoolkit. gor through the whole hierachy-tree of the source cluster, find all the resource pools and safe their data in a perl array for example.

then you can go to the new cluster and read the data from the array to create the new ressource pools. of course you cant use the original morefs, so you have to find some other "key-relations" between child and parent-resource pool in your array.

kind regards,

joerg

Reply
0 Kudos
jlindsayRIT
Contributor
Contributor

I know this is a very old question but in case anyone else looking for the same thing stumbles here, this very talented person has a powershell script for exactly this:  https://communities.vmware.com/docs/DOC-8400

Reply
0 Kudos