Migrate A Non-Global Zone from one host to another

Migrate A Non-Global Zone from one host to another

This ONLY WORKS (Big Gotcha) on machines of same architecure and Solaris 10 realease

1.

Become superuser, or assume the Primary Administrator role.

2.

Halt the zone to be migrated, zone-name in this procedure.

host1# zoneadm -z zone-name halt

3.

Detach the zone.

host1# zoneadm -z zone-name detach

The detached zone is now in the configured state.
4.

Move the zonepath for zone-name 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 zone-name

You will see the following system message:

zone-name: No such zone configured
Use ‘create’ to begin configuring a new zone.

6.

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

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

7.

(Optional) View the configuration.

zonecfg:zone-name> info
zonename: zone-name
zonepath: /export/zones/zone-name
autoboot: false
pool:
inherit-pkg-dir:
dir: /lib
inherit-pkg-dir:
dir: /platform
inherit-pkg-dir:
dir: /sbin
inherit-pkg-dir:
dir: /usr
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:zone-name> select net physical=bge0
zonecfg:zone-name:net> set physical=e1000g0
zonecfg:zone-name:net> end

9.

Commit the configuration and exit.

zonecfg:zone-name> commit
zonecfg:zone-name> exit

10.

Attach the zone on the new host.
*

Attach the zone with a validation check.

host2# zoneadm -z zone-name attach

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

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

The software levels are different between machines.
*

Force the attach operation without performing the validation.

host2# zoneadm -z zone-name attach -F

Leave a Reply

Your email address will not be published. Required fields are marked *