Skip to content

Instantly share code, notes, and snippets.

@logic855
Forked from mattconnolly/gist:6097313
Created February 22, 2016 10:41
Show Gist options
  • Save logic855/5e04249dc7ed4392b402 to your computer and use it in GitHub Desktop.
Save logic855/5e04249dc7ed4392b402 to your computer and use it in GitHub Desktop.
Adding a zfs dataset to a SmartOS zone. Seems there's no vmadm api for this, but you can do it with zonecfg:
# vmadm halt <uuid>
# zonecfg -z <uuid>
zonecfg:uuid> add dataset
zonecfg:uuid:dataset> set name=<zfs/path>
zonecfg:uuid:dataset> end
zonecfg:uuid> commit
zonecfg:uuid> exit
# zfs set mountpoint=legacy <zfs/path>
# vmadm boot <uuid>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment