Introducing Unified Archives in Solaris 11.2
By Jlbutler-Oracle on Apr 29, 2014
Solaris 11.2 introduces a new native archive file type called Unified Archives. Users create archives from a deployed Solaris instance, if there are zones installed within the instance they can be included or excluded as desired.
Unified Archives are created through the use of the new archiveadm(1m) utility. To create an archive of a system which is suitable for cloning a system, by default including any installed zones on the system, the 'create' subcommand is used without any options.
# archiveadm create /data/archives/jacks.uar Initializing Unified Archive creation resources... Unified Archive initialized: /data/archives/jacks.uar Logging to: /system/volatile/archive_log.1660 Executing dataset discovery... Dataset discovery complete Creating install media for zone(s)... Media creation complete Preparing archive system image... Beginning archive stream creation... Archive stream creation complete Beginning final archive assembly... Archive creation complete
To examine the content of a given archive, the 'info' subcommand is used. It shows various attributes of an archive, such as the origin system and the list of systems which are deployable from the archive.
# archiveadm info /data/archives/jacks.uar Archive Information Creation Time: 2014-04-29T19:01:42Z Source Host: jacks Architecture: i386 Operating System: Oracle Solaris 11.2 X86 Deployable Systems: global,frost,quick,nimble
Note there are three zones installed in the host in this example, which makes for four independently deployable systems: the global zone, and the three zones 'frost', 'quick' and 'nimble'.
Any archived system from within a Unified Archive can be deployed to any supported same-ISA platform. This support includes crossing virtualization boundaries, so a Unified Archive created on a SPARC T5 LDOM can be supported as a zone, and a zone archive can be installed to a metal system.
Unified Archives can be created of a specific installed zone, or list of zones, by simply selecting it via create's -z option. Here is an example of archiving a single solaris-brand zone.
# archiveadm create -z frost /data/archives/frost.uar Initializing Unified Archive creation resources... Unified Archive initialized: /data/archives/frost.uar Logging to: /system/volatile/archive_log.4983 Executing dataset discovery... Dataset discovery complete Creating install media for zone(s)... Media creation complete Preparing archive system image... Beginning archive stream creation... Archive stream creation complete Beginning final archive assembly... Archive creation complete
The 'info' subcommand has a verbose option which shows a bit more detail regarding an archive's content.
# archiveadm info -v /data/archives/frost.uar Archive Information Creation Time: 2014-04-29T19:06:38Z Source Host: jacks Architecture: i386 Operating System: Oracle Solaris 11.2 X86 Recovery Archive: No Unique ID: 0e0cd6ea-0caf-cff3-aa7c-a139c2d7ee4c Archive Version: 1.0 Deployable Systems 'frost' OS Version: 0.5.11 OS Branch: 0.175.2.0.0.38.0 Active BE: solaris Brand: solaris Size Needed: 859MB Unique ID: 382c7a60-2ada-c745-e778-f149c751ebf3 AI Media: 0.175.2_ai_x86.iso Root-only: Yes
We've integrated deployment support for Unified Archives in the Solaris Automated Installer as well as the Solaris Zones utilities.
Both zonecfg(1m) and zoneadm(1m) natively support Unified Archives. The -a option is used for both CLIs to create a zone based upon an archived zone, and then install it with the archived content, respectively.
Note it's not necessary to create the zone configuration from the archive, it's just a feature to allow template-like deployment of zones. Any valid zone configuration can be installed from an archive.
# zonecfg -z dandy create -a /data/archives/frost.uar -z frost # zoneadm -z dandy install -a /data/archives/frost.uar -z frost The following ZFS file system(s) have been created: rpool/VARSHARE/zones/dandy Progress being logged to /var/log/zones/zoneadm.20140429T200115Z.dandy.install Installing: This may take several minutes... Zone BE root dataset: rpool/VARSHARE/zones/dandy/rpool/ROOT/solaris Cache: Using /var/pkg/publisher. Updating image format Image format already current. Updating non-global zone: Linking to image /. Processing linked: 1/1 done Updating non-global zone: Syncing packages. No updates necessary for this image. (zone:dandy) Updating non-global zone: Zone updated. Result: Attach Succeeded. Done: Installation completed in 86.108 seconds. Next Steps: Boot the zone, then log into the zone console (zlogin -C) to complete the configuration process. Log saved in non-global zone as /system/zones/dandy/root/var/log/zones/zoneadm.20140429T200115Z.dandy.install
For deployment to metal systems or LDOMs via the Solaris Automated Installer, a new software type of ARCHIVE in the AI manifest handles deployment of Unified Archives. A simple manifest as shown below which will deploy the archived system directly from the HTTP URI listed.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE auto_install SYSTEM "file:///usr/share/install/ai.dtd.1"> <auto_install> <ai_instance name="default"> <target> <logical> <zpool name="rpool" is_root="true"> <filesystem name="export" mountpoint="/export"/> <filesystem name="export/home"/> </zpool> </logical> </target> <software type="ARCHIVE"> <source> <file uri="http://host.domain/path/to/archive.uar"/> </source> <software_data action="install"> <name>global</name> </software_data> </software> </ai_instance> </auto_install>
I'll be posting more here with some use case walkthroughs and more feature descriptions.