Skip to content

Instantly share code, notes, and snippets.

@cmacrae
Last active August 29, 2015 14:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmacrae/ecac871a9439b0fa006d to your computer and use it in GitHub Desktop.
Save cmacrae/ecac871a9439b0fa006d to your computer and use it in GitHub Desktop.
Bash function to log into SmarOS zones using their alias. Put it in your .bashrc on in the global zone to use `alogin zonename`
alogin() {
local VM=$1
local ZONE=$(vmadm lookup alias=${VM})
/usr/sbin/zlogin $ZONE
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment