I've been playing around with build 40 of Nevada, and when I was about to create a number of zones I recalled that we now can clone zones using zfs, so I gave that a shot.
I started out by creating my "master" zone:
# timex zoneadm -z master install A ZFS file system has been created for this zone. Preparing to install zone <master>. Creating list of files to copy from the global zone. Copying <2420> files to the zone. Initializing zone product registry. Determining zone package initialization order. Preparing to initialize <992> packages on the zone. Initialized <992> packages on zone. Zone <master> is initialized. The file </zones/master/root/var/sadm/system/logs/install_log> contains a log of the zone installation. real 5:49.37 user 47.77 sys 2:16.05
One thing that I noticed was that since /zones is a zfs file system,
zoneadm automatically created a /zones/master filesystem for me. Neat!
Now it was time to try out the clone feature:
# timex zoneadm -z private clone master Cloning snapshot pool/zones/master@SUNWzone1 Instead of copying, a ZFS clone has been created for this zone. real 0.98 user 0.20 sys 0.10
Yowsa! Less than a second to create a zone :)
Besides being very fast, it also saves space! About 56 kB before the zone is booted, and less than 6 MB once the zone is up and running.
# zfs list NAME USED AVAIL REFER MOUNTPOINT pool 140M 100G 24.5K /pool pool/zones 140M 100G 28.5K /zones pool/zones/master 70.0M 100G 69.9M /zones/master pool/zones/master@SUNWzone1 120K - 70.0M - pool/zones/private 5.55M 100G 74.7M /zones/private pool/zones/public 56.5K 100G 69.9M /zones/public
[Technorati Tags: Solaris OpenSolaris ]






