The engine creates three resource configurations, but they all share a shallow copy of the same ssh protocol reference. Since it’s a shallow copy, changes like setting the hostname in one configuration will affect all other configurations. This leads to all hosts incorrectly sharing the same hostname.
Proposal
To resolve this issue, a deep copy of the protocol configuration should be created for each host. This will ensure that each host has an independent IConfiguration (ssh, wbem, wmi, http, snmp, snmpv3, winrm, oscommand, ping configurations), avoiding unintended overwriting of shared attributes like hostname.
Problem
When configuring multiple hosts with the same protocol configuration as shown below:
The engine creates three resource configurations, but they all share a shallow copy of the same
ssh
protocol reference. Since it’s a shallow copy, changes like setting thehostname
in one configuration will affect all other configurations. This leads to all hosts incorrectly sharing the samehostname
.Proposal
To resolve this issue, a deep copy of the protocol configuration should be created for each host. This will ensure that each host has an independent
IConfiguration
(ssh, wbem, wmi, http, snmp, snmpv3, winrm, oscommand, ping configurations), avoiding unintended overwriting of shared attributes likehostname
.