uli@ubuntu1604-64:~$ sudo lxd init
Name of the storage backend to use (dir or zfs) [default=zfs]: zfs
Create a new ZFS pool (yes/no) [default=yes]? yes
Name of the new ZFS pool [default=lxd]: lxd
Would you like to use an existing block device (yes/no) [default=no]? yes
Path to the existing block device: /dev/ubuntu1604-64-vg/zfslv
Would you like LXD to be available over the network (yes/no) [default=no]? no
Do you want to configure the LXD bridge (yes/no) [default=yes]? yes
Warning: Stopping lxd.service, but it can still be activated by:
lxd.socket
LXD has been successfully configured.
uli@ubuntu1604-64:~$
LXD bridge
12345678910111213141516
┌──────────────────────────────┤ Konfiguriere lxd ├──────────────────────────────┐
│ │
│ Containers need a bridge to connect them together and to the host for outside │
│ network connectivity. │
│ │
│ Choosing this option will let you configure the default LXD bridge to your │
│ liking. │
│ │
│ If you would rather not have LXD do this for you, then you will be asked │
│ whether you want to use an existing bridge or just do everything manually. │
│ │
│ Would you like to setup a network bridge for LXD containers now? │
│ │
│ <Ja> Nein │
│ │
└────────────────────────────────────────────────────────────────────────────────┘
┌───────────────────────┤ Konfiguriere lxd ├────────────────────────┐
│ │
│ This is needed to provide IPv4 connectivity for your containers. │
│ │
│ Do you want to setup an IPv4 subnet? │
│ │
│ <Ja> Nein │
│ │
└───────────────────────────────────────────────────────────────────┘
LXD bridge - IPv4 random subnet
12345678910111213141516
┌──────────────────────────────┤ Konfiguriere lxd ├──────────────────────────────┐
│ │
│ A random subnet was selected for you │
│ │
│ This subnet was selected for your convenience and the next questions have │
│ been pre-answered accordingly. │
│ │
│ Please make sure this subnet isn't already in use somewhere on your network, │
│ if it is, change it to one which isn't. │
│ │
│ If you later notice network connectivity issues, re-configure lxd and pick a │
│ different subnet. │
│ │
│ <Ok> │
│ │
└────────────────────────────────────────────────────────────────────────────────┘
┌─────────────────────┤ Konfiguriere lxd ├──────────────────────┐
│ The first address to be handed out over DHCP (e.g. 10.0.8.2) │
│ │
│ First DHCP address: │
│ │
│ 10.16.128.2__________________________________________________ │
│ │
│ <Ok> │
│ │
└───────────────────────────────────────────────────────────────┘
LXD bridge - IPv4 Last DHCP address
12345678910
┌──────────────────────┤ Konfiguriere lxd ├──────────────────────┐
│ The last address to be handed out over DHCP (e.g. 10.0.8.254) │
│ │
│ Last DHCP address: │
│ │
│ 10.16.128.254_________________________________________________ │
│ │
│ <Ok> │
│ │
└────────────────────────────────────────────────────────────────┘
LXD bridge - IPv4 Number of DHCP clients
12345678910
┌────────────────────────┤ Konfiguriere lxd ├─────────────────────────┐
│ The maximum number of DHCP leases that can be obtained. (e.g. 250) │
│ │
│ Max number of DHCP clients: │
│ │
│ 252________________________________________________________________ │
│ │
│ <Ok> │
│ │
└─────────────────────────────────────────────────────────────────────┘
LXD bridge - IPv4 NAT
123456789
┌────────────────────┤ Konfiguriere lxd ├────────────────────┐
│ │
│ This is needed unless you are using a routed IPv4 subnet. │
│ │
│ Do you want to NAT the IPv4 traffic? │
│ │
│ <Ja> Nein │
│ │
└────────────────────────────────────────────────────────────┘
LXD bridge - IPv6 subnet
123456789
┌───────────────────────┤ Konfiguriere lxd ├────────────────────────┐
│ │
│ This is needed to provide IPv6 connectivity for your containers. │
│ │
│ Do you want to setup an IPv6 subnet? │
│ │
│ Ja <Nein> │
│ │
└───────────────────────────────────────────────────────────────────┘
LXC Container einrichten
12345678
uli@ubuntu1604-64:~$ lxc launch ubuntu:16.04 ubuntu-1604
Generating a client certificate. This may take a minute...
If this is your first time using LXD, you should also run: sudo lxd init
To start your first container, try: lxc launch ubuntu:16.04
ubuntu-1604 wird erstellt
Retrieving image: 100%
ubuntu-1604 wird gestartet
LXC-Liste anzeigen
123456
uli@ubuntu1604-64:~$ lxc list
+-------------+---------+---------------------+------+------------+-----------------+
| NAME | STATUS | IPV4 | IPV6 | TYP | SCHNAPPSCHÜSSE |
+-------------+---------+---------------------+------+------------+-----------------+
| ubuntu-1604 | RUNNING | 10.16.128.86 (eth0) | | PERSISTENT | 0 |
+-------------+---------+---------------------+------+------------+-----------------+