VMNetworkAdapter: Multiple DNS IP adresses does not work (parameter type need to be changed) #190
Labels
bug
The issue is a bug.
good first issue
The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub
Hello, thanks for this code as it is very uncommon to have something functional for hyperv...
Details of the scenario you tried and the problem that is occurring
When you try to provide a table in the networkingsetting object it does not work as parameter of function is String and not Tab String (MSFT_xVMNetworkAdapter.psm1#L648 )
Verbose logs showing the problem
"module_version": "3.17.0.0",
"msg": "Failed to invoke DSC Set method: Incorrect function. ",
"reboot_required": false,
"verbose_set": [
"Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = ResourceSet,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.",
"An LCM method call arrived from computer HOST with user sid S-1-5-21-203002872-2615672331-1556995904-17199.",
"[LY-C3-HOST3]: LCM: [ Start Set ] [[xVMNetworkAdapter]DirectResourceAccess]",
"[LY-C3-HOST3]: [[xVMNetworkAdapter]DirectResourceAccess] Getting VM Network Adapter information.",
"[LY-C3-HOST3]: [[xVMNetworkAdapter]DirectResourceAccess] Adding VM Network Adapter.",
"[LY-C3-HOST3]: LCM: [ End Set ] [[xVMNetworkAdapter]DirectResourceAccess] in 1.7500 seconds.",
"Operation 'Invoke CimMethod' complete.",
"Time taken for configuration job to complete is 1.906 seconds"
Suggested solution to the issue
Change parameter type to "String[]"
The DSC configuration that is used to reproduce the issue (as detailed as possible)
"item": {
"NetworkSetting": {
"DefaultGateway": "172.99.0.1",
"DnsServer": "@("172.99.3.22", "172.993.2")",
"IpAddress": "172.99.3.16",
"Subnet": "255.255.0.0"
},
"name": "default",
"switchname": "test",
"vlanid": "15"
},
We also tried multiple setting :
"DnsServer": ["172.99.3.22", "172.99.3.2"],
"DnsServer": ("172.99.3.22", "172.99.3.2"),
"DnsServer": "172.99.3.22, 172.99.3.2",
The text was updated successfully, but these errors were encountered: