Skip to content

Instantly share code, notes, and snippets.

@jasonpincin
Last active December 12, 2015 12:28
Show Gist options
  • Save jasonpincin/4771721 to your computer and use it in GitHub Desktop.
Save jasonpincin/4771721 to your computer and use it in GitHub Desktop.
Get UUID of a SmartOS VM given it's alias
#!/usr/bin/sh
#
# Given a SmartOS VM alias, returns the UUID.
#
# Usage:
#
# vmid <alias>
#
# vmadm get `vmid <alias>`
#
# <alias> must be an exact match.
vmadm lookup alias=$1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment