DscWorkshop icon indicating copy to clipboard operation
DscWorkshop copied to clipboard

`NetworkIpConfiguration` - Not creating MOF Config

Open dan-hughes opened this issue 1 year ago • 4 comments

Problem description

When using the NetworkIpConfiguration composite, it does not create the configuration in the MOF files.

I'm assuming the InterfaceAlias is supposed to have a - and be at the top of the list, which then would generate RSOP below

NetworkIpConfiguration:
  Interfaces:
    DisableNetbios: True                                                                        AllNodes\Dev\DSCFile01
    IpAddress: 192.168.111.100                                                                  AllNodes\Dev\DSCFile01
    DnsServer: 192.168.111.10                                                                   AllNodes\Dev\DSCFile01
    Prefix: 24                                                                                  AllNodes\Dev\DSCFile01
    Gateway: 192.168.111.50                                                                     AllNodes\Dev\DSCFile01
    InterfaceAlias: DscWorkshop 0

Verbose logs

No errors in logs/output.

DSC configuration

No changes from clone of DscWorkshop repo.

Suggested solution

No. But if I understand correctly this is more of a Datum issue as the RSOP is incorrect?

Operating system the target node is running

OsName               : Microsoft Windows 11 Business
OsOperatingSystemSKU : 48
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 22621.1.amd64fre.ni_release.220506-1250
OsLanguage           : en-GB
OsMuiLanguages       : {en-GB, en-US}

PowerShell version and build the target node is running

PSVersion                      7.4.2
PSEdition                      Core
GitCommitId                    7.4.2
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

CommonTasks2 version

Using DscConfig.Demo 0.8.3

dan-hughes avatar May 09 '24 16:05 dan-hughes

Hey, do you have NetworkIPConfiguration somewhere in the Configrations in e.g a Baseline or Role?

Like: Configurations:

  • SecurityBase
  • WindowsFeatures
  • NetworkIPConfiguration

We had a similar error where it wasn´t in the MOF because of it missing somewhere in the Confirations config.

nikq29 avatar Sep 22 '24 12:09 nikq29

For me, I just cloned and built. This was a while ago, I'll revisit in the week. I'll check your recommendation though.

dan-hughes avatar Sep 22 '24 14:09 dan-hughes

@nikq29,

I just revisited this and I think the issue was with the datum config for NetworkIpConfiguration. I got it working by changing it to:

  NetworkIpConfiguration:
    merge_hash: deep
  NetworkIpConfiguration\Interfaces:
    merge_basetype_array: UniqueKeyValTuples
    merge_hash_array: DeepTuple
    merge_options:
      tuple_keys:
        - InterfaceAlias

I changed merge_basetype_array: from what was in the Datum.yml.

I'll have a play around when I use this for a future project and see if it is working as intended.

dan-hughes avatar Sep 26 '24 14:09 dan-hughes

I have just done a build and it works fine. In the configuration data (source folder) the NetworkIpConfiguration\Interfaces is an array, in the RSOP it is not an array, but that shouldn't matter.

But I would like to simplify the configuration data or make it more efficient. The server baseline should contain all interface settings and only the IP address should be configured on node level.

raandree avatar Oct 17 '24 15:10 raandree