VMware Cloud Community
YanSi
Enthusiast
Enthusiast
Jump to solution

How to improve the speed of portgroup configuration ?

I use the following script to quickly create a port group

Measure-Command {1..9 | Foreach-Object `
{New-VDPortgroup -Name C01-A-FRONT-V200$_ -VDSwitch "C01-A-FRONT-VDS" -VlanId 200$_ -PortBinding Static -NumPorts 8 -RunAsync}}

But……PortGroups configuration is done one by one.

If I configure 100 PortGroups, it will take a long time to complete

Get-VDswitch -Name "C01-A-FRONT-VDS" | Get-VDPortgroup "C01-A-FRONT-V2*" | Get-VDUplinkTeamingPolicy | Set-VDUplinkTeamingPolicy -LoadBalancingPolicy ExplicitFailover

How can configuration settings be performed in parallel?

 

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Are you sure that a VDS itself can handle parallel tasks?
In fact, the New-VDPortgroup cmdlet needs to wait until the VDS itself signals the action is complete.
Seen that a VDS has to sync between multiple ESXi nodes, this will take time.

Additionally, all VDS actions need to use a ConfigVersion to avoid conflicting actions from different nodes.
How would that be done in a parallel setup?

I'm afraid that due to the nature of a VDS, parallelism in configuration actions is not possible.


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

View solution in original post

0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

Are you sure that a VDS itself can handle parallel tasks?
In fact, the New-VDPortgroup cmdlet needs to wait until the VDS itself signals the action is complete.
Seen that a VDS has to sync between multiple ESXi nodes, this will take time.

Additionally, all VDS actions need to use a ConfigVersion to avoid conflicting actions from different nodes.
How would that be done in a parallel setup?

I'm afraid that due to the nature of a VDS, parallelism in configuration actions is not possible.


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

0 Kudos
YanSi
Enthusiast
Enthusiast
Jump to solution

OK, I will wait patiently...... 😂

0 Kudos