LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   solaris zones: what is it for? (https://www.linuxquestions.org/questions/solaris-opensolaris-20/solaris-zones-what-is-it-for-716274/)

ic_torres 04-02-2009 04:12 AM

solaris zones: what is it for?
 
hi newbie here in solaris. . .just wondering, what's the easiest description of a solaris zone? i cannot really get the idea even in wiki.

tried doing one in my vm :

Code:


bash-3.00# zonecfg -z testzone
testzone: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:testzone> create
zonecfg:testzone> set zonepath=/zones/testzone
zonecfg:testzone> set autoboot=true
zonecfg:testzone> info
zonename: testzone
zonepath: /zones/testzone
brand: native
autoboot: true
bootargs:
pool:
limitpriv:
scheduling-class:
ip-type: shared
inherit-pkg-dir:
        dir: /lib
inherit-pkg-dir:
        dir: /platform
inherit-pkg-dir:
        dir: /sbin
inherit-pkg-dir:
        dir: /usr
zonecfg:testzone> verify
zonecfg:testzone> commit
zonecfg:testzone>
bash-3.00# zoneadm list -cv
  ID NAME            STATUS    PATH                          BRAND    IP
  0 global          running    /                              native  shared
  - testzone        configured /zones/testzone                native  shared
bash-3.00#

bash-3.00# zoneadm -z testzone install
Preparing to install zone <testzone>.
Creating list of files to copy from the global zone.
Copying <2455> files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize <1020> packages on the zone.
Initialized <1020> packages on zone.
Zone <testzone> is initialized.
The file </zones/testzone/root/var/sadm/system/logs/install_log> contains a log of the zone installation.
bash-3.00# zoneadm list -cv
  ID NAME            STATUS    PATH                          BRAND    IP
  0 global          running    /                              native  shared
  - testzone        installed  /zones/testzone                native  shared
bash-3.00# zoneadm -z testzone ready
bash-3.00# zoneadm list -cv
  ID NAME            STATUS    PATH                          BRAND    IP
  0 global          running    /                              native  shared
  1 testzone        ready      /zones/testzone                native  shared




bash-3.00# zoneadm -z testzone boot
bash-3.00# zlogin -C testzone
[Connected to zone 'testzone' console]
138/138




also encountered the following errors:

System identification is completed.

rebooting system due to change(s) in /etc/default/init


[NOTICE: Zone rebooting]


SunOS Release 5.10 Version Generic_120012-14 32-bit
Copyright 1983-2007 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
Hostname: icey

icey console login: Apr  2 15:31:50 icey sendmail[8415]: My unqualified host name (localhost) unknown; sleeping for retry
Apr  2 15:32:50 icey sendmail[8415]: unable to qualify my own domain name (localhost) -- using short name
Apr  2 15:32:50 icey sendmail[8443]: My unqualified host name (localhost) unknown; sleeping for retry
Apr  2 15:32:50 icey sendmail[8444]: My unqualified host name (localhost) unknown; sleeping for retry
Apr  2 15:33:50 icey sendmail[8443]: unable to qualify my own domain name (localhost) -- using short name
Apr  2 15:33:50 icey sendmail[8444]: unable to qualify my own domain name (localhost) -- using short name
^C

icey console login: ^C
icey console login: ^C
icey console login: ~.
Password:
^C^CLogin incorrect

how can i "edit" my console login info?
how can i "exit" from the "console"?


note: i specified "icey" as the hostname, of course i gave a passwd, but upon login i don't know what's the user login. ..


my goal is to try installing/running solaris zones. .. and of course be familiar

ilikejam 04-02-2009 08:23 AM

Hi.

A zone is a lightweight virtual host. It's a largely independent OS sitting inside the main Solaris OS.

how can i "edit" my console login info?
Just the same as you normally would - useradd, passwd, and all that. The zone has its own copy of /etc, so it has its own login database in /etc/passwd

how can i "exit" from the "console"?
If you logged in with 'zlogin -C <zone>', then you can do: ~. to exit the connection. Hit return, then do ~. and you should get out. Be aware, though, that the same key sequence drops SSH connections too.

upon login i don't know what's the user login. ..
It's 'root' and whatever password you supplied at the first boot of the zone.

Dave

ic_torres 04-08-2009 04:22 AM

Quote:

Originally Posted by ilikejam (Post 3496027)
Hi.

A zone is a lightweight virtual host. It's a largely independent OS sitting inside the main Solaris OS.

how can i "edit" my console login info?
Just the same as you normally would - useradd, passwd, and all that. The zone has its own copy of /etc, so it has its own login database in /etc/passwd

how can i "exit" from the "console"?
If you logged in with 'zlogin -C <zone>', then you can do: ~. to exit the connection. Hit return, then do ~. and you should get out. Be aware, though, that the same key sequence drops SSH connections too.

upon login i don't know what's the user login. ..
It's 'root' and whatever password you supplied at the first boot of the zone.

Dave


hi, thanks thanks :) i have tried it now :

bash# zoneadm -z testzone boot -- do i have to boot always before logging in?

# zlogin -C testzone
[connetcted to zone 'testzone' console]


icey console login : root
passwd: :)


icey login: ROOT LOGIN /dev/console

Sun Microsystems Inc. SunOS 5.10 Generic January 2005
#

#~.
[connection to zone 'testzone' console closed]


in my own understanding as per my zone trial. . a zone is a "virtual OS" inside your existing OS? is it like that?

crisostomo_enrico 04-08-2009 06:21 AM

Solaris containers and solaris zones are operating system level virtualization technologies, indeed.

I strongly suggest you google for it. Sun's BigAdmin website has many articles about the topic and I suggest you read the official zones documentation, too:
http://docs.sun.com/app/docs/doc/817-1592?l=en

ic_torres 04-10-2009 06:18 PM

Quote:

Originally Posted by crisostomo_enrico (Post 3502296)
Solaris containers and solaris zones are operating system level virtualization technologies, indeed.

I strongly suggest you google for it. Sun's BigAdmin website has many articles about the topic and I suggest you read the official zones documentation, too:
http://docs.sun.com/app/docs/doc/817-1592?l=en


whoa whoa . .. nice doc! thanks. . btw i am in the process of letting a friend of mine print a Solaris10 all in one book document in pdf. .. hoping to have in binded in the next months. . .

having a hard time of reading ebooks. .it tires my eyes. . . i prefer reading a book instead :)

crisostomo_enrico 04-11-2009 04:22 AM

The same thing happens to me: I cannot bear reading more than 2 pages on a monitor screen. Sun's documentation is pretty detailed and you might find it pretty "redundant": for every topic there is an introductory chapter, a task overview and then detailed steps. I usually examine the documentation first and then print only the relevant sections: two pages a sheet, double sided. You'll spare a good number of sheets and the environment will thank you, too, instead of printing the entire book.


All times are GMT -5. The time now is 12:04 AM.