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

Previous Previous     Contents     Index     Next Next

The zoneadm detach process creates the information necessary to attach the zone on a different system. The zoneadm attach process verifies that the target machine has the correct configuration to host the zone. Because there are several ways to make the zonepath available on the new host, the actual movement of the zonepath from one system to another is a manual process that is performed by the global administrator.

When attached to the new system, the zone is in the installed state.

ProcedureHow to Migrate an lx Branded Zone

  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. Halt the zone to be migrated, lx-zone in this procedure.

    host1# zoneadm -z lx-zone halt

  3. Detach the zone.

    host1# zoneadm -z lx-zone detach

    The detached zone is now in the configured state.

  4. Move the zonepath for lx-zone to the new host.

    See How to Move the zonepath to a new Host for more information.

  5. On the new host, configure the zone.

    host2# zonecfg -z lx-zone

    You will see the following system message:

    lx-zone: No such zone configured
    Use 'create' to begin configuring a new zone.

  6. To create the zone lx-zone on the new host, use the zonecfg command with the -a option and the zonepath on the new host.

    zonecfg:lx-zone> create -a /export/zones/lx-zone

  7. View the configuration.

    zonecfg:lx-zone> info
    zonename: lx-zone
    zonepath: /export/zones/lx-zone
    brand: lx
    autoboot: false
    bootargs:
    pool:
    limitpriv:
    net:
             address: 192.168.0.90
             physical: bge0

  8. (Optional) Make any required adjustments to the configuration.

    For example, the network physical device might be different on the new host, or devices that are part of the configuration might have different names on the new host.

    zonecfg:lx-zone> select net physical=bge0
    zonecfg:lx-zone:net> set physical=e1000g0
    zonecfg:lx-zone:net> end

  9. Commit the configuration and exit.

    zonecfg:lx-zone> commit
    zonecfg:lx-zone> exit

  10. Attach the zone on the new host.

    • Attach the zone with a validation check.

      host2# zoneadm -z lx-zone attach

      The system administrator is notified of required actions to be taken if either or both of the following conditions are present:

      • Required packages and patches are not present on the new machine.

      • The software levels are different between machines.

    • Force the attach operation without performing the validation.

      host2# zoneadm -z lx-zone attach -F


      Caution Caution - The -F option allows you to force the attach with no validation performed. This is useful in certain cases, such as in a clustered environment or for backup and restore operations, but it does require that the system be properly configured to host the zone. An incorrect configuration could result in undefined behavior later.


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 35-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 lx-zone.tar lx-zone
    host1# sftp host2
    Connecting to host2...
    Password:
    sftp> cd /export/zones
    sftp> put lx-zone.tar
    Uploading lx-zone.tar to /export/zones/lx-zone.tar
    sftp> quit

  2. On host2, unpack the tar file.

    host2# cd /export/zones
    host2# tar xf lx-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.

The user must verify that the processor type in the new machine is supported. See About Migrating an lx Branded Zone for more information.

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