Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #224511
| From | john doe <johndoe65534@mail.com> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: systemd-nspawn networking inside VirtualBox VM |
| Date | 2020-07-07 18:30 +0200 |
| Message-ID | <ApYDL-3mL-1@gated-at.bofh.it> (permalink) |
| References | <ApVZf-1HS-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
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