Go to main content

Creating and Using Oracle® Solaris Zones

Exit Print View

Updated: August 2019
 
 

How to Move a Zone To a Shared Storage Configuration

Perform this procedure to move a solaris zone from a local file system to shared storage. The zoneadm move command provides options to either create a new ZFS storage pool or import an existing one for the zone to use.

  1. Become a zone administrator.

    For more information, see Using Rights Profiles to Install and Manage Zones.

  2. Verify that the zone is in the installed state.
    global# pfbash zoneadm list -cv
      ID NAME             STATUS      PATH                      BRAND    IP
       0 global           running     /                         solaris  shared
       - zonename         installed  /system/zones/zonename     solaris  excl
  3. If the zone you want to move is in the running state, halt the zone.

    After the zone is halted, verify that it is now in the installed state.

    global$ zoneadm -z zonename halt
    global# zoneadm list -cv
  4. Reconfigure the zone to move it to shared storage.
    global$ zoneadm -z zonename move -p URI [-p URI] [-x extended-option ...]
    -p URI

    Specifies a storage URI. Use a separate –p option for each additional URI to specify. For more information about storage URIs, see the suri(7) man page.

    -x {force-zpool-import | force-zpool-create=rpool | create-size}

    Specifies optionally creating or importing the ZFS storage pool that the zone will use. The –x option accepts only one argument per operation.

    force-zpool-import

    Imports an existing ZFS storage pool.

    force-zpool-create=rpool

    Specifies to create a new ZFS storage pool with the user-supplied name rpool.

    create-size=size

    Specifies to create new storage URI objects of the specified size. By default the value of size is in bytes, unless the value includes a format specifier such as 1M, 1G, and 1T.

    The reconfigured zone remains in the installed state.