Hi All,
How do I add a simple DNS suffix such as a wildcard "*.ldn" or even "ldn" to custom dns suffixes?
I can add suffixes such as "mydomain.local" etc but not ldn on its own I have to manually add the search suffix for it to accept ldn
set-vmhostnetwork $vmHostNetworkInfo -hostname $esxhostname -SearchDomain "mydomain.local","MYDOMAIN.LOCAL","ldn"
is there a way to do this
Did some further tests, and this is not allowed via the vSPhere CLient nor the Web Client either.
That it works from the DCUI, seems to be because the API method doesn't seem to do any checking.
In fact, this is accepted, but I'm not convinced it is a valid configuration, and if it will do what you assume it to do.
$esxName = 'MyEsx'
$esx = Get-VMHost -Name $esxName
$netSys = Get-View -Id $esx.ExtensionData.ConfigManager.NetworkSystem
$spec = New-Object VMware.Vim.HostDnsConfig
$spec.SearchDomain = 'full.domain.com','*test'
$spec.Dhcp = $esx.ExtensionData.Config.Network.DnsConfig.Dhcp
$spec.DomainName = $esx.ExtensionData.Config.Network.DnsConfig.DomainName
$spec.HostName = $esx.ExtensionData.Config.Network.DnsConfig.Hostname
$netSys.UpdateDnsConfig($spec)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Did you try placing the string between single quotes?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yeah tried that, it doesn't like it either yet it doesn't complain when I enter direct via dcui
Did some further tests, and this is not allowed via the vSPhere CLient nor the Web Client either.
That it works from the DCUI, seems to be because the API method doesn't seem to do any checking.
In fact, this is accepted, but I'm not convinced it is a valid configuration, and if it will do what you assume it to do.
$esxName = 'MyEsx'
$esx = Get-VMHost -Name $esxName
$netSys = Get-View -Id $esx.ExtensionData.ConfigManager.NetworkSystem
$spec = New-Object VMware.Vim.HostDnsConfig
$spec.SearchDomain = 'full.domain.com','*test'
$spec.Dhcp = $esx.ExtensionData.Config.Network.DnsConfig.Dhcp
$spec.DomainName = $esx.ExtensionData.Config.Network.DnsConfig.DomainName
$spec.HostName = $esx.ExtensionData.Config.Network.DnsConfig.Hostname
$netSys.UpdateDnsConfig($spec)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks once again LucD, evrything works I tested it this morning and it does append the "test" suffix and does resolve hostnames in that domain, without it it fails.
Gracias