Skip to content

Instantly share code, notes, and snippets.

@sax
Created July 19, 2014 01:35
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save sax/061f95d3c159b1a7a315 to your computer and use it in GitHub Desktop.
Add nictag to SmartOS global zone and use it to add interface to local zone#
# global zone
MAC_ADDRESS=$(dladm show-phys -m e1000g1 | tail +2 | awk '{ print $3 }')
ZONENAME=$(zoneadm list | grep -v global)
nictagadm add external "${MAC_ADDRESS}"
echo '{"add_nics":[{"nic_tag":"external","ip":"dhcp"}]}' | vmadm update ${ZONENAME}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment