In upcoming days,definitely you need to migrate the solaris 10 physical servers as a local zone in solaris 11 global zone if you want to continue to use solaris 10 operating system.These kind of situation rasie due to application incompatibility with high version of operating systems.So you may need to stick with older version of operating system in a order to support the legacy applications. So oracle provides an option to run solaris 10 on solaris 11 physical servers as local zone.Oracle Solaris 11 provides the complete virtualization on networking part and ultimate package administration which was missing on solaris 10. As you know that solaris 11 comes with image packaging system(IPS) and its also supports the legacy packaging system SVR4.
In the previous article ,we have seen that how to install the fresh solaris 10 localzone installation on solaris 11 global zone.But here we will see how to convert the existing solaris 10 physical servers as local zone on solaris 11 global zone.We can also call this operation as physical to virtual (p2v).
Prerequisites:
- Solaris 10 physical server must be running with solaris 10 10/11 update.
- Solaris 11 global zone must have minimum 7Gb of free space for solaris 10 zone installation.(size may vary according to your solaris 10 physical machine root filesystem)
1.Login to solaris 10 physical machine and halt if you have any local zones on it. (zones can’t be migrated to solaris 11 global zone directly).You need to follow V2V method for zone’s migration.
bash-3.00# zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / native shared 1 u1 running /export/zones/u1 native shared 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 bash-3.00#
2.Create the solaris 10 global zone flar . “-x” option is used to exclude other filesystem than root.
bash-3.00# flarcreate -S -n uasol10 -x /hgfs -x /P2VSOL10 -x /export/zones/u1 -L cpio /P2VSOL10/uasol10.flar Archive format requested is cpio This archiver format is NOT VALID for flash installation of ZFS root pool. This format is useful for installing the system image into a zone. Reissue command without -L option to produce an archive for root pool install. Full Flash Checking integrity... Integrity OK. WARNING: fdo: Ignoring duplicate filter entry. Choosen entry will be: /export/zones/u1 - WARNING: fdo: Ignoring duplicate filter entry. Choosen entry will be: /hgfs - WARNING: fdo: Ignoring duplicate filter entry. Choosen entry will be: /P2VSOL10 - Running precreation scripts... Precreation scripts done. Creating the archive... 6918345 blocks Archive creation complete. Running postcreation scripts... Postcreation scripts done. Running pre-exit scripts... Pre-exit scripts done. bash-3.00#
3.Verify the flar image .
bash-3.00# cd /P2VSOL10 bash-3.00# ls -lrt total 584028 -rwx------ 1 root root 598043988 Mar 28 01:50 uasol10.flar bash-3.00#
4.Login to solaris 11 global zone and install the brand package which has explained in this article.(only Step no:4)
5.Copy the flar image which we have created on solaris 10 physical machine to solaris 11 global zone.If possible ,you can also mount the flar image directory as NFS.Here i have manually copied it on /oraz1 location.
6.Create the zone’s configuration for solaris 10.I took the host id from the solaris 10 physical machine.
root@UAAIS:~# zonecfg -z p2vsol10 Use 'create' to begin configuring a new zone. zonecfg:p2vsol10> create -t SYSsolaris10 zonecfg:p2vsol10> set zonepath=/oraz1/p2vsol10 zonecfg:p2vsol10> select anet linkname=net0 zonecfg:p2vsol10:anet> set allowed-address=192.168.2.112/24 zonecfg:p2vsol10:anet> set configure-allowed-address=true zonecfg:p2vsol10:anet> end zonecfg:p2vsol10> set hostid=11302069 zonecfg:p2vsol10> verify zonecfg:p2vsol10> commit zonecfg:p2vsol10> exit root@UAAIS:~# zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / solaris shared 3 uasol10z1 running /oraz1/sol10z1/uasol10z1 solaris10 excl - uaz1 installed /export/zones/uaz1 solaris excl - uaz2 installed /export/zones/uaz2 solaris excl - p2vsol10 configured /oraz1/p2vsol10 solaris10 excl root@UAAIS:~#
7.Install the zone using the flar which we have created from the solaris 10 physical machine.
root@UAAIS:/oraz1# zoneadm -z p2vsol10 install -a /oraz1/uasol10.flar -u The following ZFS file system(s) have been created: oraz1/p2vsol10 Progress being logged to /var/log/zones/zoneadm.20140331T080401Z.p2vsol10.install Installing: This may take several minutes... Postprocessing: This may take a while... Postprocess: The following zones in this image will be unusable: u1 Postprocess: These zonepaths will be extracted but will not be used: Postprocess: /export/zones/u1 Postprocess: Updating the image to run within a zone Result: Installation completed successfully. Log saved in non-global zone as /oraz1/p2vsol10/root/var/log/zones/zoneadm.20140331T080401Z.p2vsol10.install root@UAAIS:/oraz1# zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / solaris shared - uaz1 installed /export/zones/uaz1 solaris excl - uaz2 installed /export/zones/uaz2 solaris excl - uasol10z1 installed /oraz1/sol10z1/uasol10z1 solaris10 excl - p2vsol10 installed /oraz1/p2vsol10 solaris10 excl root@UAAIS:/oraz1#
Here you can see solaris 10 zone has been successfully installed using the flar image.
8.Boot the local zone and login to the zone’s console .If there is any initial configuration is required, just complete the sysconfig wizard.
root@UAAIS:/oraz1# zoneadm -z p2vsol10 boot root@UAAIS:/oraz1# root@UAAIS:~# zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / solaris shared 7 p2vsol10 running /oraz1/p2vsol10 solaris10 excl - uaz1 installed /export/zones/uaz1 solaris excl - uaz2 installed /export/zones/uaz2 solaris excl - uasol10z1 installed /oraz1/sol10z1/uasol10z1 solaris10 excl root@UAAIS:~#
9.You may get below error(couldn’t set locale correctly) if the initial configuration wizard is not completed.Login to zone’s console and complete it .
root@UAAIS:/oraz1# zlogin p2vsol10 [Connected to zone 'p2vsol10' pts/3] Last login: Mon Mar 31 12:15:31 from 192.168.2.1 couldn't set locale correctly couldn't set locale correctly couldn't set locale correctly couldn't set locale correctly couldn't set locale correctly couldn't set locale correctly couldn't set locale correctly couldn't set locale correctly Sun Microsystems Inc. SunOS 5.10 Generic January 2005 # bash bash-3.00# uname -a SunOS p2vsol10 5.10 Generic_Virtual i86pc i386 i86pc bash-3.00#
Issues faced during this migration:
zoneadm install command failed with flar.
root@UAAIS:~# zoneadm -z p2vsol10 install -a /oraz1/uasol10.flar -u The following ZFS file system(s) have been created: oraz1/p2vsol10 Progress being logged to /var/log/zones/zoneadm.20140329T071545Z.p2vsol10.install Installing: This may take several minutes... Postprocessing: This may take a while... Postprocess: The following zones in this image will be unusable: u1 Postprocess: These zonepaths will be extracted but will not be used: Postprocess: /export/zones/u1 Postprocess: Updating the image to run within a zone Postprocess: ERROR: Zone boot failed Postprocess: ERROR: Postprocessing failed. Result: Postprocessing failed. Result: *** Installation FAILED *** Log File: /var/log/zones/zoneadm.20140329T071545Z.p2vsol10.install Log saved in non-global zone as /oraz1/p2vsol10/root/var/log/zones/zoneadm.20140329T071545Z.p2vsol10.install zoneadm: zone 'p2vsol10': NOTICE: installation partially succeeded: zone transitioning to unavailable state root@UAAIS:~# zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / solaris shared 3 uasol10z1 running /oraz1/sol10z1/uasol10z1 solaris10 excl - uaz1 installed /export/zones/uaz1 solaris excl - uaz2 installed /export/zones/uaz2 solaris excl - p2vsol10 unavailable /oraz1/p2vsol10 solaris10 excl root@UAAIS:~#
I have forced the things and able to bring the zone to installed state.
root@UAAIS:~# zoneadm -z p2vsol10 boot zoneadm: zone 'p2vsol10': zone is unavailable; attach suggested. See zoneadm(1M) for other options. root@UAAIS:~# zoneadm -z p2vsol10 attach Progress being logged to /var/log/zones/zoneadm.20140329T074121Z.p2vsol10.attach Log File: /var/log/zones/zoneadm.20140329T074121Z.p2vsol10.attach Converting detached zone boot environment 'zbe-0'. Installing: Using existing zone boot environment Error: this is a system image and not a zone image. Result: Attach Failed. Log saved in non-global zone as /oraz1/p2vsol10/root/var/log/zones/zoneadm.20140329T074121Z.p2vsol10.attach root@UAAIS:~# zoneadm -z p2vsol10 attach -F root@UAAIS:~# zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / solaris shared 3 uasol10z1 running /oraz1/sol10z1/uasol10z1 solaris10 excl - uaz1 installed /export/zones/uaz1 solaris excl - uaz2 installed /export/zones/uaz2 solaris excl - p2vsol10 installed /oraz1/p2vsol10 solaris10 excl root@UAAIS:~#
But when i tried to boot , i got the following errors .
root@UAAIS:~# zoneadm -z p2vsol10 boot zone 'p2vsol10': Error: The installed version of Solaris 10 is not supported. zone 'p2vsol10': SPARC systems require patch 142909-17 zone 'p2vsol10': x86/x64 systems require patch 142910-17 zone 'p2vsol10': /usr/lib/brand/solaris10/s10_boot p2vsol10 /oraz1/p2vsol10 failed zone 'p2vsol10': cannot unmount '/oraz1/p2vsol10/root': Device busy zone 'p2vsol10': ERROR: unable to unmount /oraz1/p2vsol10/root. zone 'p2vsol10': ERROR: Unable to mount zone root dataset. zoneadm: zone 'p2vsol10': call to zoneadmd failed root@UAAIS:~#
I have blindly started the migration without checking the prerequisites. My solaris 10 physical servers was running on solaris 10 10/09 as it supposed to be update 11.Then i have just install the missing patches which have showing in error and created the new flar.
- 142934-02 – Prerequisite patch for 142910-17
- 142912-01 – Prerequisite patch for 142910-17
- 142910-17 – Prerequisite patch for P2V migration
In my second attempt also failed due to insufficient disk space.Here you can see the errors.
root@UAAIS:/oraz1# zoneadm -z p2vsol10 install -a /oraz1/uasol10.flar -u The following ZFS file system(s) have been created: oraz1/p2vsol10 Progress being logged to /var/log/zones/zoneadm.20140331T071607Z.p2vsol10.install Installing: This may take several minutes... ERROR: Unable to create directory /oraz1/p2vsol10/root/dev. zoneadm: zone 'p2vsol10': ERROR: installation failed: zone returning to configured state The following ZFS file systems are being removed: oraz1/p2vsol10 root@UAAIS:/oraz1#
I just came to know by looking the logs generated by zoneadm command.
root@UAAIS:/oraz1# tail -100 /var/log/zones/zoneadm.20140331T071607Z.p2vsol10.install |more cpio: Cannot open/create .gconf/apps/panel, errno 28, No space left on device cpio: Cannot open/create .gconf/apps/panel/%gconf.xml, errno 28, No space left on device cpio: Cannot open/create .gconf/apps/panel/profiles, errno 28, No space left on device cpio: Cannot open/create .gconf/apps/panel/profiles/default, errno 28, No space left on device cpio: Cannot open/create .gconf/apps/panel/profiles/default/general, errno 28, No space left on device
Hope this article will help you to make the solaris 10 physical servers as local zones on solaris 11 global zone.Please leave a comment if you have any issue on this migration.
Share it ! Comment it!! Be sociable !!!
Sergio says
Hello
Thanks for share your knowledge, I´m executing it in a test environment and the zone is installed successfully. However when I did a login into zone, I have two situations:
1. The following message is showed:
couldn’t set locale correctly
couldn’t set locale correctly
couldn’t set locale correctly
I did a “Zlogin -C zonename”, but nothing is showed in zone console. Do you know what other thing can I try to fix it?
2. When I checked the services into zone, I saw only 24 services online:
bash-3.2# svcs -a | wc -l
188
bash-3.2# svcs -a | grep online | wc -l
24
bash-3.2# svcs -a | grep offline | wc -l
51
bash-3.2# svcs -a | grep disable | wc -l
62
bash-3.2# svcs -a | grep uninitialized | wc -l
50
bash-3.2#
I tried svcs -x but doesnt works:
bash-3.2# svcs -x
svcs: svcs.c:335: Unexpected libscf error: invalid argument. Exiting.
bash-3.2#
Do you know if its behavior is normal? on S10 physical source system I saw:
bash-3.2# svcs -a | wc -l
251
bash-3.2# svcs -a | grep offline | wc -l
3
bash-3.2# svcs -a | grep online | wc -l
114
bash-3.2#
I tried enable sendmail service on zone but it doesnt works:
bash-3.2# svcs sendmail
STATE STIME FMRI
offline 13:34:31 svc:/network/smtp:sendmail
bash-3.2# svcadm enable sendmail
bash-3.2# svcs sendmail
STATE STIME FMRI
offline 13:34:31 svc:/network/smtp:sendmail
bash-3.2#
Thanks in advance for your suggestions..
susheelkumar says
Hello
thanks for the article its great and appreaciate kind of job updating the article
need help i am running my solaris machine on vmware its s09 need to update and migrate to solaris 11 could please share the patches for x86 matchine
142934-02 – Prerequisite patch for 142910-17
142912-01 – Prerequisite patch for 142910-17
142910-17 – Prerequisite patch for P2V
thanks in advance 🙂
Henry says
Regarding ‘couldn’t set locale correctly’, did “localeadm -l -v” show any missing packages ?