From Oracle Documentation
Moving and Migrating Non-Global Zones (Tasks)
Moving and Migrating lx Branded Zones (Tasks)
Solaris 10 11/06: Cloning a Non-Global Zone on the Same System
Cloning an lx Branded Zone on the Same System
System Administration Guide: Oracle Solaris 9 Containers
System Administration Guide: Oracle Solaris 8 Containers
Migrating a Physical Solaris System Into a Zone
From www.oracle.com:
Zones.
Bloggers:
Virtual Steve, Steve Wilson's Weblog Solaris Container Migration Made Easy.
The Clingan Zone The Clingan Zone.
From My Brain to Your Browser, Jeff Victor's Blog Spawning 0.5kZ/hr (Part 1).
From My Brain to Your Browser, Jeff Victor's Blog Spawning 0.5kZ/hr (Part 2).
Bob Netherton's Weblog, Cloning Isn't Just for Sheep Any More.
gz's web log The global zone, Moving a SOLARIS zone from ufs to zfs. - HOWTO.
Sun Connection, Moving zones between machines/hosts.
Unix Prompt Blog, Physical to Virtual (P2V) Migration, moving a existing Solaris 10 system to a zone.
New Solaris Zones Features
The following Solaris Zones enhancements are found in the Solaris 10 10/08 release:
Update on Attach: If the new host has the same or later versions of the zone-dependent packages and their associated patches, using zoneadm attach with the -u option, updates those packages within the zone to match the new host. If the new host has a mixture of higher and lower version packages and patches as compared to the source host, then an update during the attach operation is not allowed. This option also enables automatic migration between machine classes, such as from sun4u to sun4v.
The following Solaris Zones enhancements are found in the Solaris 10 5/09 release:
Support Added for Using ZFS Clones When Cloning a Zone
If the source and the target zonepaths reside on ZFS and both are in the same pool, a snapshot of the source zonepath is taken and the zoneadm clone uses ZFS to clone the zone.
You can specify to copy a ZFS zonepath instead of specifying to clone the ZFS. If neither the source nor the target zonepath is on ZFS, or if one is on ZFS and the other is not on ZFS, the clone process uses the existing copy technique.
In all cases, the system copies the data from a source zonepath to a target zonepath if using a ZFS clone is not possible.
zoneadm attach -b
Use the -b option to specify official or Interim Diagnostics Relief (IDR) patches, to be backed out of a zone during the attach. This option applies only to zone brands that use SVr4 packaging.
Migrating a Physical Solaris System Into a Zone
Step 1.
You need to assess the source system.
The source must be at the same or older release level of Solaris 10, must be the same architecture. Consider applications that directly use hardware device and NFS server as these applications do not work in a non-global zone.
Step 2.
Create a image of the source system.
you can use several methods, a flash archive, cpio, pax (-x xustar), bzip2 or gzip compressed cpio or ufsdump. If the root filesystem is ZFS then you must use the pax or cpio option with flarcreate command.
chaos:/> flarcreate -n 8.1.10 -L cpio /net/ultra20/flar/chaos.flar
Archive format requested is cpio
This archiver format is NOT VALID for flash installation of ZFS root pool.
This format is useful for installing the system image into a zone.
Reissue command without -L option to produce an archive for root pool install.
Full Flash
Checking integrity...
Integrity OK.
Running precreation scripts...
Precreation scripts done.
Determining the size of the archive...
cpio: File size of "etc/mnttab" has decreased by 74
15238396 blocks
1 error(s)
The archive will be approximately 7.26GB.
Creating the archive...
15238436 blocks
Archive creation complete.
Running postcreation scripts...
Postcreation scripts done.
Running pre-exit scripts...
Pre-exit scripts done.
Step 3.
Create a zone.
Use the zonecfg command to create a new zone.
ultra20:/> zonecfg -z chaoszone "create -b;set zonepath=/export/zones/chaos;add net;set address=192.168.1.202;set physical=nge0;end"
Step 4.
Install the zone.
ultra20:/> zoneadm -z chaoszone install -u -a /flar/chaos.flar
Log File: /var/tmp/chaoszone.install_log.rpaW7e
Installing: This may take several minutes...
Postprocessing: This may take a while...
Postprocess: Updating the zone software to match the global zone...
Postprocess: Zone software update complete
Postprocess: Updating the image to run within a zone
Result: Installation completed successfully.
Log File: /export/zones/chaos/root/var/log/chaoszone.install2472.log
Step 5.
Configure the zone.
Boot the zone and log in useing zlogin -C and configure the zone.