Un-delegating a dataset from a zone

Published on 26th Dec, 2016 by David Young

Removing a ZFS dataset from a zone without deleting it:

[root@smartos ~]# zonecfg -z 6cc8231d-1fb7-ca13-ecbf-95c1ebdeaf69 info dataset
dataset:
    name: zones/backup
dataset:
    name: zones/users
[root@smartos ~]# zonecfg -z 6cc8231d-1fb7-ca13-ecbf-95c1ebdeaf69 
zonecfg:6cc8231d-1fb7-ca13-ecbf-95c1ebdeaf69> remove dataset name=zones/users
zonecfg:6cc8231d-1fb7-ca13-ecbf-95c1ebdeaf69> commit
zonecfg:6cc8231d-1fb7-ca13-ecbf-95c1ebdeaf69> exit
[root@smartos ~]# zonecfg -z 6cc8231d-1fb7-ca13-ecbf-95c1ebdeaf69 info dataset
dataset:
    name: zones/backup
[root@smartos ~]# zfs set zoned=off zones/users