[ale] lxc virtualbox stew

Boris Borisov bugyatl at gmail.com
Mon Jan 6 17:53:43 EST 2014


In your case all lxc container adaptors should get IP in 10.0.2.x if you
set bridge for Linux and nat for vbox.
 On Jan 6, 2014 5:48 PM, "Narahari 'n' Savitha" <savithari at gmail.com> wrote:

> If I set up a NAT adapter at the VirtualBox level, I always get the
> 10.0.2.15 ip address inside the VirtualBox (aka inside the guest OS) if I
> type ip addr.
>
> I also tried the Bridge mode at the VirtualBox level and the guest os gets
> the ip that the router dishes out 192.168.0.x
>
> The question is related to the NAT point made above.  If I set up the
> network to be NAT at the VirtualBox level, can I still set up the network
> inside the guest ok aka my Linux as bridge and what does it mean to do so.
>  The reason I want to do the bridge approach is because ArchLinux starts
> the whole LXC thing with the first step being bridge mode network
> configuration.
>
> At this time I am confused with LXC vs docker difference ?
> I am also confused with BridgeMode inside the guest os while VirtualBox is
> set to NAT.
>
> -Narahari
>
>
> On Mon, Jan 6, 2014 at 4:04 PM, Boris Borisov <bugyatl at gmail.com> wrote:
>
>> Virtual box virtual adapters also can be set in bridge/nat/or isolated
>> network also internal network for box. Easy way to test this is with live
>> Linux image. Run it in vbox with different adaptor settings and see
>> results. Nothing better than experience even sometimes you reinvent the
>> wheel :-)
>>  Actually what I am trying to understand is, in a real physical Linux
>> box, connected to my router, the ip of 192.168.0.42 is dished out by the
>> router.
>> If I install LXC in there, according to instructions for LXC, the eth0
>> network interface is to be bridged to the LXC container and the network ip
>> to the LXC gets assigned by the router again in the 192.168.0.x range.
>>
>> I also understand that you can set the LXC to get the IP dished out from
>> the hardware box's eth0 in a NAT format so they can get the ip in the
>> 192.168.100.x series. (It is convoluted to do it with Arch but it is doable)
>>
>> ==============
>>
>> Now drawing analogy to that in the VirtualBox world of things,
>>
>> VirtualBox is the equivalent of the hardware box.  The OS inside that is
>> the Linux os and the router is also the VirtualBox which dishes out the IP
>> to the Linux OS.  Now, to install LXC inside the Linux(which is the guest
>> os) I am confused with the bridge approach and I am struggling there.
>>
>> I am trying to draw analogies so I can better understand how diff is a
>> VirtualBox env where Linux runs compared to a hardware box where Linux runs.
>>
>> Should I treat the VirtualBox as the router that dishes out the IP in the
>> 10.0.2.x range and if LXC is installed with bridge, will the LXC then get
>> the IP from the VirutalBox in the 10.0.2.x range ?
>>
>> I know my questions are confusing too but I am confused, hence the
>> questions are confused.
>>
>> -N
>>
>>
>> On Mon, Jan 6, 2014 at 12:09 AM, Michael Strickland <michael at ipxcore.com>wrote:
>>
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> I think he wants multiple IPs assigned to the VM so each container can
>>> have an IP.  I never figured out how to do that with virtualbox, I
>>> always found the networking to be too much of a pain.
>>>
>>> - --Michael Strickland
>>>
>>> On 1/6/2014 12:00 AM, Boris Borisov wrote:
>>> > Bridge is like pluging two cables in the same switch/network. NAT
>>> > is the way to deliver internet in your office with 20 computers but
>>> > you have only one IP from your provider. I'm not proud of my
>>> > explanation :-)  but all depends of your needs. Tell us more On Jan
>>> > 5, 2014 11:52 PM, "Narahari 'n' Savitha" <savithari at gmail.com>
>>> > wrote:
>>> >
>>> >> Friends:
>>> >>
>>> >> Happy New Year to all.
>>> >>
>>> >> Thank you for your help in advance.
>>> >>
>>> >> I am running Arch Linux 64 bit under VirtualBox as a guest OS on
>>> >> a  Mac host.  It works well.
>>> >>
>>> >> Allocated 4GB RAM to the guest OS.
>>> >>
>>> >> When Virtualbox allocates network, I have setup a NAT config and
>>> >> the Arch Linux gets 10.0.2.15 ip.
>>> >>
>>> >> The host hardware box gets ip in the 192.168.x.x from the
>>> >> physical router, but the virtualbox software dishes out 10.0.2.15
>>> >> to guest os inside virtualbox.  I presume the virtualbox software
>>> >> is doing that.
>>> >>
>>> >> Do I have to use bridge mode for installing lxc on the guest OS
>>> >>
>>> >> Regards, -N
>>> >>
>>> >> _______________________________________________ Ale mailing list
>>> >> Ale at ale.org http://mail.ale.org/mailman/listinfo/ale See JOBS,
>>> >> ANNOUNCE and SCHOOLS lists at
>>> >> http://mail.ale.org/mailman/listinfo
>>> >>
>>> >>
>>> >
>>> >
>>> >
>>> > _______________________________________________ Ale mailing list
>>> > Ale at ale.org http://mail.ale.org/mailman/listinfo/ale See JOBS,
>>> > ANNOUNCE and SCHOOLS lists at http://mail.ale.org/mailman/listinfo
>>> >
>>>
>>>
>>> -----BEGIN PGP SIGNATURE-----
>>> Version: GnuPG v1.4.1 (MingW32)
>>> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>>>
>>> iQEVAwUBUso6ck57vLMARVTwAQLt7ggAyNEWc9ums9RgtUHkIoVE6DlBlLChOyJ3
>>> ylUbn1sQnUIGA8VqTy7tXE05KSSt73xeVj3b/khYjvP3uohvBbK4pvDxpA5V2ZUO
>>> NM9Y6sL2fqQx8kaUoU7h1pLpDM6X7A8W1FPsb10HouTbL3KLIgWSZo2Ixk2DAC9Y
>>> Ff1T6gxiKdhj3TmFCY0dTuIG/dZOCFFSrkAetf4me7GJBUg5vL4Dal7nkhRe5frs
>>> zkbYOB7mEPM9sLFLJ9D32q0hvhj2fYxM/x/qSCczTdRVHbGrBDO+annNKytBRoP9
>>> BTZuLm8HIW3JjA7uRmImaAbpQh35aRPI9wLMTkuM+hszXX15073DcQ==
>>> =W2cw
>>> -----END PGP SIGNATURE-----
>>>
>>> ---
>>> This email is free from viruses and malware because avast! Antivirus
>>> protection is active.
>>> http://www.avast.com
>>>
>>> _______________________________________________
>>> Ale mailing list
>>> Ale at ale.org
>>> http://mail.ale.org/mailman/listinfo/ale
>>> See JOBS, ANNOUNCE and SCHOOLS lists at
>>> http://mail.ale.org/mailman/listinfo
>>>
>>
>>
>> _______________________________________________
>> Ale mailing list
>> Ale at ale.org
>> http://mail.ale.org/mailman/listinfo/ale
>> See JOBS, ANNOUNCE and SCHOOLS lists at
>> http://mail.ale.org/mailman/listinfo
>>
>>
>> _______________________________________________
>> Ale mailing list
>> Ale at ale.org
>> http://mail.ale.org/mailman/listinfo/ale
>> See JOBS, ANNOUNCE and SCHOOLS lists at
>> http://mail.ale.org/mailman/listinfo
>>
>>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20140106/c35eb72f/attachment-0001.html>


More information about the Ale mailing list