Solaris 11 Zone copy using Unified Archives

Create the archive

# archiveadm create -r -z zone2 /archives/zone2.uar

in the target system, the zpool should already exist, then we create the zone and use the archive to install the zone.

# zonecfg -z zone2 create -a /root/zone2.uar
# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / solaris share
zone2 configured /zone2pool solaris excl

# zoneadm -z zone2 uninstall
# zoneadm -z zone2 install -a /root/zone2.uar

if “install” fails try this script:

#!/bin/bash

Z=$1
set -x

pkg -R /zones/$Z/root set-publisher -G http://sunutil5:10000/ solaris
pkg -R /zones/$Z/root variant -H variant.arch
pkg -R /zones/$Z/root set-property use-system-repo true
pkg -R /zones/$Z/root publisher -H -F tsv
pkg -R /zones/$Z/root refresh –full
pkg -R /zones/$Z/root uninstall VRTSvlic VRTSperl
zoneadm -z $Z attach -u


# zoneadm -z zone2 boot