"Batch" Right size recommendation?



I’ve been asked if it was possible to run right size recommendation against a bunch of VMs at once and get the result as, say, a report later, rather than going into the detail screen of each VM and getting a recommendation one at a time from there.

My answer is that you can’t, but am I correct?



$evm.vmdb(:vm).find_in_batches(batch_size: 100, start: 20).map &:count  
=> [100, 100, 100, 100, 100, 38]

This is the way to do it. But right size is very dependent on your use case - hardware resources and computational complexity.