A_S
Enthusiast
Enthusiast

It's working!:smileycool:

But it seems that my inventory script (or my approach to get this data) has to be redesigned. I need somehow faster inventory results (nightly scheduled) from customers infra (> 10 VCs, >2 DCs, >100 CLSs, > 600 hosts, > 1000 datastores, >10.000 VMs) and dump them into SQL DB.

The downside: If one of VCs is having problems then the script stops responding.

Every time i contruct something i take the following into consideration

Method 1: Loop through an array of Virtual Centers, one at a time

$VCs= @(“vc_server1”,“vc_server2”)
Foreach ($VC in $VCs) { `
Connect-viserver $VC
.script...
Disconnect-VIServer $VC –confirm:$false
}

Method 2: Connect to an array of Virtual Centers, all at the same time (trying to achieve with script)

# Set PowerCLI to MultipleMode
Set-PowerCLIConfiguration -DefaultVIServerMode Multiple -Confirm:$false
connect-VIServer -Server “vc_server1”,“vc_server2”
.script...
Disconnect-VIServer * –confirm:$false

Its seems that i have to go for the third method (because both previous approaches take about 5 hours to get the needed info). Method 2 affects all get-view commands.

Method 3: Trigger every VC at certain scheduled time, let the Powercli script run locally against 'own' VC and dump the results to central SQL DB.  i tested and within 1-1,5 hour the results are retrieved. But it's not 'agentless' data collection.

I didn't test it with (4th method) powershell multithreaded option (Add-job). Would that be an alternative for 'agentless data collection' approach?

Anyhow i will (try to) combine this script with additional stuff from your article: http://www.lucd.info/2011/11/14/storage-views-datastores/

in order to get additional info per datastore: [Size_Snapshot]  ,[Size_vDisk]  ,[Size_Swap] ,[Size_Other] ,[Size_Shared] ,[Multipathing] ,[ConnectivityStatus]. That would make the output complete for different internal usage purposes. The Storage CapMan want's to have it very fast. For me a huge challenge to combine it without degrading in execution time.

Thank you for your help! You're my (and my friend's) Hero!

Reply
0 Kudos