sun.com docs.sun.com My Sun Worldwide Sites

Previous Previous     Contents     Index     Next Next

ProcedureHow to Move the zonepath to a new Host

There are many ways to create an archive of the zonepath. For example, you can use the cpio or pax commands described in the cpio(1)) and pax(1) man pages.

There are also several ways to transfer the archive to the new host. The mechanism used to transfer the zonepath from the source host to the destination depends on the local configuration. In some cases, such as a SAN, the zonepath data might not actually move. The SAN might simply be reconfigured so the zonepath is visible on the new host. In other cases, the zonepath might be written to tape, and the tape mailed to a new site.

For these reasons, this step is not automated. The system administrator must choose the most appropriate technique to move the zonepath to the new host.

  1. Become superuser, or assume the Primary Administrator role.

    To create the role and assign the role to a user, see "Using the Solaris Management Tools With RBAC (Task Map)" in System Administration Guide: Basic Administration.

  2. Move the zonepath to the new host. You can use the method described in this procedure, or use another method of your choice.

Example 23-1   Archiving and Moving the zonepath Using the tar Command
  1. Create a tar file of the zonepath on host1 and transfer it to host2 by using the sftp command.

    host1# cd /export/zones
    host1# tar cf my-zone.tar my-zone
    host1# sftp host2
    Connecting to host2...
    Password:
    sftp> cd /export/zones
    sftp> put my-zone.tar
    Uploading my-zone.tar to /export/zones/my-zone.tar
    sftp> quit

  2. On host2, unpack the tar file.

    host2# cd /export/zones
    host2# tar xf my-zone.tar

For more information, see sftp(1) and tar(1).

Troubleshooting

See Resolving Problems With a zoneadm attach Operation for troubleshooting information on the following:

  • Patches and packages are out of sync.

  • Operating system releases do not match.

Next Steps

If you have copied the data instead of reconfiguring a SAN, then the zonepath data will still be visible on the source host even though the zone is now in the configured state. You can either manually remove the zonepath from the source host after you have finished moving the data to the new host, or you can attach the reattach the zone to the source host and use the zoneadm uninstallcommand to remove the zonepath.

About Validating a Zone Migration Before the Migration Is Performed

You can perform a trial run before the zone is moved to the new machine by using the "no execute" option,-n.

The zoneadm detach subcommand is used with the -n option to generate a manifest on a running zone without actually detaching the zone. The state of the zone on the originating system is not changed. The zone manifest is sent to stdout. The global administrator can direct this output to a file or pipe it to a remote command to be immediately validated on the target host. The zoneadm attach subcommand is used with the -n option to read this manifest and verify that the target machine has the correct configuration to host the zone without actually doing an attach.

The zone on the target system does not have to be configured on the new host before doing a trial-run attach.

ProcedureHow to Validate a Zone Migration Before the Migration Is Performed

You must be the global administrator in the global zone to perform this procedure.

  1. Become superuser, or assume the Primary Administrator role.

    To create the role and assign the role to a user, see "Using the Solaris Management Tools With RBAC (Task Map)" in System Administration Guide: Basic Administration.

  2. Use one of the following methods.

    • Generate the manifest on a source host named my-zone and pipe the output to a remote command that will immediately validate the target host:

      global# zoneadm -z my-zone detach -n | ssh remotehost zoneadm attach -n -

      The hyphen (--) at the end of the line specifies stdin for the path.

    • Generate the manifest on a source host named my-zone and direct the output to a file:

      global# zoneadm -z my-zone detach -n 

      Copy the manifest to the new host system as described in How to Move the zonepath to a new Host, and perform the validation:

      global# zoneadm attach -n path_to_manifest

      The path can be -- to specify stdin.

Previous Previous     Contents     Index     Next Next
Company Info Contact Terms of Use Privacy Copyright 1994-2007 Sun Microsystems, Inc.