ESXI CLI

Activate SNMP on VSphere client
Configuration -> Security Profile -> Firewall -> Properties -> SNMP


Connect to ESXI using SSH and run the command below, changing community, contact email and location:

esxcli system snmp set -r && esxcli system snmp set -c public && esxcli system snmp set -p 161 && esxcli system snmp set -C contact@domain.com && esxcli system snmp set -L "City, State" && esxcli system snmp set -e yes


#firewall all hosts
esxcli network firewall ruleset set --ruleset-id snmp --allowed-all true
esxcli network firewall ruleset set --ruleset-id snmp --enabled true
#firewall for specific network
esxcli network firewall ruleset set --ruleset-id snmp --allowed-all false
esxcli network firewall ruleset allowedip add --ruleset-id snmp --ip-address 10.20.0.0.0/23
esxcli network firewall ruleset set --ruleset-id snmp --enabled true
#restart snmp
/etc/init.d/snmpd restart 



Set time:
esxcli system time set -d 31 -M 1 -y 2012 -H 18 -m 0 -s 0

source: https://kb.vmware.com/s/article/1003736


View log in browser:

https://server_ip_or_name/host/syslog.log





Create pem certificate

 Creating a .pem with the Private Key and Entire Trust Chain     Log into your DigiCert Management Console and download your Intermediate (D...

Mais vistos