S11 ZONES
From pressy's brainbackup
ZONES with Solaris 11
There are a lot of new zone/container features in solaris 11, a reason for an own section. My notes for solaris 10 will be here: Zones
solaris10 branded zones
I had a Solaris 10 LDOM on my system and moved it into a zone on the LDOM manager solaris 11 domain:
<sol11ldom> # scp `which zonep2vchk` <to_sol10> <sol10># ./zonep2vchk --Executing Version: 1.0.5-11-17871 - Source System: sol10-test01 Solaris Version: Oracle Solaris 10 1/13 s10s_u11wos_24a SPARC Solaris Kernel: 5.10 Generic_148888-05 Platform: sun4v sun4v - Target System: Solaris Version: Solaris 10 Zone Brand: native (default) IP type: shared --Executing basic checks - The following SMF services will not work in a zone: svc:/network/iscsi/initiator:default svc:/system/iscsitgt:default - The following SMF services require ip-type "exclusive" to work in a zone. If they are needed to support communication after migrating to a shared-IP zone, configure them in the destination system's global zone instead: svc:/network/ipsec/ipsecalgs:default svc:/network/ipsec/policy:default svc:/network/routing-setup:default - When migrating to an exclusive-IP zone, the target system must have an available physical interface for each of the following source system interfaces: vnet0 - When migrating to an exclusive-IP zone, interface name changes may impact the following configuration files: /etc/hostname.vnet0 Basic checks complete. Issue(s) detected: 7 --Total issue(s) detected: 7 <sol10># <sol10># flarcreate -S -n sol10u11 -L cpio /net/192.168.56.10/downloads/sol10u11-migrate.flar Archive format requested is cpio Full Flash Checking integrity... Integrity OK. Running precreation scripts... Precreation scripts done. Creating the archive... 12135167 blocks Archive creation complete. Running postcreation scripts... Postcreation scripts done. Running pre-exit scripts... Pre-exit scripts done. <sol10>#
<sol11ldom> # zonecfg -z sol10zone Use 'create' to begin configuring a new zone. zonecfg:sol10zone> create -t SYSsolaris10 zonecfg:sol10zone> set zonepath=/zones/sol10zone zonecfg:sol10zone> set ip-type=exclusive zonecfg:sol10zone> add anet zonecfg:sol10zone:anet> set lower-link=net0 zonecfg:sol10zone:anet> end zonecfg:sol10zone> set hostid=84axx5xx zonecfg:sol10zone> verify zonecfg:sol10zone> commit zonecfg:sol10zone> exit <sol11ldom> # <sol11ldom> # zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / solaris shared - sol10zone configured /zones/sol10zone solaris10 excl <sol11ldom> # zoneadm -z sol10zone install -u -a /downloads/sol10u11-migrate.flar The following ZFS file system(s) have been created: data/zones/sol10zone Progress being logged to /var/log/zones/zoneadm.20130702T164816Z.sol10zone.install Installing: This may take several minutes... Postprocessing: This may take a while... Postprocess: Updating the image to run within a zone Postprocess: Migrating data from: data/zones/sol10zone/rpool/ROOT/zbe-0 to: data/zones/sol10zone/rpool/export Postprocess: A backup copy of /export is stored at /export.backup.20130702T165145Z. It can be deleted after verifying it was migrated correctly. Postprocess: Migrating data from: data/zones/sol10zone/rpool/ROOT/zbe-0 to: data/zones/sol10zone/rpool Postprocess: A backup copy of /rpool is stored at /rpool.backup.20130702T165147Z. It can be deleted after verifying it was migrated correctly. Result: Installation completed successfully. Log saved in non-global zone as /zones/sol10zone/root/var/log/zones/zoneadm.20130702T164816Z.sol10zone.install <sol11ldom> # <-------- took around 5-7 minutes on my T5-2 <sol11ldom> # zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / solaris shared - sol10zone installed /zones/sol10zone solaris10 excl <sol11ldom> # zoneadm -z sol10zone boot <sol11ldom> # zlogin -C sol10zone [Connected to zone 'sol10zone' console] Select a Language 0. English 1. de Please make a choice (0 - 1), or press h or ? for help: 0 [...]
For any strange reason there was a localization issue inside the solaris 10 branded zone, like a inherited locale from the sol11 host:
pressy@PRESSY-mac ~ % ssh -l root 192.168.56.12 Password: Last login: Tue Jul 2 20:06:30 2013 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 Oracle Corporation SunOS 5.10 Generic Patch January 2005 Sourcing //.profile-EIS..... root@sol10zone # root@sol10zone # exit Connection to 192.168.56.12 closed.
No differences defining the locales in /etc/default/init of setting $LC_ALL/$LC_*. I am in Austria, but my English Solaris 11 used "en_US.UTF-8", not "C" like Solaris 10; and it seems to try taking the locales from the login source... (?) No clue if I am right, but I could fix this issue by installing additional USA language packs:
root@sol10zone # uname -a SunOS sol10zone 5.10 Generic_Virtual sun4v sparc sun4v root@sol10zone # lofiadm -a `pwd`/sol-10-u11-ga-sparc-dvd.iso | xargs -I {} mount -F hsfs -o ro {} /mnt root@sol10zone # localeadm -a nam -m -d /mnt <-- nam = north america