vmware / dscr-for-vmware

The Repository contains Microsoft PowerShell Desired State Configuration (DSC) Resources for managing VC and ESXi settings.
Other
140 stars 41 forks source link

BUG in VDPortGroup #334

Open hunnj opened 2 years ago

hunnj commented 2 years ago

Describe the bug

There is a bug in VDPortGroup-Module. When you try to create a new Portgroup on a VDS via the config below, you will receive an error like the following one:

Config: VDPortGroup VDS_main_VLAN2_SAP { Server = $AllNodes.Server Credential = $AllNodes.Credential Name = 'VDS_main_VLAN2_SAP' VdsName = 'VDS_main' Ensure = 'Present' NumPorts = 0 Notes = 'MyVDPortGroup Notes' PortBinding = 'Static' VLanId = 2

DependsOn = '[VDSwitch]VDSwitch'

}

Error: Set method of VDPortGroup DSC Resource failed with the following error: Could not create distributed port group | VDS_main_VLAN2_SAP on distributed switch VDS_main. For more information: 05.10.2022 14:05:04 New-VDPortgroup The | operation for the entity "VDS_main" failed with the following message: "The spec.numPorts exceeds the limit 100.". | Cannot increase the number of ports according to the specification, because total number of ports 128 after increase | will then exceed 100, maximum number of ports allowed on vDS

The Issue seems to be related to the number of Ports the Portgroups should receive.

Reproduction steps

  1. Create a new VDS
  2. Create a new VDS-Portgroup
  3. Error appears ...

Expected behavior

From my point of view, the script should run with out any error, when the number of ports is less then 100.

Additional context

No response