No Account Yet?

You are not logged in.

Add to: JBookmarks Add to: Facebook Add to: Windows Live Add to: Digg Add to: Del.icoi.us Add to: Reddit Add to: StumbleUpon Add to: Slashdot Add to: Netscape Add to: Furl Add to: Yahoo Add to: Blogmarks Add to: Technorati Add to: Newsvine Add to: Google Information
How to create a Zone in OpenSolaris E-mail
OpenSolaris HowTos - Solaris Virtualization
Written by Allen Sanabria   
Monday, 11 August 2008 20:43

Being a Newbie in the Solaris world, I am still learning as I go but it has so far been a pretty interesting/frustrating ride. So here I go trying to show you guys how to create a simple zone in OpenSolaris. This howto will work but after this I am still clueless HAHAHHAHAHAHA...... More to come soon!!



-bash-3.2# pooladm -e    
{The command above will enable Resource Pools }

-bash-3.2# pooladm -s    
{The command above will save the current configuration to /etc/pooladm.conf}

You can ignore the next 6 commands if you do not have more the one processor or more then one core, as this was only necessary if you want a zone to have its own dedicated processors.

-bash-3.2# poolcfg -c 'create pset router-pset (uint pset.min=1; uint pset.max=1)'   
{The command above will create the Procesor Set router-pset with a minimum of 1 processor and a maximum of 1 processor}

-bash-3.2# poolcfg -c 'create pool router-pool'   
{The command above will create the pool called router-pool}

-bash-3.2# poolcfg -c 'associate pool router-pool (pset router-pset)'
{The command above will associate the router-pool with the Processor Set router-pset}

-bash-3.2# pooladm -c
{The command above will activate the pool configuration}

-bash-3.2# pooladm -s
{The command above will save the current configuration to /etc/pooladm.conf}

-bash-3.2# pooladm
{The command above will verify what you did above}

system default

    string    system.comment
    int    system.version 1
    boolean    system.bind-default true
    string    system.poold.objectives wt-load

    pool pool_default
        int    pool.sys_id 0
        boolean    pool.active true
        boolean    pool.default true
        int    pool.importance 1
        string    pool.comment
        pset    pset_default

    pool router-pool
        int    pool.sys_id 2
        boolean    pool.active true
        boolean    pool.default false
        int    pool.importance 1
        string    pool.comment
        pset    router-pset

    pset router-pset
        int    pset.sys_id 1
        boolean    pset.default false
        uint    pset.min 1
        uint    pset.max 1
        string    pset.units population
        uint    pset.load 0
        uint    pset.size 1
        string    pset.comment

        cpu
            int    cpu.sys_id 0
            string    cpu.comment
            string    cpu.status on-line

    pset pset_default
        int    pset.sys_id -1
        boolean    pset.default true
        uint    pset.min 1
        uint    pset.max 65536
        string    pset.units population
        uint    pset.load 6
        uint    pset.size 1
        string    pset.comment

        cpu
            int    cpu.sys_id 1
            string    cpu.comment
            string    cpu.status on-line


-bash-3.2# zonecfg -z router
{The above command will enter you into the zone configuration tool, since you are creating a new zone you will get the message below }
router: No such zone configured
Use 'create' to begin configuring a new zone.

zonecfg:router> create
{The command above will create the new zone definition}

zonecfg:router> set zonepath=/export/zones/router
{The command above will assign the zone to a file system }
It is important to select a file system with sufficient disk space to accommodate the zone.  A default
configuration requires approximately 100 MB of free disk space plus the amount of space needed by applications.


zonecfg:router> set autoboot=true
{The command above will boot up the zone as soon as the system comes up|

zonecfg:router> add net
{The command above will begin the configuration of networking parameters}

zonecfg:router:net> set address=192.168.101.50/24
{The command above will set the IP Address of the NIC you are going to use}

zonecfg:router:net> set physical=nfo0
{The command above will set the physical NIC to use}

zonecfg:router:net> set defrouter=192.168.101.100
{The command above will set the default router of this network configuration}

zonecfg:router:net> end
{The command above will end the network configuration portion}

zonecfg:router> set pool=router-pool
{The command above will set the pool to router-pool}

zonecfg:router> verify
{If the command above returns anythng then that means we have issues.... Should not return anything}

zonecfg:router> commit
{The command above will write the in-memory configuration to stable memory}

zonecfg:router> exit
{The command above will exit the zone configuration}

Or you could have done a one liner like this...  { Should I have told you this before showing you the above.... :P }
zonecfg -z router "create; set zonepath=/export/zones/router; set autoboot=true; add net; set address=192.168.101.50/24; set physical=nfo0; set defrouter=192.168.101.100; end; set pool=router-pool; verify; commit"

A standard zone automatically shares the /usr, /lib, /platform, and /sbin file systems with the global zone. It is important to note that a standard zone configuration mounts all global file systems as read-only. As a result, an attempt to install an application to any of these directories will fail.

-bash-3.2# zoneadm -z router install
{The above command will install the zone for you}
Bare in mind you will need an internet connection unless you had your server jumpstarted then it will use the internal repository.

 Image: Preparing at /export/zones/router/root ... done.
 Catalog: Retrieving from http://pkg.opensolaris.org:80/ ... done.
 Installing: (output follows)
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                  50/50   7701/7701 207.98/207.98

PHASE                                        ACTIONS
Install Phase                            12723/12723

       Note: Man pages can be obtained by installing SUNWman
Postinstall: Copying SMF seed repository ... done.
Postinstall: Working around http://defect.opensolaris.org/bz/show_bug.cgi?id=681
Postinstall: Working around http://defect.opensolaris.org/bz/show_bug.cgi?id=741
       Done: Installation completed in 401.947 seconds.

 Next Steps: Boot the zone, then log into the zone console
             (zlogin -C) to complete the configuration process

-bash-3.2# zoneadm -Z router boot
-bash-3.2# zlogin -C router
            [Connected to zone 'router' console]


            You did not enter a selection.
            What type of terminal are you using?
             1) ANSI Standard CRT
             2) DEC VT100
             3) PC Console
             4) Sun Command Tool
             5) Sun Workstation
             6) X Terminal Emulator (xterms)
             7) Other
            Type the number of your choice and press Return: 6
            Creating new rsa public/private host key pair
            Creating new dsa public/private host key pair
            Configuring network interface addresses: nfo0.

            ─ Host Name for nfo0:1 ─────────────────────────────────────────────────────────

              Enter the host name which identifies this system on the network.  The name
              must be unique within your domain; creating a duplicate host name will cause
              problems on the network after you install Solaris.

              A host name must have at least one character; it can contain letters,
              digits, and minus signs (-).


                Host name for nfo0:1 router                          


            ────────────────────────────────────────────────────────────────────────────────
                F2_Continue    F6_Help
   

 

  ─ Configure Security Policy: ───────────────────────────────────────────────────

                  Specify Yes if the system will use the Kerberos security mechanism.

                  Specify No if this system will use standard UNIX security.

                      Configure Kerberos Security
                      ───────────────────────────
                      [ ] Yes
                      [X] No


            ────────────────────────────────────────────────────────────────────────────────
                Esc-2_Continue    Esc-6_Help
            

 

  ─ Confirm Information ──────────────────────────────────────────────────────────

                  > Confirm the following information.  If it is correct, press F2;
                    to change any information, press F4.

                        Configure Kerberos Security: No


            ────────────────────────────────────────────────────────────────────────────────
                    Esc-2_Continue    Esc-4_Change    Esc-6_Help   

 

─ Name Service ─────────────────────────────────────────────────────────────────

                          On this screen you must provide name service information.  Select the name
                          service that will be used by this system, or None if your system will either
                          not use a name service at all, or if it will use a name service not listed
                          here.

                          > To make a selection, use the arrow keys to highlight the option
                            and press Return to mark it [X].


                              Name service
                              ────────────
                              [ ] NIS+
                              [ ] NIS
                              [X] DNS
                              [ ] LDAP
                              [ ] None



────────────────────────────────────────────────────────────────────────────────
                            Esc-2_Continue    Esc-6_Help

                

 

  ─ Domain Name ──────────────────────────────────────────────────────────────────

                              On this screen you must specify the domain where this system resides.  Make
                              sure you enter the name correctly including capitalization and punctuation.


                                Domain name: linuxdynasty                    



                            ────────────────────────────────────────────────────────────────────────────────
                                Esc-2_Continue    Esc-6_Help


  ─ DNS Server Addresses ─────────────────────────────────────────────────────────

                                  On this screen you must enter the IP address of your DNS server(s).  You
                                  must enter at least one address.  IP addresses must contain four sets of
                                  numbers separated by periods (for example 129.200.9.1).



                                    Server's IP address: 192.168.101.100
                                    Server's IP address:
                                    Server's IP address:




                                ────────────────────────────────────────────────────────────────────────────────
                                    Esc-2_Continue    Esc-6_Help


            ─ Confirm Information ──────────────────────────────────────────────────────────

                                      > Confirm the following information.  If it is correct, press F2;
                                        to change any information, press F4.


                                              Name service: DNS
                                               Domain name: linuxdynasty
                                        Server address(es): 192.168.101.100



                                    ────────────────────────────────────────────────────────────────────────────────
                                        Esc-2_Continue    Esc-4_Change    Esc-6_Help


             ─ NFSv4 Domain Name ────────────────────────────────────────────────────────────

                                          NFS version 4 uses a domain name that is automatically derived from the
                                          system's naming services. The derived domain name is sufficient for most
                                          configurations. In a few cases, mounts that cross domain boundaries might
                                          cause files to appear to be owned by "nobody" due to the lack of a common
                                          domain name.

                                          The current NFSv4 default domain is: "linuxdynasty"


                                              NFSv4 Domain Configuration
                                              ──────────────────────────────────────────────
                                              [X] Use the NFSv4 domain derived by the system
                                              [ ] Specify a different NFSv4 domain




                                        ────────────────────────────────────────────────────────────────────────────────
                                            Esc-2_Continue    Esc-6_Help


            ─ Confirm Information for NFSv4 Domain ─────────────────────────────────────────

                                              > Confirm the following information.  If it is correct, press F2;
                                                to change any information, press F4.


                                                NFSv4 Domain Name:  << Value to be derived dynamically >>



                                            ────────────────────────────────────────────────────────────────────────────────
                                                Esc-2_Continue    Esc-4_Change    Esc-6_Help


     ─ Time Zone ────────────────────────────────────────────────────────────────────

                                                  On this screen you must specify your default time zone.  You can specify a
                                                  time zone in three ways:  select one of the continents or oceans from the
                                                  list, select other - offset from GMT, or other - specify time zone file.

                                                  > To make a selection, use the arrow keys to highlight the option and
                                                    press Return to mark it [X].


                                                      Continents and Oceans
                                                      ──────────────────────────────────
                                                  -   [ ] Africa
                                                  │   [X] Americas
                                                  │   [ ] Antarctica
                                                  │   [ ] Arctic Ocean
                                                  │   [ ] Asia
                                                  │   [ ] Atlantic Ocean
                                                  │   [ ] Australia
                                                  │   [ ] Europe
                                                  v   [ ] Indian Ocean

                                                ────────────────────────────────────────────────────────────────────────────────
                                                    Esc-2_Continue    Esc-6_Help


       ─ Country or Region ────────────────────────────────────────────────────────────

                                                      > To make a selection, use the arrow keys to highlight the option and
                                                        press Return to mark it [X].


                                                          Countries and Regions
                                                          ───────────────────────────
                                                      -   [X] United States
                                                      │   [ ] Anguilla
                                                      │   [ ] Antigua & Barbuda
                                                      │   [ ] Argentina
                                                      │   [ ] Aruba
                                                      │   [ ] Bahamas
                                                      │   [ ] Barbados
                                                      │   [ ] Belize
                                                      │   [ ] Bolivia
                                                      │   [ ] Brazil
                                                      │   [ ] Canada
                                                      │   [ ] Cayman Islands
                                                      v   [ ] Chile

                                                    ────────────────────────────────────────────────────────────────────────────────
                                                        Esc-2_Continue    Esc-6_Help


    ─ Time Zone ────────────────────────────────────────────────────────────────────

                                                          > To make a selection, use the arrow keys to highlight the option and
                                                            press Return to mark it [X].


                                                              Time zones
                                                              ──────────────────────────────────────────────────────────────────────────
                                                          -   [X] Eastern Time
                                                          │   [ ] Eastern Time - Michigan - most locations
                                                          │   [ ] Eastern Time - Kentucky - Louisville area
                                                          │   [ ] Eastern Time - Kentucky - Wayne County
                                                          │   [ ] Eastern Time - Indiana - most locations
                                                          │   [ ] Eastern Time - Indiana - Daviess, Dubois, Knox & Martin Counties
                                                          │   [ ] Eastern Time - Indiana - Starke County
                                                          │   [ ] Eastern Time - Indiana - Pulaski County
                                                          │   [ ] Eastern Time - Indiana - Crawford County
                                                          │   [ ] Eastern Time - Indiana - Switzerland County
                                                          │   [ ] Central Time
                                                          │   [ ] Central Time - Indiana - Perry County
                                                          v   [ ] Central Time - Indiana - Pike County

                                                        ────────────────────────────────────────────────────────────────────────────────
                                                            Esc-2_Continue    Esc-6_Help


  ─ Confirm Information ──────────────────────────────────────────────────────────

                                                              > Confirm the following information.  If it is correct, press F2;
                                                                to change any information, press F4.


                                                                Time zone: Eastern Time
                                                                           (US/Eastern)



                                                            ────────────────────────────────────────────────────────────────────────────────
                                                                Esc-2_Continue    Esc-4_Change    Esc-6_Help

       

 

─ Root Password ────────────────────────────────────────────────────────────────

                                                                  Please enter the root password for this system.

                                                                  The root password may contain alphanumeric and special characters.  For
                                                                  security, the password will not be displayed on the screen as you type it.

                                                                  > If you do not want a root password, leave both entries blank.


                                                                    Root password:  **********
                                                                    Root password:  **********      



                                                                ────────────────────────────────────────────────────────────────────────────────
                                                                    Esc-2_Continue    Esc-6_Help

System identification is completed.
-bash-3.2# zoneadm -z router reboot
-bash-3.2# zoneadm list -v
ID NAME             STATUS     PATH                           BRAND    IP   
  0 global           running    /                              native   shared
  6 router           running    /export/zones/router           ipkg     shared

-bash-3.2# zlogin router

[Connected to zone 'router' pts/3]
Last login: Mon Aug 11 22:15:51 on console
Sun Microsystems Inc.   SunOS 5.11      snv_94  January 2008

You now have a working zone........ 

Comments
Search RSS
Only registered users can write comments!

3.22 Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Last Updated ( Tuesday, 12 August 2008 11:54 )