OpenSolaris

Discussions Communities Projects Download Source Browser

Home » OpenSolaris Forums » zones » discuss

Thread: Install zones, configure as DHCP client

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 14 - Last Post: Feb 12, 2009 1:55 AM by: arungupt
arungupt

Posts: 22
From: Santa Clara, CA

Registered: 3/12/08
Install zones, configure as DHCP client
Posted: Feb 8, 2009 5:12 PM
To: Communities » zones » discuss
Cc: Communities » install » discuss
  Click to reply to this thread Reply

I'm looking for simple instructions to install zones, configure them as DHCP clients to the DHCP server in global zone (all in an OpenSolaris VM using Virtual Bx). The documentation at http://docs.sun.com/app/docs/doc/817-1592/ seems to quite involving and keeps referring to multiple pointers instead of providing consolidated docs.

Are these instructions available any where ?

wrw

Posts: 29
From: US

Registered: 11/16/05
Re: [zones-discuss] Install zones, configure as DHCP client
Posted: Feb 8, 2009 7:05 PM   in response to: arungupt

  Click to reply to this thread Reply


Maybe I am missing something here, but wouldn't it be easier to do that
kind of thing with zonecfg? Unless you are changing some other settings
other than the IP... Just trying to understand the end result you are
looking for.

bill.


Arun Gupta wrote:
> I'm looking for simple instructions to install zones, configure them
> as DHCP clients to the DHCP server in global zone (all in an
> OpenSolaris VM using Virtual Bx). The documentation at
> http://docs.sun.com/app/docs/doc/817-1592/ seems to quite involving
> and keeps referring to multiple pointers instead of providing
> consolidated docs.
>
> Are these instructions available any where ?

_______________________________________________
zones-discuss mailing list
zones-discuss at opensolaris dot org


arungupt

Posts: 22
From: Santa Clara, CA

Registered: 3/12/08
Re: [zones-discuss] Install zones, configure as DHCP client
Posted: Feb 8, 2009 10:52 PM   in response to: wrw

  Click to reply to this thread Reply

Hi Bill,

That might be it and I'm new to all this :)

End goal: Configure 2 non-global zones in a Open Solaris Virtual Box
image and assign them addresses using DHCP server running in Global zone.

What exact command would serve that purpose ?

-Arun

Bill Walker wrote:
>
> Maybe I am missing something here, but wouldn't it be easier to do that
> kind of thing with zonecfg? Unless you are changing some other settings
> other than the IP... Just trying to understand the end result you are
> looking for.
>
> bill.
>
>
> Arun Gupta wrote:
>> I'm looking for simple instructions to install zones, configure them
>> as DHCP clients to the DHCP server in global zone (all in an
>> OpenSolaris VM using Virtual Bx). The documentation at
>> http://docs.sun.com/app/docs/doc/817-1592/ seems to quite involving
>> and keeps referring to multiple pointers instead of providing
>> consolidated docs.
>>
>> Are these instructions available any where ?
>

--
Application Platform, Sun Microsystems, Inc.
Blog: http://blogs.sun.com/arungupta
_______________________________________________
zones-discuss mailing list
zones-discuss at opensolaris dot org


gfaden

Posts: 316
From: US

Registered: 4/14/06
Re: [zones-discuss] Install zones, configure as DHCP client
Posted: Feb 8, 2009 11:19 PM   in response to: arungupt

  Click to reply to this thread Reply

Arun,

When running OpenSolaris as a VirtualBox guest, the DHCP service is
provided by the VirtualBox process. I don't know if VirtualBox will
respond to requests from multiple guest NICs if your host only has one
active NIC. If it does, then you should be able to follow this procedure
described in Steffen Weiberle's blog:

http://blogs.sun.com/stw/entry/crossbow_is_delivered_traveling_vnics

Anyway, this seems to be more of a question about VirtualBox networking,
than zones.

--Glenn

Arun Gupta wrote:
> Hi Bill,
>
> That might be it and I'm new to all this :)
>
> End goal: Configure 2 non-global zones in a Open Solaris Virtual Box
> image and assign them addresses using DHCP server running in Global zone.
>
> What exact command would serve that purpose ?
>
> -Arun
>
> Bill Walker wrote:
>
>> Maybe I am missing something here, but wouldn't it be easier to do that
>> kind of thing with zonecfg? Unless you are changing some other settings
>> other than the IP... Just trying to understand the end result you are
>> looking for.
>>
>> bill.
>>
>>
>> Arun Gupta wrote:
>>
>>> I'm looking for simple instructions to install zones, configure them
>>> as DHCP clients to the DHCP server in global zone (all in an
>>> OpenSolaris VM using Virtual Bx). The documentation at
>>> http://docs.sun.com/app/docs/doc/817-1592/ seems to quite involving
>>> and keeps referring to multiple pointers instead of providing
>>> consolidated docs.
>>>
>>> Are these instructions available any where ?
>>>
>
>

_______________________________________________
zones-discuss mailing list
zones-discuss at opensolaris dot org


arungupt

Posts: 22
From: Santa Clara, CA

Registered: 3/12/08
Re: [zones-discuss] Install zones, configure as DHCP client
Posted: Feb 9, 2009 10:40 AM   in response to: gfaden

  Click to reply to this thread Reply

Thanks Glenn, this helps in explanation!

For now, I'd like something that is simple and easy to configure. It
seems like static IP address is that route for now.

-Arun

Glenn Faden wrote:
> Arun,
>
> When running OpenSolaris as a VirtualBox guest, the DHCP service is
> provided by the VirtualBox process. I don't know if VirtualBox will
> respond to requests from multiple guest NICs if your host only has one
> active NIC. If it does, then you should be able to follow this procedure
> described in Steffen Weiberle's blog:
>
> http://blogs.sun.com/stw/entry/crossbow_is_delivered_traveling_vnics
>
> Anyway, this seems to be more of a question about VirtualBox networking,
> than zones.
>
> --Glenn
>
> Arun Gupta wrote:
>> Hi Bill,
>>
>> That might be it and I'm new to all this :)
>>
>> End goal: Configure 2 non-global zones in a Open Solaris Virtual Box
>> image and assign them addresses using DHCP server running in Global zone.
>>
>> What exact command would serve that purpose ?
>>
>> -Arun
>>
>> Bill Walker wrote:
>>
>>> Maybe I am missing something here, but wouldn't it be easier to do
>>> that kind of thing with zonecfg? Unless you are changing some other
>>> settings other than the IP... Just trying to understand the end
>>> result you are looking for.
>>>
>>> bill.
>>>
>>>
>>> Arun Gupta wrote:
>>>
>>>> I'm looking for simple instructions to install zones, configure them
>>>> as DHCP clients to the DHCP server in global zone (all in an
>>>> OpenSolaris VM using Virtual Bx). The documentation at
>>>> http://docs.sun.com/app/docs/doc/817-1592/ seems to quite involving
>>>> and keeps referring to multiple pointers instead of providing
>>>> consolidated docs.
>>>>
>>>> Are these instructions available any where ?
>>>>
>>
>>
>

--
Application Platform, Sun Microsystems, Inc.
Blog: http://blogs.sun.com/arungupta
_______________________________________________
zones-discuss mailing list
zones-discuss at opensolaris dot org


wrw

Posts: 29
From: US

Registered: 11/16/05
Re: [zones-discuss] Install zones, configure as DHCP client
Posted: Feb 9, 2009 4:48 AM   in response to: arungupt

  Click to reply to this thread Reply


So my question is this, why DHCP? If you are trying to assign an IP at
boot time of a zone, you could zonecfg the IP before you boot the zone.
I take it that you have a couple zones that might change IP
occasionally (or frequently). If the zone changes IP as part of a zone
reboot, then zonecfg is the easy solution. Zone down, zonecfg remove
net, zonecfg add net (set address and physical), zone boot.

If you are really needing DHCP for some reason, I'll defer to others
with more experience in those realms.

bill.



Arun Gupta wrote:
> Hi Bill,
>
> That might be it and I'm new to all this :)
>
> End goal: Configure 2 non-global zones in a Open Solaris Virtual Box
> image and assign them addresses using DHCP server running in Global zone.
>
> What exact command would serve that purpose ?
>
> -Arun
>
> Bill Walker wrote:
>> Maybe I am missing something here, but wouldn't it be easier to do that
>> kind of thing with zonecfg? Unless you are changing some other settings
>> other than the IP... Just trying to understand the end result you are
>> looking for.
>>
>> bill.
>>
>>
>> Arun Gupta wrote:
>>> I'm looking for simple instructions to install zones, configure them
>>> as DHCP clients to the DHCP server in global zone (all in an
>>> OpenSolaris VM using Virtual Bx). The documentation at
>>> http://docs.sun.com/app/docs/doc/817-1592/ seems to quite involving
>>> and keeps referring to multiple pointers instead of providing
>>> consolidated docs.
>>>
>>> Are these instructions available any where ?
>

_______________________________________________
zones-discuss mailing list
zones-discuss at opensolaris dot org


carlsonj

Posts: 6,810
From: US

Registered: 3/9/05
Re: [zones-discuss] Install zones, configure as DHCP client
Posted: Feb 9, 2009 5:44 AM   in response to: wrw

  Click to reply to this thread Reply

Bill Walker writes:
> If you are really needing DHCP for some reason, I'll defer to others
> with more experience in those realms.

The only supported way to do this today is to use exclusive stack
instance zones ("set ip-type = exclusive"). It would be nice to have
DHCP supported as an option for interface configuration via zoneadmd,
and the DHCP client has the features necessary to make this work, but
that feature hasn't been added to Zones.

RFE 5005887 also covered this case, but it was closed out when the
exclusive stack instance feature was integrated, and I don't think a
new RFE was ever opened.

--
James Carlson, Solaris Networking <james dot d dot carlson at sun dot com>
Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
_______________________________________________
zones-discuss mailing list
zones-discuss at opensolaris dot org


arungupt

Posts: 22
From: Santa Clara, CA

Registered: 3/12/08
Re: [zones-discuss] Install zones, configure as DHCP client
Posted: Feb 9, 2009 5:57 AM   in response to: carlsonj

  Click to reply to this thread Reply

Hi James,

Can you explain what is "exclusive stack instance" mean in this context ?

Will creating zones in a Virtual Box image qualify as that ?

-Arun

James Carlson wrote:
> Bill Walker writes:
>> If you are really needing DHCP for some reason, I'll defer to others
>> with more experience in those realms.
>
> The only supported way to do this today is to use exclusive stack
> instance zones ("set ip-type = exclusive"). It would be nice to have
> DHCP supported as an option for interface configuration via zoneadmd,
> and the DHCP client has the features necessary to make this work, but
> that feature hasn't been added to Zones.
>
> RFE 5005887 also covered this case, but it was closed out when the
> exclusive stack instance feature was integrated, and I don't think a
> new RFE was ever opened.
>

--
Application Platform, Sun Microsystems, Inc.
Blog: http://blogs.sun.com/arungupta
_______________________________________________
zones-discuss mailing list
zones-discuss at opensolaris dot org


carlsonj

Posts: 6,810
From: US

Registered: 3/9/05
Re: [zones-discuss] Install zones, configure as DHCP client
Posted: Feb 9, 2009 6:08 AM   in response to: arungupt

  Click to reply to this thread Reply

Arun Gupta writes:
> Can you explain what is "exclusive stack instance" mean in this context ?

See the "ip-type" parameter in zonecfg(1M).

Zones can be created using one of two different networking models. In
the default "shared" model, the zones are just given IP addresses on
links that are controlled by the global zone. The non-global zone has
no control over its interfaces, and there's one instance of the IP
stack shared between the non-global zone and the global zone. The
interfaces are configured by zoneadmd using parameters provided by
zonecfg.

In the "exclusive" model, the global zone gives the non-global zone
access to individual links, which can be VLANs or separate NICs. The
non-global zone then independently plumbs its own IP stack on top of
those links. The global zone has no control over the addresses that
the non-global zone uses, and the non-global zone sets these.

With an "exclusive" stack instance, the non-global zone is able to
control most of the IP configuration aspects of the interface,
including using DHCP to configure the address. (It's unable to supply
its own kernel modules, though, because there's still only one kernel
image on the system.)

> Will creating zones in a Virtual Box image qualify as that ?

No.

--
James Carlson, Solaris Networking <james dot d dot carlson at sun dot com>
Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
_______________________________________________
zones-discuss mailing list
zones-discuss at opensolaris dot org


arungupt

Posts: 22
From: Santa Clara, CA

Registered: 3/12/08
Re: [zones-discuss] Install zones, configure as DHCP client
Posted: Feb 9, 2009 10:38 AM   in response to: carlsonj

  Click to reply to this thread Reply

Thanks James!

> With an "exclusive" stack instance, the non-global zone is able to
> control most of the IP configuration aspects of the interface,
> including using DHCP to configure the address. (It's unable to supply
> its own kernel modules, though, because there's still only one kernel
> image on the system.)
This is helpful.

>> Will creating zones in a Virtual Box image qualify as that ?
>
> No.
Ok, so that rules out "exclusive stack instance" in my case then.

It probably does not matter since I just want to create couple of zones
and install GlassFish in both the zones to demonstrate clustering
capabilities of GF. Do you think it matters ?

-Arun

--
Application Platform, Sun Microsystems, Inc.
Blog: http://blogs.sun.com/arungupta
_______________________________________________
zones-discuss mailing list
zones-discuss at opensolaris dot org


carlsonj

Posts: 6,810
From: US

Registered: 3/9/05
Re: [zones-discuss] Install zones, configure as DHCP client
Posted: Feb 9, 2009 11:45 AM   in response to: arungupt

  Click to reply to this thread Reply

Arun Gupta writes:
> Thanks James!
>
> > With an "exclusive" stack instance, the non-global zone is able to
> > control most of the IP configuration aspects of the interface,
> > including using DHCP to configure the address. (It's unable to supply
> > its own kernel modules, though, because there's still only one kernel
> > image on the system.)
> This is helpful.
>
> >> Will creating zones in a Virtual Box image qualify as that ?
> >
> > No.
> Ok, so that rules out "exclusive stack instance" in my case then.

No ... it just means that the two things are orthogonal.

Whether you use Virtual Box or not says nothing about whether your
zones are exclusive stack instance or not.

> It probably does not matter since I just want to create couple of zones
> and install GlassFish in both the zones to demonstrate clustering
> capabilities of GF. Do you think it matters ?

It matters if you want the software inside the non-global zone to have
control over the IP configuration of its network interfaces. If you
do want this, then you need exclusive stack instances. If you don't,
and you're ok with configuring the IP parts of networking for those
non-global zones using zonecfg, then a shared stack instance may work.

The two are different operational models, and which you choose depends
on what you need.

--
James Carlson, Solaris Networking <james dot d dot carlson at sun dot com>
Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
_______________________________________________
zones-discuss mailing list
zones-discuss at opensolaris dot org


arungupt

Posts: 22
From: Santa Clara, CA

Registered: 3/12/08
Re: [zones-discuss] Install zones, configure as DHCP client
Posted: Feb 9, 2009 5:56 AM   in response to: wrw

  Click to reply to this thread Reply

Thanks!

I prefer DHCP since I don't care about the IP address that is assigned
to each zone. But willing to live with static IP as well.

Any guidelines on how to set the IP for each zone ?

-Arun

Bill Walker wrote:
>
> So my question is this, why DHCP? If you are trying to assign an IP at
> boot time of a zone, you could zonecfg the IP before you boot the zone.
> I take it that you have a couple zones that might change IP
> occasionally (or frequently). If the zone changes IP as part of a zone
> reboot, then zonecfg is the easy solution. Zone down, zonecfg remove
> net, zonecfg add net (set address and physical), zone boot.
>
> If you are really needing DHCP for some reason, I'll defer to others
> with more experience in those realms.
>
> bill.
>
>
>
> Arun Gupta wrote:
>> Hi Bill,
>>
>> That might be it and I'm new to all this :)
>>
>> End goal: Configure 2 non-global zones in a Open Solaris Virtual Box
>> image and assign them addresses using DHCP server running in Global zone.
>>
>> What exact command would serve that purpose ?
>>
>> -Arun
>>
>> Bill Walker wrote:
>>> Maybe I am missing something here, but wouldn't it be easier to do
>>> that kind of thing with zonecfg? Unless you are changing some other
>>> settings other than the IP... Just trying to understand the end
>>> result you are looking for.
>>>
>>> bill.
>>>
>>>
>>> Arun Gupta wrote:
>>>> I'm looking for simple instructions to install zones, configure them
>>>> as DHCP clients to the DHCP server in global zone (all in an
>>>> OpenSolaris VM using Virtual Bx). The documentation at
>>>> http://docs.sun.com/app/docs/doc/817-1592/ seems to quite involving
>>>> and keeps referring to multiple pointers instead of providing
>>>> consolidated docs.
>>>>
>>>> Are these instructions available any where ?
>>
>

--
Application Platform, Sun Microsystems, Inc.
Blog: http://blogs.sun.com/arungupta
_______________________________________________
zones-discuss mailing list
zones-discuss at opensolaris dot org


wrw

Posts: 29
From: US

Registered: 11/16/05
Re: [zones-discuss] Install zones, configure as DHCP client
Posted: Feb 9, 2009 6:24 AM   in response to: arungupt

  Click to reply to this thread Reply

Something like this should do the trick:

host# zonecfg -z my-zone
zonecfg:my-zone> remove net physical=e1000g0
zonecfg:my-zone> add net
zonecfg:my-zone:net> set address=192.168.0.99/24
zonecfg:my-zone:net> set physical=e1000g0
zonecfg:my-zone:net> end
zonecfg:my-zone> commit
zonecfg:my-zone> exit
host#


Arun Gupta wrote:
> Thanks!
>
> I prefer DHCP since I don't care about the IP address that is assigned
> to each zone. But willing to live with static IP as well.
>
> Any guidelines on how to set the IP for each zone ?
>
> -Arun
>
> Bill Walker wrote:
>>
>> So my question is this, why DHCP? If you are trying to assign an IP
>> at boot time of a zone, you could zonecfg the IP before you boot the
>> zone. I take it that you have a couple zones that might change IP
>> occasionally (or frequently). If the zone changes IP as part of a
>> zone reboot, then zonecfg is the easy solution. Zone down, zonecfg
>> remove net, zonecfg add net (set address and physical), zone boot.
>>
>> If you are really needing DHCP for some reason, I'll defer to others
>> with more experience in those realms.
>>
>> bill.
>>
>>
>>
>> Arun Gupta wrote:
>>> Hi Bill,
>>>
>>> That might be it and I'm new to all this :)
>>>
>>> End goal: Configure 2 non-global zones in a Open Solaris Virtual Box
>>> image and assign them addresses using DHCP server running in Global
>>> zone.
>>>
>>> What exact command would serve that purpose ?
>>>
>>> -Arun
>>>
>>> Bill Walker wrote:
>>>> Maybe I am missing something here, but wouldn't it be easier to do
>>>> that kind of thing with zonecfg? Unless you are changing some other
>>>> settings other than the IP... Just trying to understand the end
>>>> result you are looking for.
>>>>
>>>> bill.
>>>>
>>>>
>>>> Arun Gupta wrote:
>>>>> I'm looking for simple instructions to install zones, configure them
>>>>> as DHCP clients to the DHCP server in global zone (all in an
>>>>> OpenSolaris VM using Virtual Bx). The documentation at
>>>>> http://docs.sun.com/app/docs/doc/817-1592/ seems to quite involving
>>>>> and keeps referring to multiple pointers instead of providing
>>>>> consolidated docs.
>>>>>
>>>>> Are these instructions available any where ?
>>>
>>
>

_______________________________________________
zones-discuss mailing list
zones-discuss at opensolaris dot org


arungupt

Posts: 22
From: Santa Clara, CA

Registered: 3/12/08
Re: [zones-discuss] Install zones, configure as DHCP client
Posted: Feb 9, 2009 10:36 AM   in response to: wrw

  Click to reply to this thread Reply

Ok, this is helpful and I'm able to make progress.

I've installed the zone, configured the properties mentioned below and
now booting it. What "Name service" should I be using ?

I come from Windows/Mac world where all these are defaulted and
typically not required to be configured explicitly :)

-Arun

Bill Walker wrote:
> Something like this should do the trick:
>
> host# zonecfg -z my-zone
> zonecfg:my-zone> remove net physical=e1000g0
> zonecfg:my-zone> add net
> zonecfg:my-zone:net> set address=192.168.0.99/24
> zonecfg:my-zone:net> set physical=e1000g0
> zonecfg:my-zone:net> end
> zonecfg:my-zone> commit
> zonecfg:my-zone> exit
> host#
>
>
> Arun Gupta wrote:
>> Thanks!
>>
>> I prefer DHCP since I don't care about the IP address that is assigned
>> to each zone. But willing to live with static IP as well.
>>
>> Any guidelines on how to set the IP for each zone ?
>>
>> -Arun
>>
>> Bill Walker wrote:
>>>
>>> So my question is this, why DHCP? If you are trying to assign an IP
>>> at boot time of a zone, you could zonecfg the IP before you boot the
>>> zone. I take it that you have a couple zones that might change IP
>>> occasionally (or frequently). If the zone changes IP as part of a
>>> zone reboot, then zonecfg is the easy solution. Zone down, zonecfg
>>> remove net, zonecfg add net (set address and physical), zone boot.
>>>
>>> If you are really needing DHCP for some reason, I'll defer to others
>>> with more experience in those realms.
>>>
>>> bill.
>>>
>>>
>>>
>>> Arun Gupta wrote:
>>>> Hi Bill,
>>>>
>>>> That might be it and I'm new to all this :)
>>>>
>>>> End goal: Configure 2 non-global zones in a Open Solaris Virtual Box
>>>> image and assign them addresses using DHCP server running in Global
>>>> zone.
>>>>
>>>> What exact command would serve that purpose ?
>>>>
>>>> -Arun
>>>>
>>>> Bill Walker wrote:
>>>>> Maybe I am missing something here, but wouldn't it be easier to do
>>>>> that kind of thing with zonecfg? Unless you are changing some
>>>>> other settings other than the IP... Just trying to understand the
>>>>> end result you are looking for.
>>>>>
>>>>> bill.
>>>>>
>>>>>
>>>>> Arun Gupta wrote:
>>>>>> I'm looking for simple instructions to install zones, configure them
>>>>>> as DHCP clients to the DHCP server in global zone (all in an
>>>>>> OpenSolaris VM using Virtual Bx). The documentation at
>>>>>> http://docs.sun.com/app/docs/doc/817-1592/ seems to quite involving
>>>>>> and keeps referring to multiple pointers instead of providing
>>>>>> consolidated docs.
>>>>>>
>>>>>> Are these instructions available any where ?
>>>>
>>>
>>
>

--
Application Platform, Sun Microsystems, Inc.
Blog: http://blogs.sun.com/arungupta
_______________________________________________
zones-discuss mailing list
zones-discuss at opensolaris dot org


arungupt

Posts: 22
From: Santa Clara, CA

Registered: 3/12/08
Re: [zones-discuss] Install zones, configure as DHCP client
Posted: Feb 12, 2009 1:55 AM   in response to: arungupt
To: Communities » zones » discuss
  Click to reply to this thread Reply

Closing the loop ...

I published a blog on how to install zones at:

http://blogs.sun.com/arungupta/entry/totd_68_installing_zones_in

Thanks!




Terms of Use | Privacy | Trademarks | Copyright Policy | Site Guidelines
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.
Copyright © 1995-2005 Sun Microsystems, Inc.