THIS BLOG POST GIVES WRONG ADVICE. DON'T DO THIS!
As the zones use ZFS as root filesystem it's easy to do a zfs
snapshot/clone to reproduce a zone. The different zones have only
one difference: They differ in /etc/nodename, they have different
rootpaths and they have different IP addresses.I wrote a script
to read from global's /etc/hosts the ip address. Zonerootpath is
/zones/zonename and /etc/nodename must contain as well. The
name of the zone is always identical to the hostname of the zone.
That rule is not from OpenSolaris but from me. ;-)
Here is my script: Beware: I hate to do a lot of checking. This
is not for general use...
#!/bin/bash
echo "Creating zone $1 from zone TEMPLATE"
echo check if $1 does not already exist...
zoneadm list -cv | grep $1 && exit -1
echo -n "Retrieving TEMPLATE's IP: "
TEMPLATE_IP=$(grep TEMPLATE /etc/hosts | nawk '{print $1}') …
Showing entries 1 to 1
Feb
21
2009
Showing entries 1 to 1