Skip to content

Instantly share code, notes, and snippets.

@hijak
Last active December 27, 2015 02:09
Show Gist options
  • Save hijak/7250750 to your computer and use it in GitHub Desktop.
Save hijak/7250750 to your computer and use it in GitHub Desktop.
ESXi 5.1 QC commands
###Displays current hostname
hostname
###shows order or nics should display I350 gigbit nics as first as these are the onboard ports (r720)
esxcfg-nics -l
###Shows IP addresses for management interfaces and vMotion
esxcfg-vmknic -l | grep IPv4
###ExNet management gateway (public gateway)
esxcfg-route
###VMNet Gateway
esxcfg-route -l | grep vmk1
###VMNet dns servers
cat /etc/resolv.conf
###Change IP on interface
esxcli network ip interface ipv4 set -i vmk1 -I 10.27.51.143 -N 255.255.255.0 -t static
###Change gateway
esxcfg-route 192.168.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment