How to force a reconfiguration on SmartOS

From time to time we would like to be able to force SmartOS hypervisor to reconfigure again without deleting the complete HardDisk.

It is simple. Just create the following ZFS property in the zones/var dataset: smartdc:factoryreset=yes. Then reboot the SmartOS machine.

If you are curious, check the details in the file /lib/svc/method/fs-joyent. The relevant lines are:

# A machine is reset to its original unsetup state (i.e. a 'factory reset')
# when the smartdc:factoryreset ZFS user property is set on the var dataset.
reset=$(zfs get -H -o value smartdc:factoryreset ${SYS_ZPOOL}/var)
if [ "${reset}" == "yes" ]; then
    destroy_zpools
fi