Archival Notice
This guide was written for Oracle Solaris 10 administrative workflows using classic zonecfg and ZFS datasets. Please adapt commands to modern Solaris 11.4 lifecycle workflows or non-global container management practices.
Maintaining enterprise server hardware running legacy Oracle Solaris virtualization requires moving running container environments (Zones) off constrained storage datasets. When local root ZFS pools (rpool) experience space degradation, sysadmins must execute cold storage migrations to dedicated high-throughput data storage arrays without corrupting /dev bindings or system configurations.
In this walkthrough, I outline how to provision test non-global zones from scratch and safely execute cross-pool block transfers onto isolated ZFS mount points.
Step 1: Provisioning a Solaris Zone on ZFS
To establish an isolated application instance, allocate a distinct ZFS filesystem mount point and configure resource inheritance and networking profiles using zonecfg.
1. Creating the ZFS Dataset
Create a dedicated storage dataset under the OS export pool:
zfs create os/export/CASUN181-182
zfs set mountpoint=/export/CASUN181-182 os/export/CASUN181-182
chmod 700 /export/CASUN181-182
2. Configuring the Zone via CLI (zonecfg)
Launch the interactive configuration prompt to define OS inheritance directories and assign shared interface bindings:
zonecfg -z CASUN181-182
CASUN181-182: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:CASUN181-182> create
zonecfg:CASUN181-182> remove inherit-pkg-dir dir=/sbin
zonecfg:CASUN181-182> remove inherit-pkg-dir dir=/usr
zonecfg:CASUN181-182> remove inherit-pkg-dir dir=/platform
zonecfg:CASUN181-182> remove inherit-pkg-dir dir=/lib
zonecfg:CASUN181-182> set autoboot=true
zonecfg:CASUN181-182> set zonepath=/export/CASUN181-182
zonecfg:CASUN181-182> set ip-type=shared
Configure networking inside the zone configuration block:
zonecfg:CASUN181-182> add net
zonecfg:CASUN181-182:net> set address=10.10.10.187/24
zonecfg:CASUN181-182:net> set physical=igb0
zonecfg:CASUN181-182:net> set defrouter=10.10.10.200
zonecfg:CASUN181-182:net> end
zonecfg:CASUN181-182> verify
zonecfg:CASUN181-182> commit
zonecfg:CASUN181-182> exit
3. Installing and Booting the Base OS
Verify the deployment configuration, install operating system binaries into the zone root, and boot the instance:
zoneadm -z CASUN181-182 verify
zoneadm -z CASUN181-182 install
zoneadm -z CASUN181-182 boot
Step 2: Executing ZFS Cold Storage Migrations
When migrating an established zone across completely separate ZFS pools (os/ vs data/), attempting a basic file copy will break required kernel loopback character maps in /dev. To maintain system stability, execute a clean detachment, prepare a new ZFS mount point, perform an archived tar block transfer, and reattach the profile.
1. Detaching the Existing Instance
Gracefully halt the running instance and detach its root identity maps:
# Gracefully shutdown zone daemons
zoneadm -z CASUN181-182 halt
# Detach zone configuration profile from active OS tree
zoneadm -z CASUN181-182 detach
2. Provisioning Destination Storage Pool
Allocate a fresh dataset inside the high-performance storage pool:
zfs create data/CASUN181-182
zfs set mountpoint=/data/CASUN181-182 data/CASUN181-182
chmod 700 /data/CASUN181-182
3. Transferring Core System Blocks
Archive and extract the underlying filesystem blocks while preserving hardlinks, extended attributes, and device structures:
# Navigate to old export directory
cd /export/CASUN181-182/
# Clone block archives to destination pool
tar cf - . | (cd /data/CASUN181-182 && tar xpf -)
4. Reattaching the Zone Profile
Redefine the zone storage path pointing to the new root directory and reattach the filesystem profile:
# Redefine zonepath pointer
zonecfg -z CASUN181-182 set zonepath=/data/CASUN181-182
# Validate and reattach target instance
zoneadm -z CASUN181-182 attach
zoneadm -z CASUN181-182 boot
Migration Verified
Your non-global zone is now fully decoupled from legacy root pools and running optimally over your dedicated high-performance ZFS arrays!