Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Buster - lxc-net missing?

User discussion about Debian Development, Debian Project News and Announcements. Not for support questions.
Post Reply
Message
Author
rsi
Posts: 21
Joined: 2014-10-20 00:52

Buster - lxc-net missing?

#1 Post by rsi »

What is wrong with the buster (testing) development?

https://wiki.debian.org/LXC#Installation
Stretch ships with a new major release of LXC which also includes a helper for easier networking setup called lxc-net. lxc-net allows you to set up a simple bridge for your containers, providing a DHCP-and-NATed IPv4 network. IPv6 support currently (in Stretch) requires manual configuration.
But on buster the 'lxc-net' is missing?!

Code: Select all

root@vmm:/etc/lxc# lxc-net
bash: lxc-net: command not found

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Buster - lxc-net missing?

#2 Post by GarryRicketson »

Well, since Debian Buster, is still in the testing stages, and not a stable release,
maybe something is not ready yet, but it looks like the package is available:
https://packages.debian.org/buster/lxc

Looking closer at the wiki: https://wiki.debian.org/LXC#Installation,

I see this :
Missing configuration is sourced from /usr/lib/x86_64-linux-gnu/lxc/lxc-net which contains the default values which means your bridge will be given a subnet of 10.0.3.0. You can change these values if you want in the /etc/default/lxc-net file. There is an Ubuntu patch to /usr/lib/x86_64-linux-gnu/lxc/lxc-net (or /usr/lib/<architecture/lxc/lxc-net) available at its packaging on Github called 0001-Allocate-new-lxcbr0-subnet-at-startup-time.patch that will automatically configure /etc/default/lxc-net with a subnet that is available on your system; typically 10.0.3.0 would just be available. It would pick any free subnet in the range of 10.0.x.0 going up with 10.0.3.0 as the starting point. This is done on system boot in case /etc/default/lxc-net is missing. So in order to use it, you must then delete this file first.
For other purposes, see /SimpleBridge#Using_lxc-net for values you can add yourself.
The Wiki also has a link pointing to this:
https://wiki.debian.org/LXC/SimpleBridge#Using_lxc-net
This information is put in the file /etc/default/lxc-net.

This is also the default configuration for LXC-net as started with Debian Stretch in the default configuration (setup) without the patch applied to it (see the main page)

After creating this file with the required config you can simply start the service with:

systemctl start lxc-net after enabling it with systemctl enable lxc-net. This is covered in the introduction at the Main Page. Commands:

Code: Select all

systemctl enable lxc-net
systemctl start lxc-net
This information is put in the file /etc/default/lxc-net
rsi »

Code: Select all

root@vmm:/etc/lxc# lxc-net
bash: lxc-net: command not found 
"lxc-net" is a file, not a command, the correct command to start lxc, is :

Code: Select all

systemctl start lxc-net 
But be sure you have enabled it first:

Code: Select all

systemctl enable lxc-net 
The manual should have more details
There also is a pretty good tutorial here:
https://angristan.xyz/setup-network-bridge-lxc-net/

L_V
Posts: 1477
Joined: 2007-03-19 09:04
Been thanked: 11 times

Re: Buster - lxc-net missing?

#3 Post by L_V »

rsi wrote:But on buster the 'lxc-net' is missing ?!

Code: Select all

apt-file search lxc-net
   lxc: /etc/init.d/lxc-net
   lxc: /lib/systemd/system/lxc-net.service
   lxc: /usr/lib/x86_64-linux-gnu/lxc/lxc-net

Code: Select all

apt policy lxc

rsi
Posts: 21
Joined: 2014-10-20 00:52

Re: Buster - lxc-net missing?

#4 Post by rsi »

Hello and thank you for your hints!
I've missunderstand some things in lxc and the use of it. So, problem is mostly on my side.

Sorry!

Post Reply