Introducing Unified Archives in Solaris 11.2

Since first writing about creation of system recovery images for Solaris 11 over two years ago, I've been working on a building a core feature for Solaris to address this need. With the release of Solaris 11.2, we announce the introduction of this feature for Solaris users.

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.

Comments:

Hi,
The one information I would like to see is how big are those unified archives? Is it a "big tar" with meta-data added, or are they a list of installed packages without the files on one part and a "big tar" of everything else?

Alain

Posted by Alain Brossard on May 05, 2014 at 06:19 AM EDT #

They aren't tarballs, but rather composed of compressed streams. The data is indeed in the archive, to assist with rapid deployment and also to allow for standalone recovery scenarios (e.g. where no IPS publisher or other source of bits exists).

With the compression, it ends up being some amount smaller than the aggregate deployed sizes. For example, the frost.uar archive shown here is deployed in about 850MB, the archive itself ends up around 600MB, including the media. If you were to exclude the embedded install media, it's much smaller, around 250MB.

Posted by Jesse Butler on May 06, 2014 at 10:31 PM EDT #

It would be useful for you to leave an nfs example. Particularly since even though "nfs://" is official URI syntax, Ai doesnt support it. you have to "fake" it with file://net/

Posted by guest on May 08, 2014 at 02:47 PM EDT #

AI syntax doesn't change with the introduction of archive support, just the use of "ARCHIVE" is new. So, to use an NFS path instead of the HTTP as shown, just the URI changes and all else remains the same.

Posted by Jesse Butler on May 08, 2014 at 03:52 PM EDT #

What about deploying zones from a system at a different (higher) SRU level?

Thanks in advance.

Posted by Carlos Azevedo on May 09, 2014 at 02:20 PM EDT #

For kernel zones, the deployed version doesn't matter since the kernel is independent and the package images are not linked.

As you may guess, we do not drive an update of the host global zone if a user attempts to deploy a higher rev SRU as a non-global zone. In this case, the deployment will fail.

Note if a lower SRU is deployed as a non-global zone, it will be updated on attach.

Posted by Jesse Butler on May 09, 2014 at 03:48 PM EDT #

Hi, what about solaris 10 zones within a Solaris 11.2 host, are they archivable/deployable in the same manner, is there any limitations ?

Posted by Mehdi on September 21, 2014 at 04:35 PM EDT #

Yes 'solaris10' brand zones can be archived and deployed from a host running Solaris 11.2 or later.

Posted by Jesse Butler on September 22, 2014 at 01:06 PM EDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Thoughts on Solaris from Midcoast Maine.

Search

Categories
Archives
« July 2015
SunMonTueWedThuFriSat
   
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
       
Today