If you are creating the br0 network in the host, LXD shouldn’t manage it directly. You could still make use of it by referencing it in your default profile for example.
This seemed to work, but my container doesn’t get a network from this:
$ lxc launch ubuntu:20.04 first
Creating first
The instance you are starting doesn't have any network attached to it.
To create a new network, use: lxc network create
To attach a network to an instance, use: lxc network attach
Starting first
$ lxc list
+-------+---------+------+------+-----------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+-------+---------+------+------+-----------+-----------+
| first | RUNNING | | | CONTAINER | 0 |
+-------+---------+------+------+-----------+-----------+
The network seems to be there.
$ lxc network list
+---------+----------+---------+------+------+-------------+---------+-------+
| NAME | TYPE | MANAGED | IPV4 | IPV6 | DESCRIPTION | USED BY | STATE |
+---------+----------+---------+------+------+-------------+---------+-------+
| br0 | bridge | NO | | | | 0 | |
+---------+----------+---------+------+------+-------------+---------+-------+
| eno1np0 | physical | NO | | | | 0 | |
+---------+----------+---------+------+------+-------------+---------+-------+
| eno2np1 | physical | NO | | | | 0 | |
+---------+----------+---------+------+------+-------------+---------+-------+
Do I have to do something to reload the config or something after I run:
lxd init --preseed myconf.yaml
Is it safe to run it over and over for my testing or does lxd need something to reset the config after I run this multiple times for testing my config?
I don’t mind at all losing the config as I’m testing now.
Also, I have to empty the ZFS pool used in my preseed with something like this or the preseed will complain that the pool is not empty:
zfs destroy default/*
This is useful to know for anyone trying to reset to test automation etc. OR is there a way to reuse an already existing ZFS pool? That would be good to know also.