Created
July 19, 2014 01:35
-
-
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#
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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