How to Move a Zone to Different Shared Storage

Ensure that the destination zone to which you move the shared storage already exists and contains a zpool.

Perform this procedure to move a zone to different shared storage. The zone configuration remains otherwise the same.

  1. Become a zone administrator.
  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. Change the location of the shared storage that the zone uses.
    global$ zoneadm -z zonename move -p URI [-p URI ...] \
    -x remove-rootzpool [-x extended-option ...] [new-zonepath]
    -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 {remove-rootzpool | force-zpool-destroy=rpool | force-storage-destroy-all}

    Specifies extended options to process the rootzpool resource of the zone after moving the zone out of shared storage. The ‐x option can take only one extended option per operation, but you can specify more than ‐x option in a single command.

    remove-rootzpool

    Required to move a zone from shared storage. Specifies removing the rootzpool resource from the zone configuration.

    force-zpool-destroy=rpool

    Specifies exporting the ZFS storage pool that is specified by the rootzpool resource.

    force-storage-destroy-all

    Specifies destroying the storage objects in the ZFS storage pool that is specified by the rootzpool resource.

    [ new-zonepath ]

    Specifies an optional new zone path to which to move the zone.