Forum Discussion

FLAVIO BORUP's avatar
FLAVIO BORUP
Copper Contributor
Feb 06, 2024

How to configure VMs to start incrementally? i.e., 15 seconds for first, 30 seconds for second...

How to configure VMs to start incrementally? i.e., 15 seconds for first, 30 seconds for second... 

 

The idea here:

I have more than 70 VMs in a single Hyper-V Host

 

So I would like to avoid starting all VMs all at once, once the system is restarted

A possible manual approach is to joing two things together, a PS script using the Set-VM –AutomaticStartDelay cmdlet, but also a "counter", setting, let´s say, a 15 seconds difference, between, VMs
At the end, this is what I want:

VM1 - Start in 15 seconds
VM2 - Start in 30 seconds
VM3 - Start in 45 seconds
VM2 - Start in 60 seconds
...

And so on

I found some very intersting examples on Internet, but all examples are forcing all VMs starting at the same time
Get-VM –VMname * | Set-VM –AutomaticStartAction Start

 

Get-VM –VMname * | Where-object –FilterScript {$_.vmname –notlike “tglab-dc*”} | Set-VM –AutomaticStartDelay 120

 


So, the ideia is to put an incremental time, for each VM processed


 

No RepliesBe the first to reply

Resources