A few days back i had a need to rename my Solaris zones from "orazone" to "oraprodzone". I followed the below steps to successfully rename my zone's name. STEP 1: Shutdown the zone "orazone" Issue the following commands from the globalzone to shutdown orazone. globalzone# zoneadm list -iv ID NAME STATUS PATH 0 global running / 2 orazone running /zones/orazone globalzone# zoneadm -z orazone halt globalzone# zoneadm list -iv ID NAME STATUS PATH 0 global running / - orazone installed /zones/orazone globalzone# STEP 2: Rename the Zone from "orazone" to "oraprodzone" Enter zone configuration from the global zone using the below mentioned commands. globalzone# zonecfg -z orazone zonecfg:orazone> set zonename=oraprodzone zonecfg:orazone> commit zonecfg:orazone> exit globalzone# zoneadm list -vc ID NAME STATUS PATH BRAND 0 global running / native - oraprodzone installed /zones/orazone native STEP 3: Boot the zone After you have made the above changes, boot the zone from the global zone using
the below commands. globalzone# zoneadm -z oraprodzone boot globalzone# zoneadm list -iv ID NAME STATUS PATH 0 global running / 2 orazone running /zones/orazone Done! There is another way to rename a zone (not supported, but it worked for me), but then that's not the right one though. However, i would mention that as well. Renaming zone orazone to oraprodzone Perform all of the below as root of global zone. First shutdown your orazone zone globalzone# zoneadm -z orazone halt globalzone# vi /etc/zones/index change orazone to oraprodzone globalzone# cd /etc/zones globalzone# mv orazone.xml oraprodzone.xml globalzone# vi oraprodzone.xml change orazone to oraprodzone globalzone# cd /zones -/zones is where I have stored all the zones globalzone# mv orazone oraprodzone -cd to your new zone (/zones/oraprodzone)and modify /etc/hosts, /etc/nodename, /etc/hostname.xxx
globalzone# cd /zones/oraprodzone/root/etc -boot new renaming zone globalzone# zoneadm -z oraprodzone boot Feel free to leave a comment :)
T h u r s d a y, J u l y 1 0 , 2 0 0 8
Oracle 9i on a Solaris 9 Container using Soalris Zones Hi Folks, I have successfully managed to installed and run Oracle 9i on this Solaris 9 Container that i just installed using Solaris Zones. I followed the standard install process and i didnt encounter anything unusual. The system maintains its own /etc/system file, all i did was added the below mentioned parameters in it, rebooted the zone and installed Oracle 9i on it. However i just created a sample database by the name of vishal on the system. I will work on this more and will post some feedback and how-to's here. Info /etc/system set shmsys:shminfo_shmmax=4294967295 set shmsys:shminfo_shmmin=1 set shmsys:shminfo_shmmni=100 set shmsys:shminfo_shmseg=10 set semsys:seminfo_semmni=100 set semsys:seminfo_semmsl=410 set semsys:seminfo_semmns=1410 set semsys:seminfo_semopm=100 set semsys:seminfo_semvmx=32767 solaris9-zone # ps -ef | grep pmon
root 28570 28564 0 11:17:28 pts/2 0:00 grep pmon oracle 22418 5325 0 Jun 26 ? 3:07 ora_pmon_vishal solaris9-zone # uname -a SunOS solaris9 5.9 Generic_Virtual sun4u sparc SUNW,Sun-Fire-280R solaris9-zone # isainfo -kv 64-bit sparcv9 kernel modules Feel free to comment, if you have anything to add. Posted by Vishal Sharma at 8:15 PM 0 comments Labels: Zones S u n d a y, J u n e 2 2 , 2 0 0 8
Step By Step Guide ~ How to Install Solaris 9 as a container on a Solaris 10 System Using Zones Hello folks, I finally managed to successfully install a Solaris 9 Container Zone on my Solaris 10 System. I would like to share the relevant information here. MY HARDWARE Sun Fire 280R (2 x Ultra SPARC III+ at 1200MHz, 6GB RAM, 2 x 80GB HDD) 5 network interfaces - eri0, ce0, ce1, ce2, ce3 though i used only eri0 and ce0. Remaining, i will use later as and when the need arises. MY SOFTWARE Solaris 10 OS - Update 5 (downloaded from sun.com and burned this sol-10-u5-gasparc-dvd.iso on a DVDROM) Solaris 9.0 Container Application - (downloaded from sun.com this file named s9containers-1_0-rr-solaris10-sparc.tar.gz)
Solaris 9.0 OS Image file - (downloaded from sun.com this file named - solaris9image.flar) MY OBJECTIVE To install Solaris 9 OS as a container on a Solaris 10 zone. We have some native apps on Solaris 9, so i need to check if that would work fine. STEPS I FOLLOWED STEP 1 - Solaris 10 OS Installation on the System Installed Solaris 10 update 5 on my Sun Fire 280R. Chose Entire Distribution and allocated my second 80GB HDD only for storing Zone data. So i formatted and mounted /zones on my second hard disk c1t1d0s2. I dedicated my first disk (c1t0d0) to run Solaris 10 exclusively. Installation was successful without a hitch. Below is my install configuration hostname - sol10 ip address - 10.10.8.46/24 (on eri0 interface) plumbed my ce0 interface so that i can dedicate this to my solaris 9 zone that i would be creating in the next step. globalzone # cat /etc/release Solaris 10 5/08 s10s_u5wos_10 SPARC Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 24 March 2008 globalzone #ifconfig ce0 plumb STEP 2 - Install Solaris 9 Container Application 1.0 I uploaded the file s9containers-1_0-rr-solaris10-sparc.tar.gz to my home directory.
Followed by which i gave the below commands to install the application. globalzone # gunzip s9containers-1_0-rr-solaris10-sparc.tar.gz globalzone # tar -xvf s9containers-1_0-rr-solaris10-sparc.tar globalzone # cd ./s9containers-1_0-rr/Product globalzone # pkgadd -d ./ The following packages are available: 1 SUNWs9brandk Solaris 9 Containers: solaris9 brand support RTU (sparc) 11.10.0,REV=2008.04.24.03.37 2 SUNWs9brandr Solaris 9 Containers: solaris9 brand support (Root) (sparc) 11.10.0,REV=2008.04.24.03.37 3 SUNWs9brandu Solaris 9 Containers: solaris9 brand support (Usr) (sparc) 11.10.0,REV=2008.04.24.03.37 Select package(s) you wish to process (or 'all' to process all packages). (default: all) [?,??,q]: (select all and accept all the default parameters. the installation was successful.) STEP 3 - Create Solaris 9 branded zone After the system booted, i followed the below commands to create a branded solaris 9 zone. globalzone # zonecfg -z solaris9 solaris9: No such zone configured Use 'create' to begin configuring a new zone. zonecfg:solaris9> create -b zonecfg:solaris9> set brand=solaris9 zonecfg:solaris9> set autoboot=false zonecfg:solaris9> set zonepath=/zones/solaris9 zonecfg:solaris9> add net zonecfg:solaris9:net> set physical=ce0 zonecfg:solaris9:net> set address=10.10.8.91/24 zonecfg:solaris9:net> end
zonecfg:solaris9> info zonename: solaris9 zonepath: /zones/solaris9 brand: solaris9 autoboot: false bootargs: pool: limitpriv: scheduling-class: ip-type: shared net: address: 10.10.8.91/24 physical: ce0 zonecfg:solaris9> verify zonecfg:solaris9> commit zonecfg:solaris9> exit STEP 4 - Installed Solaris 9 on the Branded Zone I uploaded the file solaris9-image.flar to my home directory and performed the below commands to Install solaris 9 zone. globalzone # zoneadm -z solaris9 install -u -a /export/home/vishal/solaris9image.flar Log File: /var/tmp/solaris9.install.846.log Source: /export/home/vishal/solaris9-image.flar Installing: This may take several minutes...
Postprocessing: This may take several minutes... Result: Installation completed successfully. Log File: /zones/solaris9/root/var/log/solaris9.install.846.log globalzone # globalzone # globalzone # zoneadm list -cv
ID NAME STATUS PATH BRAND IP 0 global running / native shared - solaris9 installed /zones/solaris9 solaris9 shared globalzone # cat /var/tmp/solaris9.install.846.log [Mon Jun 23 12:09:03 SGT 2008] Log File: /var/tmp/solaris9.install.846.log [Mon Jun 23 12:09:03 SGT 2008] Product: Solaris 9 Containers 1.0 [Mon Jun 23 12:09:03 SGT 2008] Installer: solaris9 brand installer 1.21 [Mon Jun 23 12:09:03 SGT 2008] Zone: solaris9 [Mon Jun 23 12:09:03 SGT 2008] Path: /zones/solaris9 [Mon Jun 23 12:09:03 SGT 2008] Starting pre-installation tasks. [Mon Jun 23 12:09:03 SGT 2008] Installation started for zone "solaris9" [Mon Jun 23 12:09:03 SGT 2008] Source: /export/home/vishal/solaris9-image.flar [Mon Jun 23 12:09:03 SGT 2008] Media Type: flash archive [Mon Jun 23 12:09:03 SGT 2008] Installing: This may take several minutes... [Mon Jun 23 12:09:03 SGT 2008] cd /zones/solaris9/root && [Mon Jun 23 12:09:03 SGT 2008] do_flar < "/export/home/vishal/solaris9image.flar" [Mon Jun 23 12:13:58 SGT 2008] Sanity Check: Passed. Looks like a Solaris 9 system. [Mon Jun 23 12:13:58 SGT 2008] Postprocessing: This may take several minutes... [Mon Jun 23 12:13:58 SGT 2008] running: p2v -u solaris9 [Mon Jun 23 12:13:58 SGT 2008] Postprocess: Gathering information about zone solaris9 [Mon Jun 23 12:13:58 SGT 2008] Postprocess: Creating mount points [Mon Jun 23 12:13:58 SGT 2008] Postprocess: Processing /etc/system [Mon Jun 23 12:13:58 SGT 2008] Postprocess: Booting zone to single user mode [Mon Jun 23 12:14:11 SGT 2008] Postprocess: Applying p2v module S20_apply_patches [Sun Jun 22 21:14:12 PDT 2008] S20_apply_patches: Unpacking patch: 115986-03 [Sun Jun 22 21:14:12 PDT 2008] S20_apply_patches: Installing patch: 115986-03 Checking installed patches... Verifying sufficient filesystem capacity (dry run method)... Installing patch packages...
Patch number 115986-03 has been successfully installed. See /var/sadm/patch/115986-03/log for details Patch packages installed: SUNWesu SUNWesxu [Sun Jun 22 21:14:29 PDT 2008] S20_apply_patches: Unpacking patch: 112963-32 [Sun Jun 22 21:14:29 PDT 2008] S20_apply_patches: Installing patch: 112963-32 Checking installed patches... Patch 112963-32 has already been applied. See patchadd(1M) for instructions. Patchadd is terminating. [Mon Jun 23 12:14:33 SGT 2008] Postprocess: Applying p2v module S31_fix_net [Mon Jun 23 12:14:33 SGT 2008] Postprocess: Applying p2v module S32_fix_nfs [Mon Jun 23 12:14:34 SGT 2008] Postprocess: Applying p2v module S33_fix_vfstab [Mon Jun 23 12:14:34 SGT 2008] Postprocess: Applying p2v module S34_fix_inittab [Mon Jun 23 12:14:34 SGT 2008] Postprocess: Applying p2v module S35_fix_crontab [Mon Jun 23 12:14:34 SGT 2008] Postprocess: Applying p2v module S36_fix_pam_conf [Mon Jun 23 12:14:34 SGT 2008] Postprocess: Applying p2v module S40_setup_preload [Mon Jun 23 12:14:35 SGT 2008] Postprocess: Performing zone sys-unconfig [Mon Jun 23 12:15:00 SGT 2008] Postprocess: Postprocessing successful. [Mon Jun 23 12:15:00 SGT 2008] Result: Postprocessing complete. [Mon Jun 23 12:15:01 SGT 2008] Service Tag: Gathering information about zone solaris9 [Mon Jun 23 12:15:01 SGT 2008] Service Tag: Adding service tag: urn:st:f703f24418f1-cf25-a9db-fdd4ea20ffe6 Solaris 9 Containers 1.0 added Product instance URN=urn:st:f703f244-18f1-cf25-a9db-fdd4ea20ffe6 [Mon Jun 23 12:15:01 SGT 2008] Service Tag: Operation successful. [Mon Jun 23 12:15:01 SGT 2008]
[Mon Jun 23 12:15:01 SGT 2008] Result: Installation completed successfully. [Mon Jun 23 12:15:01 SGT 2008] Log File: /zones/solaris9/root/var/log/solaris9.install.846.log globalzone # STEP 5 - Configuring the Solaris 9 zone Configuration process involves booting your zone, setting up your hostname, IP Address Configuration, TimeZone Settings, Naming Configuration etc. globalzone # zoneadm -z solaris9 boot globalzone # zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / native shared 3 solaris9 running /zones/solaris9 solaris9 shared globalzone # zlogin -C solaris9 [zlogin solaris console] After this you will be asked to set up your hostname, IP Address, TimeZone Settings, Naming Configuration etc. After successfully completing this, the zone would reboot. After the system has rebooted, you are all set to go. globalzone # zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / native shared 3 solaris9 running /zones/solaris9 solaris9 shared globalzone #
SOME QUICK TESTS I PERFORMED After all this, i was able to connect to my Solaris 9 container that i just created using SSH. Just to test out, i performed the following commands -
solaris9-zone # uname -a SunOS solaris9 5.9 Generic_Virtual sun4u sparc SUNW,Sun-Fire-280R solaris9-zone # cat /etc/release Solaris 9 9/05 HW s9s_u9wos_06b SPARC Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 25 September 2006 solaris9-zone # df -h Filesystem size used avail capacity Mounted on / 67G 1.9G 65G 3% / /.SUNWnative/lib 9.6G 162M 9.4G 2% /.SUNWnative/lib /.SUNWnative/platform 9.6G 162M 9.4G 2% /.SUNWnative/platform /.SUNWnative/usr 29G 3.1G 25G 11% /.SUNWnative/usr /dev 67G 1.9G 65G 3% /dev proc 0K 0K 0K 0% /proc mnttab 0K 0K 0K 0% /etc/mnttab swap 11G 16K 11G 1% /etc/svc/volatile /dev/ksyms 29G 3.1G 25G 11% /dev/ksyms fd 0K 0K 0K 0% /dev/fd swap 11G 0K 11G 0% /tmp solaris9-zone # psrinfo 0 on-line since 06/23/2008 11:52:30 1 on-line since 06/23/2008 11:52:31 solaris9-zone # I hope the above would be useful to you guys. Do feel free to comment, if you happen to have any questions. Posted by Vishal Sharma at 9:41 PM 0 comments Labels: Zones S a t u r d a y, J u n e 2 1 , 2 0 0 8
Installing Solaris 9 Zone on a Solaris 10 System
Hello Folks, I am now working on doing a Solaris 9 OS install on a Solaris 10 system using Solaris 10 Zones. If you dont know already know, Solaris 10 can run container versions of Solaris 8 and 9 within a Solaris 9. There are some specific applications that you need to install on your global zone to make it work. From what all i have read so far, all that is needed is a Solaris 9.0 Container Software 1.0 and Solaris 9 install image. You can download both from the Sun Download website. Also make sure that the version of Solaris ten is Update 4 or above. I will be illustrating the procedure with Update 5 release. Stay tuned.... Posted by Vishal Sharma at 9:41 PM 0 comments Labels: Zones W e d n e s d a y, J u n e 1 8 , 2 0 0 8
Step By Step Guide ~ How to Change Zone Network Parameters I would presume here that the zone is already created and i would detail out the process to change an "existing" zone's network parameters. Please Note - The network parameters can be changed without halting the zone. But the changes would only take affect after the zone is rebooted. So be careful with this part. Before you can use any network interface on a local zone, that interface must be plumbed first (e.g. ifconfig plumb, on the global zone) in the global zone. If no network address is assigned on the global zone to that interface, its default address will be set to inet 0.0.0.0 netmask 0. Objective - To change network properties of zone "ora9" FROM Interface - ce0 IP Address - 10.10.10.8/24 TO Interface - ce1 IP Address - 10.10.10.11/24
STEP 1 - Use zoneadm list on the global zone to show status of zones on your system. On the global zone, use the zoneadm list -cv to show current status of all installed zones. In the illustration below, i have two zones installed, one being ora9 and another being ora8 globalzone# zoneadm list -cv ID NAME STATUS PATH 0 global running / 1 ora9 running /zone/ora9 - ora8 configured /zone/ora8 globalzone# Note: You may also use zoneadm -z list -v to verify the specific zone status. STEP 2 - Use zonecfg -z to enter the zone modifying environment On the global zone, use the zonecfg -z to enter the zone configuration environment. The enviromental prompt "zonecfg:" will display. Use info in the zone configuration environment to verify the network values. globalzone# zonecfg -z ora9 zonecfg:ora9> info zonepath: /zone/ora9 autoboot: true pool: inherit-pkg-dir: dir: /lib inherit-pkg-dir: dir: /platform
inherit-pkg-dir: dir: /sbin inherit-pkg-dir: dir: /usr net: address: 10.10.10.8/24 physical: ce0 zonecfg:ora9> STEP 3 - Use set address= and set physical= to change the network address and physical interface. Use set address= and set physical= in the zone configuration environment . zonecfg:ora9:net> set address=10.10.10.11/24 zonecfg:ora9:net> set physical=ce1 zonecfg:ora9:net> info net: address: 10.10.10.11/24 physical: ce1 zonecfg:ora9:net> end zonecfg:ora9> verify zonecfg:ora9> info zonepath: /zone/ora9 autoboot: true pool: inherit-pkg-dir: dir: /lib inherit-pkg-dir: dir: /platform inherit-pkg-dir: dir: /sbin inherit-pkg-dir: dir: /usr net: address: 10.10.10.8/24
physical: ce0 net: address: 10.10.10.11/24 physical: ce1 zonecfg:ora9> remove net address=10.10.10.8/24 zonecfg:ora9> info zonepath: /zone/ora9 autoboot: true pool: inherit-pkg-dir: dir: /lib inherit-pkg-dir: dir: /platform inherit-pkg-dir: dir: /sbin inherit-pkg-dir: dir: /usr net: address: 10.10.10.11/24 physical: ce1 zonecfg:ora9> commit zonecfg:ora9> The zone does not require a reboot for this parameter to take place as the zone will use the new value if it is halted. Note: * If you set the autoboot resource property in a zone’s configuration to true, that zone is automatically booted when the global zone is booted. The default setting is false. * for the zones to autoboot, the zones service svc:/system/zones:default must also be enabled. STEP 4 - Use remove net address= to remove the old network values. Use exit in the environment to save the changes and leave the zone configuration
environment. zonecfg:ora9> info zonepath: /zone/ora9 autoboot: true pool: inherit-pkg-dir: dir: /lib inherit-pkg-dir: dir: /platform inherit-pkg-dir: dir: /sbin inherit-pkg-dir: dir: /usr net: address: 10.10.10.8/24 physical: ce0 net: address: 10.10.10.11/24 physical: ce1 zonecfg:ora9> remove net address=10.10.10.8/24 zonecfg:ora9> info zonepath: /zone/ora9 autoboot: true pool: inherit-pkg-dir: dir: /lib inherit-pkg-dir: dir: /platform inherit-pkg-dir: dir: /sbin inherit-pkg-dir: dir: /usr net: address: 10.10.10.11/24 physical: ce1
zonecfg:ora9> commit zonecfg:ora9> Note: Performing either remove net address= or remove net physical= will delete both network parameters. You do not nor can you perform both command after you have issue one of them. STEP 5 - Use commit and exit to save the changes to the parameter Use commit and exit in the environment to save the changes and leave the zone configuration environment. zonecfg:ora9> verify zonecfg:ora9> commit zonecfg:ora9> exit globalzone# Use zoneadm -z halt followed by zoneadm -z boot The new network parameters will not come into force until the zone is booted. Use zoneadm -z halt to halt the zone. Then use zoneadm -z boot to start the zone with the new network parameters. globalzone# ifconfig -a lo0: flags=2001000849 mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 lo0:1: flags=2001000849 mtu 8232 index 1 zone ora9 inet 127.0.0.1 netmask ff000000 ce0: flags=1000843 mtu 1500 index 2 inet 10.10.10.14 netmask ffffff00 broadcast 10.10.10.255 ether [removed]
ce0:1: flags=1000843 mtu 1500 index 2 zone ora9 inet 10.10.10.8 netmask ffffff00 broadcast 10.10.10.255 ce1: flags=1000843 mtu 1500 index 3 inet 10.10.10.15 netmask ffffff00 broadcast 10.10.10.255 ether [removed] globalzone# zoneadm -z ora9 halt globalzone# ifconfig -a lo0: flags=2001000849 mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 ce0: flags=1000843 mtu 1500 index 2 inet 10.10.10.14 netmask ffffff00 broadcast 10.10.10.255 ether [removed] ce1: flags=1000843 mtu 1500 index 3 inet 10.10.10.15 netmask ffffff00 broadcast 10.10.10.255 ether [removed] globalzone# zoneadm -z ora9 boot globalzone# ifconfig -a lo0: flags=2001000849 mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 lo0:1: flags=2001000849 mtu 8232 index 1 zone ora9 inet 127.0.0.1 netmask ff000000 ce0: flags=1000843 mtu 1500 index 2 inet 10.10.10.14 netmask ffffff00 broadcast 10.10.10.255 ether [removed] ce1: flags=1000843 mtu 1500 index 3 inet 10.10.10.15 netmask ffffff00 broadcast 10.10.10.255 ether [removed] ce1:1: flags=1000843 mtu 1500 index 3 zone ora9 inet 10.10.10.11 netmask ffffff00 broadcast 10.10.10.255
globalzone# Posted by Vishal Sharma at 1:26 AM 0 comments Labels: Zones Tu e s d a y, M a y 2 0 , 2 0 0 8
Solaris Zones - Introduction Solaris 10 has this excellent new feature called Zones. I was looking forward to this feature since a long time. I guess Sun was pretty late in implementing this technology on Solaris Platform. Earlier on i had worked with BSD Jails. However its implementation was a lil tricky. But in Solaris its all the more easier and involves fewer steps to quickly make it up and running. Below are some notes that i have compiled. It should give you a fair understanding of Solaris Zones. Features: 1. Its Virtualization - i.e. VMWare, BSD Jails 2. As of now, they can host only instances of Solaris. Not other OSs. 3. Limit of 8192 zones per Solaris system 4. Primary zone (also called global zone) has access to ALL zones 5. Non-global zones, do NOT have access to other non-global zones 6. Default non-global zones derive packages from global zone 7. Program isolation - zone1(Apache), zone2(MySQL) 8. Provides 'z' commands to manage zones: zlogin, zonename, zoneadm,zonecfg ###Features of GLOBAL zone### 1. Solaris ALWAYS boots(cold/warm) to the global zone 2. Knows about ALL hardware devices attached to the system 3. Knows about ALL non-global zones ###Features of NON-GLOBAL zones### 1. Installed at a location on the filesystem of the GLOBAL zone 'zone root path' /export/home/zones/{zone1,zone2,zone3,...} 2. Share packages with GLOBAL zone 3. Manage distinct hostname and tables files
4. Cannot communicate with other non-global zones by default. NIC must be used, which means, use standard network API(TCP) 5. GLOBAL zone admin. can delegate non-global zone administration ###Zone Configuration### Use: zonecfg - to configure zones Note: zonecfg can be run: interactively, non-interactively, command-file modes Requirements for non-global zones: 1. hostname 2. zone root path. i.e. /export/home/zones/testzone1 3. IP address - bound to logical or physical interface Zone Types: 1. Sparse Root Zones - share key files with global zone 2. Whole Root Zones - require more storage Steps for configuring non-global zone: 1. mkdir /export/home/zones/testzone1 && chmod 700 /export/home/zones/testzone1 2. zonecfg -z testzone1 3. create 4. set zonepath=/export/home/zones/testzone1 - sets root of zone 5. add net ; set address=192.168.1.60 6. set physical=e1000g0 7. (optional) set autoboot=true - testzone1 will be started when system boots 8. (optional) add attr ; set name=comment; set type=string; set value="TestZone1" 9. verify zone - verifies zone for errors 10. commit changes - commit 11. Zone Installation - zoneadm -z testzone1 install - places zone, 'testzone1' into 'installed' state. NOT ready for production 12. zoneadm -z testzone1 boot - boots the zone, changing its state ###Zlogin - is used to login to zones### Note: each non-global zone maintains a console. Use 'zlogin -C zonename' after
installing zone to complete zone configuration Note: Zlogin permits login to non-global zone via the following: 1. Interactive - i.e. zlogin -l username zonename 2. Non-interactive - zlogin options command 3. Console mode - zlogin -C zonename 4. Safe mode - zlogin -S zoneadm -z testzone1 reboot - reboots the zone zlogin testzone1 shutdown
I would presume here that the zone is already created and i would detail out the process to change an "existing" zone's network parameters. Please Note - The network parameters can be changed without halting the zone. But the changes would only take affect after the zone is rebooted. So be careful with this part. Before you can use any network interface on a local zone, that interface must be plumbed first (e.g. ifconfig plumb, on the global zone) in the global zone. If no network address is assigned on the global zone to that interface, its default address will be set to inet 0.0.0.0 netmask 0. Objective - To change network properties of zone "ora9" FROM Interface - ce0 IP Address - 10.10.10.8/24 TO Interface - ce1 IP Address - 10.10.10.11/24
STEP 1 - Use zoneadm list on the global zone to show status of zones on your system.
On the global zone, use the zoneadm list -cv to show current status of all installed zones. In the illustration below, i have two zones installed, one being ora9 and another being ora8 globalzone# zoneadm list -cv ID NAME STATUS PATH 0 global running / 1 ora9 running /zone/ora9 - ora8 configured /zone/ora8 globalzone# Note: You may also use zoneadm -z list -v to verify the specific zone status. STEP 2 - Use zonecfg -z to enter the zone modifying environment On the global zone, use the zonecfg -z to enter the zone configuration environment. The enviromental prompt "zonecfg:" will display. Use info in the zone configuration environment to verify the network values. globalzone# zonecfg -z ora9 zonecfg:ora9> info zonepath: /zone/ora9 autoboot: true pool: inherit-pkg-dir: dir: /lib inherit-pkg-dir: dir: /platform inherit-pkg-dir: dir: /sbin inherit-pkg-dir: dir: /usr
net: address: 10.10.10.8/24 physical: ce0 zonecfg:ora9> STEP 3 - Use set address= and set physical= to change the network address and physical interface. Use set address= and set physical= in the zone configuration environment . zonecfg:ora9:net> set address=10.10.10.11/24 zonecfg:ora9:net> set physical=ce1 zonecfg:ora9:net> info net: address: 10.10.10.11/24 physical: ce1 zonecfg:ora9:net> end zonecfg:ora9> verify zonecfg:ora9> info zonepath: /zone/ora9 autoboot: true pool: inherit-pkg-dir: dir: /lib inherit-pkg-dir: dir: /platform inherit-pkg-dir: dir: /sbin inherit-pkg-dir: dir: /usr net: address: 10.10.10.8/24 physical: ce0 net: address: 10.10.10.11/24 physical: ce1
zonecfg:ora9> remove net address=10.10.10.8/24 zonecfg:ora9> info zonepath: /zone/ora9 autoboot: true pool: inherit-pkg-dir: dir: /lib inherit-pkg-dir: dir: /platform inherit-pkg-dir: dir: /sbin inherit-pkg-dir: dir: /usr net: address: 10.10.10.11/24 physical: ce1 zonecfg:ora9> commit zonecfg:ora9> The zone does not require a reboot for this parameter to take place as the zone will use the new value if it is halted. Note: * If you set the autoboot resource property in a zone’s configuration to true, that zone is automatically booted when the global zone is booted. The default setting is false. * for the zones to autoboot, the zones service svc:/system/zones:default must also be enabled. STEP 4 - Use remove net address= to remove the old network values. Use exit in the environment to save the changes and leave the zone configuration environment. zonecfg:ora9> info zonepath: /zone/ora9
autoboot: true pool: inherit-pkg-dir: dir: /lib inherit-pkg-dir: dir: /platform inherit-pkg-dir: dir: /sbin inherit-pkg-dir: dir: /usr net: address: 10.10.10.8/24 physical: ce0 net: address: 10.10.10.11/24 physical: ce1 zonecfg:ora9> remove net address=10.10.10.8/24 zonecfg:ora9> info zonepath: /zone/ora9 autoboot: true pool: inherit-pkg-dir: dir: /lib inherit-pkg-dir: dir: /platform inherit-pkg-dir: dir: /sbin inherit-pkg-dir: dir: /usr net: address: 10.10.10.11/24 physical: ce1 zonecfg:ora9> commit zonecfg:ora9> Note:
Performing either remove net address= or remove net physical= will delete both network parameters. You do not nor can you perform both command after you have issue one of them. STEP 5 - Use commit and exit to save the changes to the parameter Use commit and exit in the environment to save the changes and leave the zone configuration environment. zonecfg:ora9> verify zonecfg:ora9> commit zonecfg:ora9> exit globalzone# Use zoneadm -z halt followed by zoneadm -z boot The new network parameters will not come into force until the zone is booted. Use zoneadm -z halt to halt the zone. Then use zoneadm -z boot to start the zone with the new network parameters. globalzone# ifconfig -a lo0: flags=2001000849 mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 lo0:1: flags=2001000849 mtu 8232 index 1 zone ora9 inet 127.0.0.1 netmask ff000000 ce0: flags=1000843 mtu 1500 index 2 inet 10.10.10.14 netmask ffffff00 broadcast 10.10.10.255 ether [removed] ce0:1: flags=1000843 mtu 1500 index 2 zone ora9 inet 10.10.10.8 netmask ffffff00 broadcast 10.10.10.255 ce1: flags=1000843 mtu 1500 index 3
inet 10.10.10.15 netmask ffffff00 broadcast 10.10.10.255 ether [removed] globalzone# zoneadm -z ora9 halt globalzone# ifconfig -a lo0: flags=2001000849 mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 ce0: flags=1000843 mtu 1500 index 2 inet 10.10.10.14 netmask ffffff00 broadcast 10.10.10.255 ether [removed] ce1: flags=1000843 mtu 1500 index 3 inet 10.10.10.15 netmask ffffff00 broadcast 10.10.10.255 ether [removed] globalzone# zoneadm -z ora9 boot globalzone# ifconfig -a lo0: flags=2001000849 mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 lo0:1: flags=2001000849 mtu 8232 index 1 zone ora9 inet 127.0.0.1 netmask ff000000 ce0: flags=1000843 mtu 1500 index 2 inet 10.10.10.14 netmask ffffff00 broadcast 10.10.10.255 ether [removed] ce1: flags=1000843 mtu 1500 index 3 inet 10.10.10.15 netmask ffffff00 broadcast 10.10.10.255 ether [removed] ce1:1: flags=1000843 mtu 1500 index 3 zone ora9 inet 10.10.10.11 netmask ffffff00 broadcast 10.10.10.255 globalzone# To share the CPU resources
We need to do the following .first we need to enable the FSS #zone>set scheduling-class=fss #zone>add rctl #zone>rctl>set name-=zone.cpu-shares #zone>rctl>set value=(priv=privileged,limit=20,action=none) #zone>rctl>end