[OpenIndiana-discuss] New Zone User Questions
Ian Collins
ian at ianshome.com
Mon Feb 4 07:00:24 UTC 2013
Dormition Skete wrote:
> I entered the wonderful world of zones the other day.
>
> I read the chapter in the "OpenSolaris Bible" about zones a while
> back, and I've been thinking that setting up a couple of sparse-root
> zones, and one whole-root zone would probably be best for our needs.
I'm pretty sure the whole/sparse zone thing was long gone before
OpenSolaris was closed.
> I wanted the whole-root zone because we have a couple of very old web
> apps that require PHP4, and I thought putting them in a whole-root
> zone would be a good way to reduce any possibility of an unintended
> PHP5 install messing things up with it. Or maybe we might end up
> needing PHP5 for something, and I thought this would be a way of
> being able have both, but in separate zones.
It is.
> And I thought the sparse-root zones, using the global zone's /lib,
> /platform, /sbin, and /usr directories would ease system updates.
Gone!
<snip>
> I tried "add inherit-pkg-dir", thinking that would allow me to add
> the directories, but it wouldn't let me do that either.
>
> 1) Has all this been changed? Are sparse-root zones no longer an
> option? Or if they are an option, how do I go about making them?
Yes, there are just "zones" these days.
> 2) When I boot the zone I have working, I get this:
>
> zone 'webphp4': WARNING: bge0:1: no matching subnet found in
> netmasks(4): 192.168.0.17; using default of 255.255.255.0.
>
> How do I set the subnet to 255.255.255.0 so I don't get that
> warning?
The best thing to do is forget about shared IP zones and use exclusive.
To do this, just create a vnic and give it to the zone.
> 3) The OSB says not to edit the config files in the non-global zones
> from within the global zone -- to log into the non-global zone, and
> modify it from within itself. I'm not real GUI dependent, but I like
> to have a full desktop system just for the ease of navigation
> (nautilus), text editing with gedit, and things like that. If I have
> to have all of my zones as whole-root, that'd mean setting up a lot
> of extra software in them.
Why? You don't need a GUI to manage configurations.
> Is it really all that bad of a practice
> editing the non-global zone config files from the global zone, and
> copying files directly into the non-global zones from the global
> zone, or is there a more reasonable way of going about it?
It's OK to do if you know what you are doing, but it's much better to
manage the zone from within the zone.
> 4) When I did a "zlogin -C webphp4" it asked me what kind of console
> I was using. I selected the first item - I think it was ANSI. It
> had a real miserable interface in the program that comes up to
> configure the new zone. The fields and stuff didn't show up or
> navigate very well. I could send you some screenshots, but if you've
> run into this, you know what I mean. I managed to get through it,
> but does anyone have any suggestions which terminal type to use from
> OpenIndiana's gnome-terminal that might look better?
Yes, or play safe and zlogin -C from an xterm.
> 5) Finally, below is the zone info for one of my zones. This would
> be running on the least powerful machine we'll have OI running on.
> It has two processor cores, and 2GB RAM. I was thinking to have the
> global zone having one cpu-share, and three zones with one each. Is
> that reasonable? And do the rest of the settings look reasonable? I
> was trying to take the advice from the OSB.
I've never yet fiddles with zone CPU resources. Unless you have users
or customers with some sort of quality of service guarantee, don't bother.
Start with a basic, simple configuration. There's one I use for a
Mercurial repository:
create -b
set brand=solaris
set zonepath=/zoneRoot/mercurial
set autoboot=true
set ip-type=exclusive
add net
set configure-allowed-address=true
set physical=hg0
end
Where hg0 is a vnic.
--
Ian.
More information about the OpenIndiana-discuss
mailing list