Discussion:
Is there a reference manual about LXD ?
(too old to reply)
Pierre Couderc
2017-10-21 00:34:03 UTC
Permalink
Sorry,  I have not fount it.

I have installed LXD on stretch following Stéphane
https://stgraber.org/2017/01/18/lxd-on-debian.

Fine ! an infinite  progress after my successful install of lxc on
jessie, it seems to me 20 years ago, following  :

https://myles.sh/configuring-lxc-unprivileged-containers-in-debian-jessie/


But, this LXD was a trial. I have installed, it works immediately !

But using all defaults, it is not what I need and I want to reinstall it :

1-Is there a reference manual about LXD so that  I ask for help here
after RTFM and not before as now...

2- How do I erase my first trial : I try to reinit but i says me that :

The requested storage pool "default" already exists. Please choose
another name.

How do I erase the the  storage pool "default" ?

3- My true problem is that I do not want the NAT for my new lxc
containers but that they use the normal addresses on my local network.
How do I do that ?

And how do I assign them a MAC address so they  are accessible from the
internet.

Anyway, a a newby to LXD, the fact that the command  is named sometimes
lxd other times lxc is a, mmm...,   surprise !

I am sure there is a good logic behind that, but it is  a surprise....

Thank you for lxc/lxd !

PC
Fajar A. Nugraha
2017-10-21 04:12:03 UTC
Permalink
Sorry, I have not fount it.
I have installed LXD on stretch following Stéphane
https://stgraber.org/2017/01/18/lxd-on-debian.
Fine ! an infinite progress after my successful install of lxc on jessie,
https://myles.sh/configuring-lxc-unprivileged-containers-in-debian-jessie/
But, this LXD was a trial. I have installed, it works immediately !
1-Is there a reference manual about LXD so that I ask for help here after
RTFM and not before as now...
Note that it's MUCH easier to use lxd on ubuntu 16.04, with
xenial-backports to get the 'best' combination of 'new features' and
'tested'. It has lxd 2.18, with support for storage pools. If you're using
this version, the most relevant documentation would be from git master
branch: https://github.com/lxc/lxd/tree/master/doc

If you're using it for production and want long term support, use the
default xenial repository instead (not backports), which has lxd 2.0.x.
It's supported for longer time, but doesn't have new features (like storage
pools). The relevant docs for this version is either
https://github.com/lxc/lxd/tree/stable-2.0/doc or
https://help.ubuntu.com/lts/serverguide/lxd.html
The requested storage pool "default" already exists. Please choose another
name.
How do I erase the the storage pool "default" ?
Might be hard if you're using file-backed zfs-pool. On ubuntu it's probably
something like this:
- systemctl disable lxd
- reboot
- rename /var/lib/lxd to something else, then create an empty /var/lib/lxd
- systemctl enable lxd
- systemctl start lxd
- lxd init

I'm not sure how the path and startup script would translate to debian +
lxd from snapd (which is in the link you mentioned)
3- My true problem is that I do not want the NAT for my new lxc containers
but that they use the normal addresses on my local network. How do I do
that ?
The usual way:
- create your own bridge, e.g. br0 in
https://help.ubuntu.com/community/NetworkConnectionBridge (that example
bridges eth0 and eth1 on the same bridge. use the relevant public interface
for your setup)
- configure your container (or profile) to use it (replacing the default
lxdbr0).
- no need to delete existing lxdbr0, just leave it as is.


The 'new' way: looking at
https://github.com/lxc/lxd/blob/master/doc/networks.md , it should be
possible to create the bridge using 'lxc network create ...'
And how do I assign them a MAC address so they are accessible from the
internet.
This depends on your setup.

For example, if you rent dedicated server from serverloft (or other
providers with similar networking setup), they do NOT allow bridging of VMs
to the public network. You need to setup routing instead (long story).

But if you're on a LAN, then 'making the containers be on the same LAN is
the host' is as simple as 'configure the container to use br0' (or whatever
bridge you create above). If the LAN has a DHCP server, then the container
will automatically get a 'public' IP addres. If not, then configure it
statically (just like how you configure a normal linux host)
--
Fajar
Pierre Couderc
2017-10-21 09:03:15 UTC
Permalink
Post by Fajar A. Nugraha
Note that it's MUCH easier to use lxd on ubuntu 16.04, with
xenial-backports to get the 'best' combination of 'new features' and
'tested'. It has lxd 2.18, with support for storage pools. If you're
using this version, the most relevant documentation would be from git
master branch: https://github.com/lxc/lxd/tree/master/doc
Thank you very much
Post by Fajar A. Nugraha
If you're using it for production and want long term support, use the
default xenial repository instead (not backports), which has lxd
2.0.x. It's supported for longer time, but doesn't have new features
(like storage pools). The relevant docs for this version is either
https://github.com/lxc/lxd/tree/stable-2.0/doc or
https://help.ubuntu.com/lts/serverguide/lxd.html
The requested storage pool "default" already exists. Please choose
another name.
How do I erase the the  storage pool "default" ?
Might be hard if you're using file-backed zfs-pool. On ubuntu it's
- systemctl disable lxd
- reboot
- rename /var/lib/lxd to something else, then create an empty /var/lib/lxd
- systemctl enable lxd
- systemctl start lxd
- lxd init
I'm not sure how the path and startup script would translate to debian
+ lxd from snapd (which is in the link you mentioned)
I have not successed. But as it is a new server, I reinstall all !
Post by Fajar A. Nugraha
3- My true problem is that I do not want the NAT for my new lxc
containers but that they use the normal addresses on my local
network. How do I do that ?
- create your own bridge, e.g. br0 in
https://help.ubuntu.com/community/NetworkConnectionBridge (that
example bridges eth0 and eth1 on the same bridge. use the relevant
public interface for your setup)
- configure your container (or profile) to use it (replacing the
default lxdbr0).
- no need to delete existing lxdbr0, just leave it as is.
The 'new' way: looking at
https://github.com/lxc/lxd/blob/master/doc/networks.md , it should be
possible to create the bridge using 'lxc network create ...'
And how do I assign them a MAC address so they  are accessible
from the internet.
This depends on your setup.
For example, if you rent dedicated server from serverloft (or other
providers with similar networking setup), they do NOT allow bridging
of VMs to the public network. You need to setup routing instead (long
story).
But if you're on a LAN, then 'making the containers be on the same LAN
is the host' is as simple as 'configure the container to use br0' (or
whatever bridge you create above). If the LAN has a DHCP server, then
the container will automatically get a 'public' IP addres. If not,
then configure it statically (just like how you configure a normal
linux host)
--
Thanl you.
Post by Fajar A. Nugraha
_______________________________________________
lxc-users mailing list
http://lists.linuxcontainers.org/listinfo/lxc-users
gunnar.wagner
2017-10-23 04:19:41 UTC
Permalink
Post by Fajar A. Nugraha
Note that it's MUCH easier to use lxd on ubuntu 16.04, with
xenial-backports to get the 'best' combination of 'new features' and
'tested'. It has lxd 2.18, with support for storage pools. If you're
using this version, the most relevant documentation would be from git
master branch: https://github.com/lxc/lxd/tree/master/doc
isn't it even easier (and also the default way to use LXD in the future)
to go with the snap package?

   sudo snap install lxd
Pierre Couderc
2017-10-23 06:19:46 UTC
Permalink
Post by gunnar.wagner
Post by Fajar A. Nugraha
Note that it's MUCH easier to use lxd on ubuntu 16.04, with
xenial-backports to get the 'best' combination of 'new features' and
'tested'. It has lxd 2.18, with support for storage pools. If you're
using this version, the most relevant documentation would be from git
master branch: https://github.com/lxc/lxd/tree/master/doc
I did not write this.
PC
Post by gunnar.wagner
isn't it even easier (and also the default way to use LXD in the
future) to go with the snap package?
   sudo snap install lxd
Certainly. I have no problem  using this way.
Except that I was unable to uninstall it. But it is not a problem for me.
Simos Xenitellis
2017-10-25 09:45:17 UTC
Permalink
Sorry, I have not fount it.
I have installed LXD on stretch following Stéphane
https://stgraber.org/2017/01/18/lxd-on-debian.
Fine ! an infinite progress after my successful install of lxc on jessie,
https://myles.sh/configuring-lxc-unprivileged-containers-in-debian-jessie/
But, this LXD was a trial. I have installed, it works immediately !
1-Is there a reference manual about LXD so that I ask for help here after
RTFM and not before as now...
The requested storage pool "default" already exists. Please choose another
name.
How do I erase the the storage pool "default" ?
3- My true problem is that I do not want the NAT for my new lxc containers
but that they use the normal addresses on my local network. How do I do that
?
And how do I assign them a MAC address so they are accessible from the
internet.
Anyway, a a newby to LXD, the fact that the command is named sometimes lxd
other times lxc is a, mmm..., surprise !
I am sure there is a good logic behind that, but it is a surprise....
I blogged about this at https://blog.simos.info/how-to-initialize-lxd-again/
In general, there are a few differences between LXD 2.0.x and LXD 2.18+.

Simos
Pierre Couderc
2017-10-25 12:24:23 UTC
Permalink
Post by Simos Xenitellis
Post by Pierre Couderc
I have installed LXD on stretch following Stéphane
https://stgraber.org/2017/01/18/lxd-on-debian.
But, this LXD was a trial. I have installed, it works immediately !
And how do I..?
I blogged about this at https://blog.simos.info/how-to-initialize-lxd-again/
In general, there are a few differences between LXD 2.0.x and LXD 2.18+.
Thank you very much, it is very useful. And I had found it.
But I did not use it because, as it was a new installation, I found
simpler to resinstall the full debian and init LXD correclly...

Continue reading on narkive:
Loading...