Solaris 11: Zone Boot environment selection
Tested on Solaris 11.1, specifically [email protected]
I couldn't find this documented anywhere, so here's what I found.
How do solaris 11 zones determine which boot environment to use? Seems they use ZFS properties.
On my test zone, I have:
root@myhostname:/etc# beadm list
BE Active Mountpoint Space Policy Created
-- ------ ---------- ----- ------ ------- solaris N / 488.90M static 2013-02-20 15:45
solaris-z R - 60.0K static 2013-02-21 10:15
And here are the ZFS properties:
root@myhostname:/etc# zfs get -r -d 1 -o name,value,source org.opensolaris.libbe:active rpool/ROOT
NAME VALUE SOURCE
rpool/ROOT - -
rpool/ROOT/solaris off local
rpool/ROOT/solaris-z on local
Each zone boot envrionment also has a parentbe property which presumably allows the global zone's pkg command to operate on the correct zone, called org.opensolaris.libbe:parentbe
root@myhostname:/etc# zfs get -r -d 1 -o name,value,source org.opensolaris.libbe:parentbe rpool/ROOT
NAME VALUE SOURCE
rpool/ROOT - -
rpool/ROOT/solaris 89b52c6a-80a0-670d-e178-cb91c57061d3 local
rpool/ROOT/solaris-z 89b52c6a-80a0-670d-e178-cb91c57061d3 local
The parentbe seems to be used to detemine which zones boot environments are unbootable (showing as !R in the "Active" column of beadm list).
We can edit these properties directly, but obviously it's better to use the beadm utility -- however knowing which properties it uses can be useful for manually correcting problems.
Useful documentation includes the solaris(5) man page.