How to Migrate Solaris zones
To move a zone within the system we follow the following steps,
# zoneadm -z zonename halt
# zoneadm -z zonename move /export/home/zones/newzonename
To migrate the zone from one system to another follow the steps as below;
1. Both the system hardware and Os must be same . Check with uname -u like sun4u and sun4v
2. Check for the zone which you want to migrate
# zoneadm list -vc
Halt the zone which we want to migrate
# zoneadm -z zonename halt
# zoneadm -z zonename detach
Look with the command zoneadm list -vc , the zone will be in configure state.
3. Move the zone from this system to another
# cd /export/home/zones
Tar the zone which we want to migrate
# tar cf newzonename.tar zonename
Copy the tar file to the new system
# scp newzonename.tar systemname(IP):/export/home/zones
It will prompt for password, give the password and continue.
4. Go on to the new system
# cd /export/home/zones
Untar the file
# tar xf newzonename.tar
On the new system run the following commands
# zonecfg -z newzonename
>create -a /export/home/newzonename
> add net
> set physical=hme0
> set address=XXX.XXX.XXX.XXX
> end
> verify
> commit
> exit
5. Attach the zone in this system
# zoneadm -z newzonename attach -F
6 . Boot the zone
# zoneadm -z newzonename boot
7. Login into the system with same user and passowrd
# zlogin newzonename

Leave a Reply