Create new local zones using the clone
of a snapshotted zfs filesystem,
1. create a zpool that will hold the zones
2. create master filesystem that will be cloned
3. configure masterzone and install
4. snapshot master filesystem
5. clone the snapshot
6. add newzone to index
7. copy master.xml
8. boot newzone
9. idtool newzone
1. for i in 1 2 3 4
>do
>mkfile 200m /dev/dsk/disk${i}
>done
1a. zpool create zones disk1 disk2 disk3 disk4
2. zfs create zones/master
3. zonecfg -z master
zonecfg>create
zonecfg>set zonepath=/zones/master
zonecfg>commit
zonecfg>exit
chmod 700 /zones/master
zoneadm -z master install
4. zfs snapshot zones/master@newzone
5. zfs clone zones/master@newzone zones/newzone1
zfs clone zones/master@newzone zones/newzone2
6. vi /etc/zones/index
global:installed:/
master:installed:/zones/master:99a2e0c2-2983-ef73-ec5ee1127ab1
-> newzone1:installed:/zones/newzone1:98a2e0c2-2983-ef73-ec5ee1127ab1
-> newzone2:installed:/zones/newzone2:98a2e0c2-2983-ef73-ec5ee1127ab1
7. cp /etc/zones/master.xml /etc/zones/newzone1.xml
cp /etc/zones/master.xml /etc/zones/newzone2.xml
vi /etc/zones/newzone*.xml
-> zone name="newzone1" zonepath="/zones/newzone1"
-> zone name="newzone2" zonepath="/zones/newzone2"
8. zoneadm -z newzone1 boot
zoneadm -z newzone2 boot
9. zlogin -C newzone1
zlogin -C newzone2