VMware Cloud Community
enjoyvin
Contributor
Contributor

PowerCLI Script to put the datastores from a SDRS Cluster in maintenance mode

Hello,

Looking for a script that would put a set of datastores (one at a time) from a SDRS cluster into maintenance mode and continue until list is complete. Once complete it should display the status of the datastores which are into maintenance mode.

@LucD 

 

 

Reply
0 Kudos
8 Replies
LucD
Leadership
Leadership

Any hidden requirements or limitations that you fail to mention?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
enjoyvin
Contributor
Contributor

Not in this case sir 🙂

Reply
0 Kudos
LucD
Leadership
Leadership

Are there any powered on VMs on any of the datastores in that SDRS cluster?
In other words, do any VMs need to be live migrated?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
enjoyvin
Contributor
Contributor

Yes. All the datastores has powered on and powered off VM's. Some has Templates too.

Reply
0 Kudos
LucD
Leadership
Leadership

But in that case you can not place all the datastores in the SDRS cluster in maintenance mode.
Which you seem to ask for

... put a set of datastores (one at a time) from a SDRS cluster into maintenance mode and continue until list is complete. Once complete it should display the status of the datastores which are into maintenance mode.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
enjoyvin
Contributor
Contributor

Hi @LucD ,

Can we define set of datastores(eg. 3 datastores from the cluster of 10 datastores) in the script and put only those 3 in maintenance mode by migrating all the VM's off it?

Reply
0 Kudos
LucD
Leadership
Leadership

Yes, we can.
But this starts to feel again like the other thread where the requirements are made as we go.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
mujampathan
Contributor
Contributor

Reopening this thread as I did not found any update on this.

I've got a kind of similar requirement, let me try to explain my requirements:

- The storage team is migrating all the workload from one array to another array.

- We've got multiple storage clusters and I'm looking for some kind of automation in which, once we add the datastores from new arrays to the existing datastore cluster, it should

  1. Migrate all the VM's (powered ON and OFF) along with the templates from the old datastores to the new datastores
  2. Put the old datastores into maintenance mode and move on to the second old datastore in the list
  3. Once all the old datastores are in maintenance mode, it should unmount those datastores.

@LucD 

Reply
0 Kudos