JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris 11.1 Administration: Oracle Solaris Zones, Oracle Solaris 10 Zones, and Resource Management     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

Part I Oracle Solaris Resource Management

1.  Introduction to Resource Management

2.  Projects and Tasks (Overview)

3.  Administering Projects and Tasks

4.  Extended Accounting (Overview)

5.  Administering Extended Accounting (Tasks)

6.  Resource Controls (Overview)

7.  Administering Resource Controls (Tasks)

8.  Fair Share Scheduler (Overview)

9.  Administering the Fair Share Scheduler (Tasks)

10.  Physical Memory Control Using the Resource Capping Daemon (Overview)

11.  Administering the Resource Capping Daemon (Tasks)

12.  Resource Pools (Overview)

13.  Creating and Administering Resource Pools (Tasks)

14.  Resource Management Configuration Example

Part II Oracle Solaris Zones

15.  Introduction to Oracle Solaris Zones

16.  Non-Global Zone Configuration (Overview)

17.  Planning and Configuring Non-Global Zones (Tasks)

18.  About Installing, Shutting Down, Halting, Uninstalling, and Cloning Non-Global Zones (Overview)

19.  Installing, Booting, Shutting Down, Halting, Uninstalling, and Cloning Non-Global Zones (Tasks)

20.  Non-Global Zone Login (Overview)

21.  Logging In to Non-Global Zones (Tasks)

22.  About Zone Migrations and the zonep2vchk Tool

23.  Migrating Oracle Solaris Systems and Migrating Non-Global Zones (Tasks)

Migrating a Non-Global Zone to a Different Machine

About Migrating a Zone

How to Migrate A Non-Global Zone Using ZFS Archives

Migrating a Zone From a Machine That Is Not Usable

Migrating an Oracle Solaris System Into a Non-Global Zone

About Migrating an Oracle Solaris System Into a solaris Non-Global Zone

Scanning the Source System With zonep2vchk

How to Create an Archive of the System Image on a Network Device

How to Configure the Zone on the Target System

Installing the Zone on the Target System

24.  About Automatic Installation and Packages on an Oracle Solaris 11.1 System With Zones Installed

25.  Oracle Solaris Zones Administration (Overview)

26.  Administering Oracle Solaris Zones (Tasks)

27.  Configuring and Administering Immutable Zones

28.  Troubleshooting Miscellaneous Oracle Solaris Zones Problems

Part III Oracle Solaris 10 Zones

29.  Introduction to Oracle Solaris 10 Zones

30.  Assessing an Oracle Solaris 10 System and Creating an Archive

31.  (Optional) Migrating an Oracle Solaris 10 native Non-Global Zone Into an Oracle Solaris 10 Zone

32.  Configuring the solaris10 Branded Zone

33.  Installing the solaris10 Branded Zone

34.  Booting a Zone, Logging in, and Zone Migration

Glossary

Index

Migrating an Oracle Solaris System Into a Non-Global Zone

Because zones do not nest, the P2V process makes any existing zones inside the migrated system image unusable in the destination zone. Existing non-global zones on the source system must be migrated before you migrate the global zone's system image.

About Migrating an Oracle Solaris System Into a solaris Non-Global Zone

An existing Oracle Solaris 11 system can be directly migrated into a solaris brand zone on an Oracle Solaris 11 system. Use the zonep2vchk and zfs commands on the source system to prepare for migration and archive the system image. Use the zonecfg and zoneadm commands to configure and install the archive in the destination zone on the target system.

The following restrictions apply to migrating a global zone to a non-global zone:

For more information, see the zonep2vchk(1M), zfs(1M), zonecfg(1M), and zoneadm(1M), and solaris(5) man pages.

Scanning the Source System With zonep2vchk

  1. Be an administrator.
  2. Run the zonep2vchk tool with the -b option to perform a basic analysis that checks for Oracle Solaris features in use that might be impacted by a P2V migration.
    source# zonep2vchk -b 11
  3. Run the zonep2vchk tool with the -s option to perform a static analysis of application files. This inspects ELF binaries for system and library calls that might affect operation inside a zone.
    source# zonep2vchk -s /opt/myapp/bin,/opt/myapp/lib
  4. Run the zonep2vchk tool with the -r option to perform runtime checks that look for processes that could not be executed successfully inside a zone.
    source# zonep2vchk -r 2h
  5. Run the zonep2vchk tool with the -c option on the source system to generate a template zonecfg script, named s11-zone.config in this procedure.
    source# zonep2vchk -c > /net/somehost/p2v/s11-zone.config

    This configuration will contain resource limits and network configuration based on the physical resources and networking configuration of the source host.

How to Create an Archive of the System Image on a Network Device

Archive the file systems in the global zone. Verify that no non-global zones are installed on the source system. Multiple archive formats are supported including cpio, pax archives created with the -x xustar (XUSTAR) format, and zfs. The examples in this section use the zfs send command for creating archives. The examples assume the root pool is named rpool.

  1. Be an administrator.
  2. Create a snapshot of the entire root pool, named rpool@p2v in this procedure.
    source# zfs snapshot -r rpool@p2v
  3. Destroy the snapshots associated with swap and dump devices, because these snapshots are not needed on the target system.
    source# zfs destroy rpool/swap@p2v
    source# zfs destroy rpool/dump@p2v
  4. Archive the system.
    • Generate a ZFS replication stream archive that is compressed with gzip, and stored on a remote NFS server.
      source# zfs send -R rpool@p2v | gzip > /net/somehost/p2v/s11-zfs.gz
    • You can avoid saving intermediate snapshots and thus reduce the size of the archive by using the following alternative command.
      source# zfs send -rc rpool@p2v

See Also

For more information, see the cpio(1), pax(1), and zfs(1M) man pages.

How to Configure the Zone on the Target System

The template zonecfg script generated by the zonep2vchk tool defines aspects of the source system's configuration that must be supported by the destination zone configuration. Additional target system dependent information must be manually provided to fully define the zone.

The configuration file is named s11-zone.config in this procedure.

  1. Be an administrator.
  2. Review the contents of the zonecfg script to become familiar with the source system's configuration parameters.
    target# less /net/somehost/p2v/s11-zone.config

    The initial value of zonepath in this script is based on the host name of the source system. You can change the zonepath directory if the name of the destination zone is different from the host name of the source system.

    Commented-out commands reflect parameters of the original physical system environment, including memory capacity, number of CPUs, and network card MAC addresses. These lines may be uncommented for additional control of resources in the target zone.

  3. Use the following commands in the global zone of the target system to view the current link configuration.
    target# dladm show-link
    target# dladm show-phys
    target# ipadm show-addr

    By default, the zonecfg script defines an exclusive-IP network configuration with an anet resource for every physical network interface that was configured on the source system. The target system automatically creates a VNIC for each anet resource when the zone boots. The use of VNICs make it possible for multiple zones to share the same physical network interface. The lower-link name of an anet resource is initially set to change-me by the zonecfg command. You must manually set this field to the name of one of the data links on the target system. Any link that is valid for the lower-link of a VNIC can be specified.

  4. Copy the zonecfg script to the target system.
    target# cp /net/somehost/p2v/s11-zone.config .
  5. Use a text editor such as vi to make any changes to the configuration file.
    target# vi s11-zone.config
  6. Use the zonecfg command to configure the s11-zone zone.
    target# zonecfg -z s11-zone -f s11-zone.config

Installing the Zone on the Target System

This example does not alter the original system configuration during the installation.

  1. Be an administrator.
  2. Install the zone using the archive created on the source system.
    target# zoneadm -z s11-zone install -a /net/somehost/p2v/s11-zfs.gz -p