Thursday, January 17, 2013

V2V across servers : From non-global zone on one server to non-global zone on another server

I have a non-global zone, namely db1Zone, on server dat01. The following post explains the steps to migrate this zone to a non-global zone in another server dat02.

  • Create a archive of db1Zone that needs to be migrated:
zoneadm -z db1Zone shutdown
zoneadm -z db1Zone detach
zonecfg -z db1Zone export > db1Zone.cfg
zfs list -H -o name /zonespool/zones/db1Zone ; zoneroot can  be obtained from db1Zone.cfg
zfs snapshot -r zonespool/zones/db1Zone@migr
zfs send -rc zonespool/zones/db1Zone@migr > db1Zone.zfs

Detaching a zone is the first step in moving a zone from one step to anoter. Once the zone is detached,it is left in the configured state. If you try to install or clone to a configured zone that has been detached, you will receive an error message and install or clone process will fail.
  • Ensure that target server, dat02, is at the same OS patch level as source server, dat01.

  • Create the zone named db1Zone on target server
Copy db1Zone.cfg and db1Zone.zfs files to dat02 server
Make any required changes to db1Zone.cfg file. The network information will remain the same. Update any disk related info
Create the zone issuing the following command
zonecfg -z db1Zone -f db1Zone.cfg
Attach the source zone to this zone
  • zoneadm -z db1Zone attach -U -a /export/home/oracle/db1Zone.zfs
Additional info:
Errors

  • ERROR: Argument db1Zone.zfs is not a regular file
root@dat02:/export/home/oracle# zoneadm -z db2Zone attach -a db1Zone.zfs
ERROR: Argument db1Zone.zfs is not a regular file

Specify the complete path of the archive file. If the problem still exist, verify that target system is on the same OS patch level as the source system.


  • cannot receive: stream has unsupported feature, feature flags = 0

If the log file has the following info:

   Installing: This may take several minutes...
[Tue Jun  5 12:01:14 PDT 2012] gzcat /tmp/db1Zone.zfs.gz | zfs receive -F -u -x zoned rpool/zonespool/zones/db1Zone/installtmp/ds
cannot receive: stream has unsupported feature, feature flags = 0
[Tue Jun  5 12:01:14 PDT 2012] ERROR: Error: Command <zfs receive -F -u -x zoned rpool/zonespool/zones/db1Zone/installtmp/ds> exited with status 1

Verify that the target system is on the same OS patch level as the source system.

No comments:

Post a Comment