Creating a Flash Archive of a Zoned System

Jeff Victor, Sun Microsystems

Introduction

 So you want to create a flash archive of a zoned system, but haven't tried it yet? You can create a flar of a zoned system, in most cases. However, there is some information you will need to avoid the pitfalls that currently (early-2006) exist. This document will explain what works and how to avoid the known pitfalls.

Background

 Sun introduced "flash archive" technology inSolaris 8. This allows you to create a bit-for-bit disk image of an existing installation of Solaris, with customizations and, potentially, pre-configured applications.
Sun introduced "zones" technology in January 2005 with Solaris 10. A zone is an abstraction of an instance of Solaris, within a real installation of Solaris, that provides a virtual application environment. By design, an application running within a zone cannot interact with any application or system process in any other zone. See these web sites for more details on Solaris Zones and Solaris Containers:

Current Situation

 When Solaris 10 was first released, the flash archive software - both flar-creation and flar-extraction software - was not aware of zones. Research was needed to learn whether the flash archive software would require modifications in order to work correctly with zones, and where there were shortcomings. Such research was performed in order to produce this document, but without rigorous testing. Each feature of a zone's configuration was tested for correct archival and extraction, but no application testing was performed.

Results

 The following zone configuration options were tested, one at a time:

  1. add net
  2. add fs (ufs, lofs)
  3. 'transparent' file system mount directly into a non-global zone
  4. NFS mount
  5. SVM-managed disk partitions
  6. Devices

 In addition, a few archives were created while one or more zones was running. In all cases an incomplete flar was created. Clearly flash archives should be created with all non-global zones turned off. All of the results described below were from archives generated while all non-global zones were stopped.
 The following table describes the results of the tests. The "source" system is the system where the flash archive is created. The "destination" system is the system being flashed.

Feature
Result
Comments
set autoboot=true
Success
If use of another zone feature requires any configuration modification after flar extraction, the first autoboot will fail, but subsequent reboots will succeed.
add net
Success, but see Comments
If the same type of network port (e.g. hme0) is available on both the source and destination, this works correctly without any manual intervention. If the destination has a different port type, or if you want to use a different instance of that port type, you must modify that after flar extraction. This can be done very easily with the zonecfg command.
NFS mount in non-global zone
Success
Specify the NFS mount point(s) in the non-global zone(s) /etc/vfstab file(s) before creating the flar. Note that the zone cannot be installed into an NFS filesystem.
add fs, type=lofs
Success
add fs, type=ufs
See Comments
1) You must manually plan your disk layouts appropriately. You must ensure that there is enough space on the disk of the destination system.
 2) Because the non-global zone was not running on the source system when the flar was created, the zone-private file system is not mounted anywhere, and the flar will not include the zone-pvt fs.
 Workaround: From the GZ, manually mount the disk slice into the correct place (e.g. mount /dev/dsk/c1t0d0s0 /zones/zone2/root/opt/local). Create the flar. When extracting the flar, configure the slice into the GZ. After first boot, remove that entry from the GZ's /etc/vfstab. Unmount the zone-pvt fs and then boot the zone, or re-boot the whole system. Subsequent system (or zone) re-boots will correctly mount the zone-pvt fs into the zone.
SVM
Failure (mostly)
Because the Solaris installer is not aware of SVM, it is not possible to simply create a flash archive of a system with, e.g. soft partitions. This is unrelated to the presence of zones. There may be a method to work around this, but it will be complicated, at best.
Devices
Partial success
If the two systems have identical hardware, this will work correctly. Otherwise, manual changes to the zone configurations (via "zonecfg -z zonename...") must be performed prior to the first bootup of each zone.

Conclusion

 A flash archive of a system with Solaris 10 Containers can be created. In some cases one or more extra steps are required because the flash archive tools are not yet zone-aware. A future revision to Solaris will update the flash archive tools to make them aware of zones.

last modified by admin on 2009/10/26 12:11
Collectives
Project


© Sun Microsystems Inc. 2009
XWiki Enterprise 1.8.2.19075 - Documentation
Terms Of Use | Privacy | Trademarks | Copyright Policy | Site Guidelines | Site map | Help
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.