I am in the process of build ESXi 5.0, and use a lot of PowerCLI to configure the host.
I have used to setup a reote syslog server
Set-VMHostSysLogServer -SysLogServer $SySLog -VMHost "$hostname"
$esxcli= Get-EsxCli
$esxcli.system.syslog.reload()
to apply a new remote syslog server, but I also need to set the following.
but I also need to configure the following.
make the syslog's appear in the Dir equal to the servername. This seems to be a 'True/False' option.
syslog.global.logDirUnique
make a local copy of the syslogs also on a vmfs datastore.
Syslog.global.logDir
can the $esxcli.system. contruct be used to apply these configurations
Afaik, you can use the Set-VMHostAdvancedConfiguration cmdlet to change those settings.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Afaik, you can use the Set-VMHostAdvancedConfiguration cmdlet to change those settings.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
doh, teach me to look to the simple methds first. Thanks
Hi ,
following works good for my esxi 5.0 hosts:
Get-VMHost myhost1.local | Get-VMHostFirewallException | where-object {$_.Name -eq "syslog"} | Set-VMHostFirewallException -Enabled:$true
Get-VMHost myhost1.local | Set-VMHostAdvancedConfiguration -Name Syslog.global.logDirUnique -Value $true
Get-VMHost myhost1.local | Set-VMHostSysLogServer -SysLogServer 10.x.x.x -SysLogServerPort 514
Regards,
Kopp
This thread has been incredibly helpful. Here I was trying to muck around in the ash shell doing stuff with the firewall when PowerCLI already had these cmdlets!!!
PowerCLI is a gift from heaven for vSphere admins
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference