I opened an RFE related to this earlier today, but I have not received any
indication what the RFE number is. Here is a what the RFE says:
zoneadm clone is a great feature However, it could be faster and more space
efficient if it were to bring in the zfs feature set. Currently the command
zoneadm -z target clone template
performs a "find | cpio" to copy the data. However, it would be much more
time, space, and performance efficient for it to have a "zfsclone" method.
The general algorithm for the new copy_zone_zfs() would be:
zfs snapshot <fs mounted at zonepath of source_zone>@zone-SUNWzone-<newzone>
zfs clone <snapshot from above> <pool>/SUNWzone-<newzone>
zfs setmountpoint=<zonepath of newzone> <pool>/SUNWzone-<newzone>
Presumably the zfs commands above would really be implemented through the
I have implemented what I describe above, using the appropriate calls to
libzfs. Here is a zone creation in less than 1 second on an Ultra 2:
# time ksh -x /var/tmp/clone
+ zonecfg -z fast create -t template
+ zonecfg -z fast set zonepath=/zones/fast
+ /ws/usr/src/cmd/zoneadm/zoneadm -z fast clone -m zfsclone template
Cloning zonepath /zones/template...
I have a little bit of cleaning before it is ready for others. Also, I
would like to get "zoneadm uninstall" to be smart enough to just destory the
clone and snapshot if it was created with this mechanism.
-------------- next part --------------
An HTML attachment was scrubbed...