Hi All,
I'm pretty new to vRO/vCO and I'm looking to build some workflows to configure ESXi, I managed to figure out hot to set the NTP server and restart the service but struggling to work out how to set DNS server addresses, any help guidance would be appreciated.
Hi,
try this:
var host; // your initialized VcHostSystem object!
var hostDnsConfig = host.config.network.dnsConfig; // get current config
// TODO: change hostDnsConfig to your needs -> e.g. hostDnsConfig.address[]
host.configManager.networkSystem.updateDnsConfig(hostDnsConfig);
Regards,
Lukas
Hi,
try this:
var host; // your initialized VcHostSystem object!
var hostDnsConfig = host.config.network.dnsConfig; // get current config
// TODO: change hostDnsConfig to your needs -> e.g. hostDnsConfig.address[]
host.configManager.networkSystem.updateDnsConfig(hostDnsConfig);
Regards,
Lukas
Thank you, this worked, I actually it 95%, my issue was the address was not set to string/array.