Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #224511

Re: systemd-nspawn networking inside VirtualBox VM

Path csiph.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!2.eu.feeder.erje.net!feeder.erje.net!usenet.goja.nl.eu.org!aioe.org!bofh.it!news.nic.it!robomod
From john doe <johndoe65534@mail.com>
Newsgroups linux.debian.user
Subject Re: systemd-nspawn networking inside VirtualBox VM
Date Tue, 07 Jul 2020 18:30:01 +0200
Message-ID <ApYDL-3mL-1@gated-at.bofh.it> (permalink)
References <ApVZf-1HS-3@gated-at.bofh.it>
X-Mailbox-Line From debian-user-request@lists.debian.org Tue Jul 7 16:25:11 2020
Old-Return-Path <johndoe65534@mail.com>
X-Amavis-Spam-Status No, score=-7.55 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FOURLA=0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, LDO_WHITELIST=-5, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001] autolearn=ham autolearn_force=no
X-Policyd-Weight using cached result; rate: -3.5
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/simple; d=mail.com; s=dbd5af2cbaf7; t=1594137915; bh=6lDw14UGtIuRLdIS/4fOAjGLtiqWR46cpB4a+gAL2+E=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=PNJPXdgQ+pIQFc0b8drWqOOzpsSO6O+Xzr1DjV1Yh3DpacLvW8QToxsqp6AOULCHU 2QndUmOIELFGvmetWZ4Ww4mwcKR6D82OEihy9zd2Eu8i9m1YuTyKO04K9KLUgG0GSy aLIzQuSghdsQDdHnQSD9DP7SkLLc5dTkFHOzi7Ro=
X-Ui-Sender-Class 214d933f-fd2f-45c7-a636-f5d79ae31a79
MIME-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Language en-US
Content-Transfer-Encoding quoted-printable
X-Provags-ID V03:K1:yfS1Kz/r2dqu39wPIg5WeBxLLwLGU1cP4lkgzaWl3lhlCyr/s8d 9i+xYmzezpJbPQ4zsVI3BZil2mujJ0Q4VoSk606NWzdVLZ+Uv40YIWmjyXodxzJo1ZeoPQm erWMP8rX8gx1eP8f1leG0z0CwIwtPCPhU0Z2mPNWg3/9q3FtfzoJTsTn8fHZM/CCVBN+0Ts ExFP70UO7Fp5F3boQ0Jsw==
X-Ui-Out-Filterresults notjunk:1;V03:K0:dEJNCgfTvTE=:NlpDnY8VjqzKdI7BvuYDX4 8x7oVgkqABrA37FYaSaKM/mn2A0s9KCslVE50ywiEKIGb+2kZcUte0aT5DI+VqkfWpygNavee HOf/gRpqg8DZlN+hg13D8dC2JTGu8shczOs8kZMO43ywLzR9d+AN+00e/nksVpii5CRmZn95P 2LtH/wED3O80jADmxfYgZCAxtPDy+yk3Hgt8b2fwTIpgfnXJCIVk2jYt1ptlEvkYviweHVbxA Q0HlCHm8iA5vRIapIRu4DHLWT5ujZGYOFn0nkfVaz9pbRJeEKPkm0RlNbGpB4CKrIlU6QuPYK 6YdsJS0TEomqDnrLWiRJF9jTxSoItCvxczZInEaTQCjo8IiWlGUUGoV6u8CQbhWH/ZoxEoHhx 83DimCbfMz1qT5D0lT6lwgxSLWqj3BU6U0Oy9vAzTupYQMPJ5w+ql0Qc3CJZaW/lp5ymA/0Vp 6kIKSqyJAj8X8Icv+zK3cBQio4Cs0Ujq7hGXvmFK7oyoepX2T4cjGmAZjndRG+q7OnKETdnSx PSk6XptpOG3RbUkZTWf7/URQW0nEjCVROuo/YfZSxadYmalvVm3nBHD/MyMXJ35QPMdItbl6m /bhT6bh0P2SGq/+qQEX9A4exkxM2VHv7swFU94hzXnUB/JwXLzsSKtscATYRAdLWtJYYHuRsQ ysujhOgOJaV0ZMzQPwgIFkaYJlP8V6TPiVifd1A/ZJb1TfgKY0/JvbzxzisL9FjxFqlEIGPUW xKVtB1ltaa9zEkMdGyhlFDjrSQH2QRQVjfRQKh5kN1Lpwj9Hg/1g063BnMPm+ic13aGWKY5kt L/KEjc24OSON8Q8+lsKFDiTK9MA8sSy0uASB8ueKPSukTqfvL+n1/LMwOB3mahvxgXyzLuGeW Yf20kU/oqLjxoLrKbftHkTC9wugySn589f7fClnMTp6mmtRpkPdpTzNi4pT0r/pDwGDMp45b/ SfzwCw4xEgDdOzVGPaA2cV8ED1wLdNf/s6knoAk1fGFyKPkam6wrXJnJbjjh3IKg4o2gPewYP 7KF6PJ4MGkseaM15HsU9qucN+iHphLz2j2y8Uk1YSS601y1nYQ7BYS1NyFk/55DsJDsNz0PpP l0QjaCkCFz1CpZgxDy/mldUDamQceggQ8GkTv3r8KsEYlNg2zRaUugCpYMchGYoVBWid2c1fN iw7R0dw/tbhcLE1G5HXYQumx1Zn3RpWCrH7ta5fs9ZZlQ3qQtdW9AAGBic8vaBB//BPPu4xv1 HwEGMDd/psMTZoN67Ylvl1oJXIvwLspLDtJ2fzw==
X-Mailing-List <debian-user@lists.debian.org> archive/latest/764822
List-ID <debian-user.lists.debian.org>
List-URL <https://lists.debian.org/debian-user/>
List-Archive https://lists.debian.org/msgid-search/c5512117-9680-1c8e-78ad-3742e0f2d580@mail.com
Approved robomod@news.nic.it
Lines 60
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Tue, 7 Jul 2020 18:05:14 +0200
X-Original-Message-ID <c5512117-9680-1c8e-78ad-3742e0f2d580@mail.com>
X-Original-References <20200707131342.ysmhgwcgutj27xp4@debian.vbox.lan>
Xref csiph.com linux.debian.user:224511

Show key headers only | View raw


On 7/7/2020 3:13 PM, Didar Hossain wrote:
> Hi,
>
> TL;DR
> How to get systemd-nspawn containers networking so that they can talk to each
> other, the host and the internet inside a Buster VM? VirtualBox on Windows 10
> which has internet connectivity via a wireless interface.
>
>
>
> I am running a Buster VM with hand picked minimal packages, networking is
> configured simply using interfaces(5) file with DHCP. I have configured a
> "NatNetwork" on VirtualBox which allows the VMs to connect to each other and the
> internet. I was wondering if I can do similar thing with containers inside the
> buster VM.
>
> I used `debbootstrap' to have a template directory of buster under
> "/opt/templates/buster". I then simply copy the directory tree over to
> "/var/lib/machines". I tried a few networking options of `systemd-nspawn', but
> since I am not well educated about macvlan, ipvlan, I could not get the
> networking working at all. I would like to avoid using
> "systemd-networkd/systemd-resolvd" especially on the Buster host - using those
> it seems should make everything work automagically.
>
> If it works then I will be able to test my Dovecot/Exim setup easily in such
> throwaway containers. I currently do testing using VMs.
>
> Does anyone have experience in having this kind of scenario working?
>

For testing purposes, I use in a Buster VM systemd-container.
That is if your VM has internet access the containers will also get
internet access .

For sake of simplicity, I would strongly suggest you to use in the VM
systemd-networkd to get the networking working between the containers
and the VM.

$ debootstrap --include=systemd-container

You need the above debootstrap pkg for systemd-networkd to work in the
container.

Then in the VM and in eatch container, simply enable systemd-networkd.


If you realy want to do the networking yourself, you will need to create
the bridge based on the examples found in '/lib/systemd/network'.

--
John Doe

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

systemd-nspawn networking inside VirtualBox VM Didar Hossain <didar@purlo.in> - 2020-07-07 15:40 +0200
  Re: systemd-nspawn networking inside VirtualBox VM john doe <johndoe65534@mail.com> - 2020-07-07 18:30 +0200
    Re: systemd-nspawn networking inside VirtualBox VM Alexandre Rossi <niol@zincube.net> - 2020-07-08 07:40 +0200
      Re: systemd-nspawn networking inside VirtualBox VM Didar Hossain <didar@purlo.in> - 2020-07-08 18:40 +0200
    Re: systemd-nspawn networking inside VirtualBox VM Didar Hossain <didar@purlo.in> - 2020-07-08 18:10 +0200

csiph-web