Home / Solaris Migrations / How to Migrate solaris 10 zones to solaris 11 as branded zone ? V2V

How to Migrate solaris 10 zones to solaris 11 as branded zone ? V2V

If you are planning to move the solaris 10 zones to solaris 11 global zones, this step by step  procedure will help you. As you know there is no direct method to upgrade the solaris 10 to solaris 11, most of the clients would like to run their existing solaris 10 zones as branded zone under solaris 11 without upgrading the guest operating system for time being.We can call this method as virtual to virtual (V2V). In solaris 10, we have two type of local zones. 1.whole root zone 2.Sparse root zone. In this article ,we will see how we can move the both type of zones under solaris 11 global zone.

1.List the sparse root zone’s configuration.

bash-3.00# zonecfg -z u1 info
zonename: u1
zonepath: /export/zones/u1
brand: native
autoboot: false
bootargs:
pool:
limitpriv:
scheduling-class:
ip-type: shared
hostid:
inherit-pkg-dir:
        dir: /lib
inherit-pkg-dir:
        dir: /platform
inherit-pkg-dir:
        dir: /sbin
inherit-pkg-dir:
        dir: /usr
net:
        address: 192.168.2.121
        physical: e1000g0
        defrouter not specified

bash-3.00#

2.Show the whole root zone’s configuration.

bash-3.00# zonecfg -z sapora1 info
zonename: sapora1
zonepath: /orazs10/sapora1
brand: native
autoboot: false
bootargs:
pool:
limitpriv:
scheduling-class:
ip-type: shared
hostid:
net:
        address: 192.168.2.120
        physical: e1000g0
        defrouter not specified
bash-3.00#

3.Here is the patch version of both the local zones.

bash-3.00# zlogin sapora1 uname -a
SunOS sapora1 5.10 Generic_142910-17 i86pc i386 i86pc
bash-3.00# zlogin u1 uname -a
SunOS u1 5.10 Generic_142910-17 i86pc i386 i86pc
bash-3.00# zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              native   shared
   2 sapora1          running    /orazs10/sapora1               native   shared
   3 u1               running    /export/zones/u1               native   shared
bash-3.00#
bash-3.00# zlogin u1 hostid
11302069
bash-3.00# zlogin sapora1 hostid
11302069
bash-3.00#

You need to specify the host id in destination server zone configuration file.

4.Halt the local zones .

bash-3.00# zoneadm -z sapora1 halt
bash-3.00# zoneadm -z u1 halt
bash-3.00# zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              native   shared
   - u1               installed  /export/zones/u1               native   shared
   - sapora1          installed  /orazs10/sapora1               native   shared
bash-3.00#

5.Since sparse root zone is sharing FS from global zone’s root filesystem,We need to make the zone in “ready” state to keep it ready.

bash-3.00# zoneadm -z u1 ready
bash-3.00# zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              native   shared
   4 u1               ready      /export/zones/u1               native   shared
   - sapora1          installed  /orazs10/sapora1               native   shared
bash-3.00#

6.Let starts archiving the complete zone using cpio.

bash-3.00# find sapora1 -print | cpio -oP@ | gzip >  /orazs10/sapora1_img.cpio.gz
6181086 blocks
bash-3.00# du -sh /orazs10/sapora1_img.cpio.gz
 1.1G   /orazs10/sapora1_img.cpio.gz
bash-3.00# cd /export/zones/
bash-3.00# df -h  /orazs10
Filesystem             size   used  avail capacity  Mounted on
orazs10                7.8G   1.1G   3.5G    25%    /orazs10
bash-3.00# find u1 -print | cpio -oP@ | gzip >  /orazs10/u1_img.cpio.gz
6440364 blocks
bash-3.00#

We have successfully dumped the complete zone in a single file.

7.Copy these zone’s *.gz file to the destination solaris 11 server.

8.Login to the destination server(solaris 11) and create the zone’s configuration as like step 1 and step 2.

root@UAAIS:~# zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              solaris  shared
root@UAAIS:~# zonecfg -z u1
Use 'create' to begin configuring a new zone.
zonecfg:u1> create -t SYSsolaris10
zonecfg:u1> set zonepath=/oraz1/u1
zonecfg:u1> set hostid=11302069
zonecfg:u1> info
zonename: u1
zonepath: /oraz1/u1
brand: solaris10
autoboot: false
bootargs:
pool:
limitpriv:
scheduling-class:
ip-type: exclusive
hostid: 11302069
fs-allowed:
anet:
        linkname: net0
        lower-link: auto
        allowed-address not specified
        configure-allowed-address: true
zonecfg:u1> exit

root@UAAIS:~# zonecfg -z sapora1
Use 'create' to begin configuring a new zone.
zonecfg:sapora1> create -t SYSsolaris10
zonecfg:sapora1> set zonepath=/oraz1/sapora1
zonecfg:sapora1> set hostid=11302069
zonecfg:sapora1> info
zonename: sapora1
zonepath: /oraz1/sapora1
brand: solaris10
autoboot: false
bootargs:
pool:
limitpriv:
scheduling-class:
ip-type: exclusive
hostid: 11302069
fs-allowed:
anet:
        linkname: net0
        lower-link: auto
        allowed-address not specified
        configure-allowed-address: true
zonecfg:sapora1> commit
zonecfg:sapora1> exit

root@UAAIS:~# zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              solaris  shared
   - u1               configured /oraz1/u1                      solaris10 excl
   - sapora1          configured /oraz1/sapora1                 solaris10 excl
root@UAAIS:~#

9.Now its time to attach the zones using the *.gz archive files which we have created from solaris 10 global zone.  Let me attach the “u1” local zone first.

root@UAAIS:/hgfs/softvm# ls -lrt
total 2388616
-rwx------   1 root     root          35 Nov 19  2010 HDFC ACC INFO.txt
-rwx------   1 root     root     1032953 Dec 27 20:42 netperf-2.6.0.tar.bz2
drwx------   1 root     root           0 Mar  2 01:13 VMWARE OS
drwx------   1 root     root       32768 Apr  8 18:30 ESOFT
-rwx------   1 root     root     1189860790 Apr  8 18:32 sapora1_img.cpio.gz
-rwx------   1 root     root     1255012037 Apr  8 18:34 u1_img.cpio.gz
root@UAAIS:/hgfs/softvm# cd
root@UAAIS:~#  zoneadm -z u1 attach -a /hgfs/softvm/u1_img.cpio.gz
Progress being logged to /var/log/zones/zoneadm.20140409T092620Z.u1.attach
Log File: /var/log/zones/zoneadm.20140409T092620Z.u1.attach
    Installing: This may take several minutes...
Attach complete.
Log saved in non-global zone as /oraz1/u1/root/var/log/zones/zoneadm.20140409T092620Z.u1.attach
Log File:
root@UAAIS:~# zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              solaris  shared
   - u1               installed  /oraz1/u1                      solaris10 excl
   - sapora1          configured /oraz1/sapora1                 solaris10 excl
root@UAAIS:~#

Let’s attach the second server as well.

root@UAAIS:~#  zoneadm -z sapora1  attach -a /hgfs/softvm/sapora1_img.cpio.gz
The following ZFS file system(s) have been created:
    oraz1/sapora1
Progress being logged to /var/log/zones/zoneadm.20140409T102221Z.sapora1.attach
Log File: /var/log/zones/zoneadm.20140409T102221Z.sapora1.attach
    Installing: This may take several minutes...
Attach complete.
Log saved in non-global zone as /oraz1/sapora1/root/var/log/zones/zoneadm.20140409T102221Z.sapora1.attach
Log File:
root@UAAIS:~#
root@UAAIS:~# zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              solaris  shared
   - u1               installed  /oraz1/u1                      solaris10 excl
   - sapora1          installed  /oraz1/sapora1                 solaris10 excl
root@UAAIS:~#

10.Boot the local zones.

root@UAAIS:~# zoneadm -z u1 boot
root@UAAIS:~# zoneadm -z sapora1 boot

11.Login to zone’s console using “zlogin -C  zone_name” and complete the post installation. After the post configuration phase,local zones will reboot itself to take effect.

root@UAAIS:~# zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              solaris  shared
   9 u1               running    /oraz1/u1                      solaris10 excl
  10 sapora1          running    /oraz1/sapora1                 solaris10 excl
root@UAAIS:~#

That’s all.  We have successfully migrated the solaris 10 local zones from solaris 10 global zone to solaris 11 global zone .(V2V ).

Hope this article is informative to you . Share it ! Comment it !! Be Sociable !!!

VMTURBO-CLOUD-CAPACITY

Leave a Reply

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