vmware / dscr-for-vmware

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

New Resource: Ability to update the existing VMkernel NIC (vmk*) interface #312

Closed jatinpurohit92 closed 3 years ago

jatinpurohit92 commented 3 years ago

Use Case:

We may need to have 2 mandatory properties vmk name and Portgroup Name to identify the correct Interface, For ex.

Get-VMHost |Select -First 1 |Get-VMHostNetworkAdapter |Where-Object -FilterScript { $_.PortGroupName -eq 'Management Network'}

dmilov commented 3 years ago

VMHostVssNic resource can be used for the purpose of updating existing VMKernelAdapter. The resource doesn't have a Nic Name parameter because the value is controlled by the VC. The resource relies on the fact there could be only one VMKernalAdapter in a PortGroup. So, the port group name identifies uniquely the VMKernel adapter and if such exists the resource updates its setting.

We realize the documentation doesn't clearly state that and probably leads to the confusion the Resource can only be used to add or remove an adapter. Example2 demonstrates updating an existing VMKernalNic settings.

I'm going to update the description of the resource in the docuymentation.

dmilov commented 3 years ago

Updated the description of the resource in the documentation.