Closed mikedonleyuoy closed 3 years ago
OK, I think there are two issues here.
VMHostVssBridge "VMHostVSSBridge_$Server" {
Name = $Server
Server = $Server
Credential = $Credential
Ensure = 'Present'
VssName = 'vSwitch0'
NicDevice = @('vmnic0', 'vmnic1')
}
A possible fix, might be to throw an error if one or more nics referenced in the VMHostVssTeaming aren't in the bridge, in the way that we already throw if the vssbridge contains no nics?
ActiveNic = @('vmnic0','vmnic1')
, this fails because the standby nic is sent to the host in both the active list and standby list. This can be see from the hostd.log file on the esxi host.--> nicOrder = (vim.host.NetworkPolicy.NicOrderPolicy) {
--> activeNic = (string) [
--> "vmnic0",
--> "vmnic1"
--> ],
--> standbyNic = (string) [
--> "vmnic1"
--> ]
--> }
This suggests a problem on these lines in VMware.vSphereDSC.Helper.psm1
if (![string]::IsNullOrEmpty($VssTeamingConfig.ActiveNic)) { $hostVirtualSwitchConfig.Spec.Policy.NicTeaming.NicOrder.ActiveNic = $VssTeamingConfig.ActiveNic }
if (![string]::IsNullOrEmpty($VssTeamingConfig.StandbyNic)) { $hostVirtualSwitchConfig.Spec.Policy.NicTeaming.NicOrder.StandbyNic = $VssTeamingConfig.StandbyNic }
The bug was fixed with PR #296, so the update of the teaming policy of the standard switch should work as expected with the latest version of the module.
When applying VMHostVssTeaming config, the following error is produced when applying DSC config using Start-DSCConfiguration
DSC config is as detailed in https://github.com/vmware/dscr-for-vmware/blob/master/Examples/Vss_Config.ps1, or example on https://github.com/vmware/dscr-for-vmware/wiki/VMHostVssTeaming with changes for vmnic names for my local config.
Problem appears to occur when executing the 'modify' operation against the ESXi host on this line in VMware-vSphereDSC.Helper.psm1
$NetworkSystem.UpdateNetworkConfig($configNet, [VMware.Vim.HostConfigChangeMode]::modify)
It appears that the config in $configNet is invalid, though I've not figured out why.
Tested against current repo and v2.1.0.58. ESXi 6.7.0 build 16713306.