Solaris tip of the week: Zone cloning
By Jay Danielsen on Jan 09, 2009
In an earlier Solaris tip of the week, I published a zone creation script that could be ussed to automate the installation of a set of zones, defined as a list of hostname:ipaddress pairs. I've updated this script to leverage the 'zoneadm clone' option, and I'm happy to say that this significantly shortens the install time on both ufs and zfs root filesystems. The modifcation to this script now creates a zone template named 'master'. The master zone is installed once, then used to create all subsequent zones. On a ufs filesystem, a new zone can be created in approximately two minutes. On a zfs filesystem, a new zone can be created in approximately 10 seconds.
I've tested this script on both nevada/sol10 hosts as well as on opensolaris/ipkg installations. On OpenSolaris, a host must be internet-connected in order to install the master zone, but once the master zone is installed, additional zones can be created as clones of the master zone without being connected to the internet. Hope this is useful, let me know if you have problems or questions regarding this script.
Download zone installation script here.