Network not working on LXD container

Hi i create lxd container, but child os do not have network.
my actions :

#install LXD
sudo snap install lxd

# init lxd

lxd init (all settings set by default)

#init child OS
lxc launch ubuntu:20.04 nextCloud
lxc exec  nextCloud bash 

#check network on child os 

ping 8.8.8.8
ping: connect: Network is unreachable

My child os network status :

root@nextCloud:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
5: eth0@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:16:3e:0f:26:60 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet6 fe80::216:3eff:fe0f:2660/64 scope link 
       valid_lft forever preferred_lft forever
root@nextCloud:~# ip r
root@nextCloud:~# 

My parent os network status:

enp6s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.100.2  netmask 255.255.255.0  broadcast 192.168.100.255
        inet6 fe80::1a67:b0ff:fe3e:8104  prefixlen 64  scopeid 0x20<link>
        ether 18:67:b0:3e:81:04  txqueuelen 1000  (Ethernet)
        RX packets 12897  bytes 2826549 (2.8 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 7335  bytes 669325 (669.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 264  bytes 20838 (20.8 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 264  bytes 20838 (20.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lxdbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.99.15.1  netmask 255.255.255.0  broadcast 0.0.0.0
        inet6 fe80::60a5:40ff:fe8a:42ef  prefixlen 64  scopeid 0x20<link>
        inet6 fd42:dbee:4b9f:45bf::1  prefixlen 64  scopeid 0x0<global>
        ether ee:16:f1:7c:31:8c  txqueuelen 1000  (Ethernet)
        RX packets 242  bytes 69113 (69.1 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 105  bytes 18812 (18.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth6a859f40: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether ee:16:f1:7c:31:8c  txqueuelen 1000  (Ethernet)
        RX packets 242  bytes 72501 (72.5 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 97  bytes 17912 (17.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

andrei@q:~$ lxc network list
+--------+----------+---------+-------------+---------+
|  NAME  |   TYPE   | MANAGED | DESCRIPTION | USED BY |
+--------+----------+---------+-------------+---------+
| enp6s0 | physical | NO      |             | 0       |
+--------+----------+---------+-------------+---------+
| lxdbr0 | bridge   | YES     |             | 1       |
+--------+----------+---------+-------------+---------+
| wlp3s0 | physical | NO      |             | 0       |
+--------+----------+---------+-------------+---------+
andrei@q:~$ lxc network show lxdbr0
config:
  ipv4.address: 10.99.15.1/24
  ipv4.nat: "true"
  ipv6.address: fd42:dbee:4b9f:45bf::1/64
  ipv6.nat: "true"
description: ""
name: lxdbr0
type: bridge
used_by:
- /1.0/instances/nextCloud
managed: true
status: Created
locations:
- none
andrei@q:~$ 

andrei@q:~$ lxc list 
+-----------+---------+------+------+-----------+-----------+
|   NAME    |  STATE  | IPV4 | IPV6 |   TYPE    | SNAPSHOTS |
+-----------+---------+------+------+-----------+-----------+
| nextCloud | RUNNING |      |      | CONTAINER | 0         |

That’s either firewall related or dnsmasq failed to start.
Show ps fauxww to figure out if dnsmasq is running.
And iptables -L -n -v to see if there’s something odd in your firewall.

You don’t say what distro you’re on, if you are on Fedora 32, then it’s likely firewalld, there is a section in our doc on how to workaround that.

If you’re not and you have Docker installed, it’s most likely Docker that broke networking on your system…

lsb_release -a


No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.4 LTS
Release:	18.04
Codename:	bionic

iptables -L -n -v

sudo iptables -L -n -v


Chain INPUT (policy ACCEPT 3692 packets, 466K bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     tcp  --  lxdbr0 *       0.0.0.0/0            0.0.0.0/0            tcp dpt:53 /* generated for LXD network lxdbr0 */
    0     0 ACCEPT     udp  --  lxdbr0 *       0.0.0.0/0            0.0.0.0/0            udp dpt:53 /* generated for LXD network lxdbr0 */
  133 42693 ACCEPT     udp  --  lxdbr0 *       0.0.0.0/0            0.0.0.0/0            udp dpt:67 /* generated for LXD network lxdbr0 */

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     all  --  *      lxdbr0  0.0.0.0/0            0.0.0.0/0            /* generated for LXD network lxdbr0 */
    0     0 ACCEPT     all  --  lxdbr0 *       0.0.0.0/0            0.0.0.0/0            /* generated for LXD network lxdbr0 */

Chain OUTPUT (policy ACCEPT 3327 packets, 527K bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     tcp  --  *      lxdbr0  0.0.0.0/0            0.0.0.0/0            tcp spt:53 /* generated for LXD network lxdbr0 */
    0     0 ACCEPT     udp  --  *      lxdbr0  0.0.0.0/0            0.0.0.0/0            udp spt:53 /* generated for LXD network lxdbr0 */
    0     0 ACCEPT     udp  --  *      lxdbr0  0.0.0.0/0            0.0.0.0/0            udp spt:67 /* generated for LXD network lxdbr0 */

ps fauxww

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         2  0.0  0.0      0     0 ?        S    Jun04   0:06 [kthreadd]
root         4  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [kworker/0:0H]
root         6  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [mm_percpu_wq]
root         7  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [ksoftirqd/0]
root         8  0.0  0.0      0     0 ?        I    Jun04   0:07  \_ [rcu_sched]
root         9  0.0  0.0      0     0 ?        I    Jun04   0:00  \_ [rcu_bh]
root        10  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [migration/0]
root        11  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [watchdog/0]
root        12  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [cpuhp/0]
root        13  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [cpuhp/1]
root        14  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [watchdog/1]
root        15  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [migration/1]
root        16  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [ksoftirqd/1]
root        18  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [kworker/1:0H]
root        19  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [kdevtmpfs]
root        20  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [netns]
root        21  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [rcu_tasks_kthre]
root        22  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [kauditd]
root        25  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [khungtaskd]
root        26  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [oom_reaper]
root        27  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [writeback]
root        28  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [kcompactd0]
root        29  0.0  0.0      0     0 ?        SN   Jun04   0:00  \_ [ksmd]
root        30  0.0  0.0      0     0 ?        SN   Jun04   0:00  \_ [khugepaged]
root        31  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [crypto]
root        32  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [kintegrityd]
root        33  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [kblockd]
root        34  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [ata_sff]
root        35  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [md]
root        36  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [edac-poller]
root        37  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [devfreq_wq]
root        38  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [watchdogd]
root        40  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [kswapd0]
root        41  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [kworker/u5:0]
root        42  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [ecryptfs-kthrea]
root        84  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [kthrotld]
root        85  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [acpi_thermal_pm]
root        92  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [ipv6_addrconf]
root       101  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [kstrp]
root       118  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [charger_manager]
root       159  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [scsi_eh_0]
root       160  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [scsi_tmf_0]
root       161  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [scsi_eh_1]
root       167  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [scsi_tmf_1]
root       169  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [scsi_eh_2]
root       172  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [scsi_tmf_2]
root       175  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [scsi_eh_3]
root       176  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [scsi_tmf_3]
root       184  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [irq/16-mmc0]
root       186  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [ttm_swap]
root       188  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [kworker/1:1H]
root       190  0.0  0.0      0     0 ?        I<   Jun04   0:03  \_ [kworker/0:1H]
root       258  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [raid5wq]
root       306  0.0  0.0      0     0 ?        S    Jun04   0:04  \_ [jbd2/sda2-8]
root       307  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [ext4-rsv-conver]
root       395  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [iscsi_eh]
root       397  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [ib-comp-wq]
root       398  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [ib-comp-unb-wq]
root       399  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [ib_mcast]
root       400  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [ib_nl_sa_wq]
root       401  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [rdma_cm]
root       411  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [loop0]
root       412  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [loop1]
root       415  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [loop2]
root       419  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [loop3]
root       423  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [loop4]
root       424  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [loop5]
root       427  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [loop6]
root       428  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [loop7]
root       430  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [loop8]
root       431  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [loop9]
root       435  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [loop10]
root       438  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [loop11]
root       439  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [loop12]
root       440  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [loop13]
root       441  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [loop14]
root       442  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [loop15]
root       443  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [loop16]
root       444  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [loop17]
root       480  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [cfg80211]
root       491  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [kworker/u5:1]
root      1524  0.0  0.0      0     0 ?        I<   Jun04   0:00  \_ [dio/sda2]
root      1583  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [spl_system_task]
root      1585  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [spl_delay_taskq]
root      1586  0.0  0.0      0     0 ?        S<   Jun04   0:03  \_ [spl_dynamic_tas]
root      1587  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [spl_kmem_cache]
root      1595  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [zvol]
root      1603  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [arc_prune]
root      1606  0.0  0.0      0     0 ?        S    Jun04   0:02  \_ [arc_reclaim]
root      1607  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [dbu_evict]
root      1608  0.0  0.0      0     0 ?        SN   Jun04   0:01  \_ [dbuf_evict]
root      1610  0.0  0.0      0     0 ?        SN   Jun04   0:09  \_ [z_vdev_file]
root      1611  0.0  0.0      0     0 ?        S    Jun04   0:02  \_ [l2arc_feed]
root      1682  0.0  0.0      0     0 ?        S<   Jun04   0:03  \_ [z_null_iss]
root      1683  0.0  0.0      0     0 ?        S<   Jun04   0:02  \_ [z_null_int]
root      1684  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_rd_iss]
root      1685  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_rd_int_0]
root      1686  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_rd_int_1]
root      1687  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_rd_int_2]
root      1688  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_rd_int_3]
root      1689  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_rd_int_4]
root      1690  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_rd_int_5]
root      1691  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_rd_int_6]
root      1692  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_rd_int_7]
root      1693  0.0  0.0      0     0 ?        S<   Jun04   0:30  \_ [z_wr_iss]
root      1694  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_wr_iss_h]
root      1695  0.0  0.0      0     0 ?        S<   Jun04   0:02  \_ [z_wr_int_0]
root      1696  0.0  0.0      0     0 ?        S<   Jun04   0:02  \_ [z_wr_int_1]
root      1697  0.0  0.0      0     0 ?        S<   Jun04   0:02  \_ [z_wr_int_2]
root      1698  0.0  0.0      0     0 ?        S<   Jun04   0:02  \_ [z_wr_int_3]
root      1699  0.0  0.0      0     0 ?        S<   Jun04   0:02  \_ [z_wr_int_4]
root      1700  0.0  0.0      0     0 ?        S<   Jun04   0:02  \_ [z_wr_int_5]
root      1701  0.0  0.0      0     0 ?        S<   Jun04   0:02  \_ [z_wr_int_6]
root      1702  0.0  0.0      0     0 ?        S<   Jun04   0:02  \_ [z_wr_int_7]
root      1703  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_wr_int_h]
root      1704  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_fr_iss_0]
root      1705  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_fr_iss_1]
root      1706  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_fr_iss_2]
root      1707  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_fr_iss_3]
root      1708  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_fr_iss_4]
root      1709  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_fr_iss_5]
root      1710  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_fr_iss_6]
root      1711  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_fr_iss_7]
root      1712  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_fr_int]
root      1713  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_cl_iss]
root      1714  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_cl_int]
root      1715  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_ioctl_iss]
root      1716  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [z_ioctl_int]
root      1717  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [z_zvol]
root      1718  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [z_prefetch]
root      1719  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [z_upgrade]
root      1720  0.0  0.0      0     0 ?        S<   Jun04   0:00  \_ [metaslab_group_]
root      1740  0.0  0.0      0     0 ?        SN   Jun04   0:02  \_ [dp_sync_taskq]
root      1741  0.0  0.0      0     0 ?        SN   Jun04   0:00  \_ [dp_zil_clean_ta]
root      1742  0.0  0.0      0     0 ?        SN   Jun04   0:00  \_ [dp_zil_clean_ta]
root      1743  0.0  0.0      0     0 ?        S    Jun04   0:00  \_ [z_iput]
root      1872  0.0  0.0      0     0 ?        S    Jun04   0:01  \_ [txg_quiesce]
root      1873  0.0  0.0      0     0 ?        S    Jun04   0:12  \_ [txg_sync]
root      1874  0.0  0.0      0     0 ?        S    Jun04   0:02  \_ [mmp]
root      6245  0.0  0.0      0     0 ?        I    Jun04   0:14  \_ [kworker/1:2]
root      8452  0.0  0.0      0     0 ?        I    00:00   0:04  \_ [kworker/1:1]
root     24749  0.0  0.0      0     0 ?        I    01:58   0:03  \_ [kworker/0:0]
root      8978  0.0  0.0      0     0 ?        S<   03:58   0:00  \_ [loop18]
root     23926  0.0  0.0      0     0 ?        I    05:42   0:00  \_ [kworker/u4:2]
root     25359  0.0  0.0      0     0 ?        I    05:54   0:00  \_ [kworker/u4:1]
root     25830  0.0  0.0      0     0 ?        I    05:59   0:00  \_ [kworker/0:2]
root     26782  0.0  0.0      0     0 ?        I    06:06   0:00  \_ [kworker/u4:0]
root     28771  0.0  0.0      0     0 ?        I    06:20   0:00  \_ [kworker/0:1]
root     29159  0.0  0.0      0     0 ?        S<   06:22   0:00  \_ [z_wr_int_0]
root     29162  0.0  0.0      0     0 ?        S<   06:22   0:00  \_ [z_wr_int_5]
root     29163  0.0  0.0      0     0 ?        S<   06:22   0:00  \_ [z_wr_int_6]
root     29164  0.0  0.0      0     0 ?        S<   06:22   0:00  \_ [z_wr_int_1]
root     29165  0.0  0.0      0     0 ?        S<   06:22   0:00  \_ [z_wr_int_0]
root     29166  0.0  0.0      0     0 ?        S<   06:22   0:00  \_ [z_wr_int_0]
root     29169  0.0  0.0      0     0 ?        S<   06:22   0:00  \_ [z_wr_int_2]
root     29171  0.0  0.0      0     0 ?        S<   06:22   0:00  \_ [z_wr_int_2]
root     29172  0.0  0.0      0     0 ?        S<   06:22   0:00  \_ [z_wr_int_2]
root     29176  0.0  0.0      0     0 ?        S<   06:22   0:00  \_ [z_wr_int_1]
root         1  0.0  0.2  78288  9368 ?        Ss   Jun04   0:07 /sbin/init
root       381  0.0  1.2 132912 46484 ?        S<s  Jun04   0:02 /lib/systemd/systemd-journald
root       405  0.0  0.0  97708  1900 ?        Ss   Jun04   0:00 /sbin/lvmetad -f
root       406  0.0  0.1  47128  5764 ?        Ss   Jun04   0:09 /lib/systemd/systemd-udevd
systemd+   671  0.0  0.0 141936  3156 ?        Ssl  Jun04   0:00 /lib/systemd/systemd-timesyncd
systemd+   806  0.0  0.1  80180  6028 ?        Ss   Jun04   0:00 /lib/systemd/systemd-networkd
systemd+   833  0.0  0.1  70640  5040 ?        Ss   Jun04   0:00 /lib/systemd/systemd-resolved
daemon     916  0.0  0.0  28332  2508 ?        Ss   Jun04   0:00 /usr/sbin/atd -f
root       919  0.0  0.0 110484  3576 ?        Ssl  Jun04   0:05 /usr/sbin/irqbalance --foreground
message+   920  0.0  0.1  50104  4728 ?        Rs   Jun04   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
root       937  0.0  0.4 169104 17296 ?        Ssl  Jun04   0:00 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
root       938  0.0  0.0  30028  3308 ?        Ss   Jun04   0:00 /usr/sbin/cron -f
root       952  0.0  0.3  56392 13508 ?        Ss   Jun04   0:14 /usr/bin/python -m SimpleHTTPServer 3031 &
root       954  0.0  0.0  95540  1624 ?        Ssl  Jun04   0:00 /usr/bin/lxcfs /var/lib/lxcfs/
root       957  0.0  0.1  70668  6252 ?        Ss   Jun04   0:01 /lib/systemd/systemd-logind
root       959  0.0  0.3  56392 13524 ?        Ss   Jun04   0:14 /usr/bin/python -m SimpleHTTPServer 3030 &
root       960  0.0  0.3 264064 12432 ?        Ss   Jun04   0:02 /usr/sbin/nmbd --foreground --no-process-group
syslog     962  0.0  0.1 267272  5224 ?        Ssl  Jun04   0:00 /usr/sbin/rsyslogd -n
root       963  0.0  0.7 1012960 28056 ?       Ssl  Jun04   0:33 /usr/lib/snapd/snapd
bind       964  0.0  0.5 290524 21596 ?        Ssl  Jun04   0:00 /usr/sbin/named -f -4 -u bind
root       965  0.0  0.2 452596  9716 ?        Ssl  Jun04   0:01 /snap/canonical-livepatch/95/canonical-livepatchd
root       966  0.0  0.1 286248  6940 ?        Ssl  Jun04   0:01 /usr/lib/accountsservice/accounts-daemon
root       996  0.0  0.5 185944 20136 ?        Ssl  Jun04   0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
root      1002  0.0  0.1  72300  6368 ?        Ss   Jun04   0:00 /usr/sbin/sshd -D
root     28769  0.0  0.2 107984  7276 ?        Ss   06:20   0:00  \_ sshd: andrei [priv]
andrei   28891  0.0  0.0 107984  3572 ?        S    06:20   0:00      \_ sshd: andrei@pts/0
andrei   28892  0.1  0.1  23468  5916 pts/0    Ss   06:20   0:00          \_ -bash
andrei   29178  0.0  0.1  40420  3956 pts/0    R+   06:22   0:00              \_ ps fauxww
root      1009  0.0  0.0  14888  1980 tty1     Ss+  Jun04   0:00 /sbin/agetty -o -p -- \u --noclear tty1 linux
root      1052  0.0  0.1 288884  6592 ?        Ssl  Jun04   0:00 /usr/lib/policykit-1/polkitd --no-debug
root      1222  0.0  0.5 355712 20600 ?        Ss   Jun04   0:00 /usr/sbin/smbd --foreground --no-process-group
root      1250  0.0  0.1 343660  6188 ?        S    Jun04   0:00  \_ /usr/sbin/smbd --foreground --no-process-group
root      1251  0.0  0.1 343652  4752 ?        S    Jun04   0:00  \_ /usr/sbin/smbd --foreground --no-process-group
root      1266  0.0  0.1 355712  6908 ?        S    Jun04   0:00  \_ /usr/sbin/smbd --foreground --no-process-group
root      1492  0.0  0.0 237212  1676 ?        Sl   Jun04   0:00 lxcfs /var/snap/lxd/common/var/lib/lxcfs -p /var/snap/lxd/common/lxcfs.pid
root     12876  0.0  0.4 1313672 17184 ?       Ss   Jun04   0:00 [lxc monitor] /var/snap/lxd/common/lxd/containers nextCloud
1000000  12889  0.0  0.2 169588  8080 ?        Ss   Jun04   0:01  \_ /sbin/init
1000000  13033  0.0  0.2  35244  9108 ?        Ss   Jun04   0:01      \_ /lib/systemd/systemd-journald
1000000  13088  0.0  0.0  21592  3076 ?        Ss   Jun04   0:00      \_ /lib/systemd/systemd-udevd
1000000  13131  0.0  0.0   3612  1508 ?        Ss   Jun04   0:00      \_ snapfuse /var/lib/snapd/snaps/core18_1754.snap /snap/core18/1754 -o ro,nodev,allow_other,suid
1000000  13132  0.0  0.0   3660  1340 ?        Ss   Jun04   0:00      \_ snapfuse /var/lib/snapd/snaps/lxd_15223.snap /snap/lxd/15223 -o ro,nodev,allow_other,suid
1000000  13134  0.0  0.0   3488  1260 ?        Ss   Jun04   0:00      \_ snapfuse /var/lib/snapd/snaps/snapd_7264.snap /snap/snapd/7264 -o ro,nodev,allow_other,suid
1000100  13299  0.0  0.1  18548  5528 ?        Ss   Jun04   0:01      \_ /lib/systemd/systemd-networkd
1000101  13323  0.0  0.2  24116  9384 ?        Ss   Jun04   0:03      \_ /lib/systemd/systemd-resolved
1000000  13794  0.0  0.1 241020  5888 ?        Ssl  Jun04   0:01      \_ /usr/lib/accountsservice/accounts-daemon
1000000  13801  0.0  0.0   8540  1916 ?        Ss   Jun04   0:00      \_ /usr/sbin/cron -f
1000103  13802  0.0  0.0   7400  3020 ?        Ss   Jun04   0:00      \_ /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
1000000  13807  0.0  0.4  29216 14704 ?        Ss   Jun04   0:00      \_ /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
1000104  13808  0.0  0.0 154816  3144 ?        Ssl  Jun04   0:00      \_ /usr/sbin/rsyslogd -n -iNONE
1000000  13810  0.3  0.6 940492 25136 ?        Ssl  Jun04   1:57      \_ /usr/lib/snapd/snapd
1000000  13812  0.0  0.1  16636  5484 ?        Ss   Jun04   0:01      \_ /lib/systemd/systemd-logind
1000001  13818  0.0  0.0   3796  1636 ?        Ss   Jun04   0:00      \_ /usr/sbin/atd -f
1000000  13837  0.0  0.0   7356  1424 pts/0    Ss+  Jun04   0:00      \_ /sbin/agetty -o -p -- \u --noclear --keep-baud console 115200,38400,9600 linux
1000000  13843  0.0  0.1  12164  4408 ?        Ss   Jun04   0:00      \_ sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
1000000  13865  0.0  0.1 236412  6044 ?        Ssl  Jun04   0:00      \_ /usr/lib/policykit-1/polkitd --no-debug
1000000  14119  0.0  0.4 108040 16304 ?        Ssl  Jun04   0:00      \_ /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
root      9673  0.0  0.0   4640  1848 ?        Ss   03:59   0:00 /bin/sh /snap/lxd/15359/commands/daemon.start
root      9797  0.1  2.3 1721512 85444 ?       Sl   03:59   0:10  \_ lxd --logfile /var/snap/lxd/common/lxd/logs/lxd.log --group lxd
andrei   28772  0.0  0.2  76948  8116 ?        Ss   06:20   0:00 /lib/systemd/systemd --user
andrei   28773  0.0  0.0 112268  2948 ?        S    06:20   0:00  \_ (sd-pam)

Yep dnsmasq doesn’t appear to be running.

Please show output of sudo netstat -ulpn on the LXD host, to see if there is another process preventing it from starting.

Similar to LXD containers doesn't have IPV4 address and cant access to network (bridge)

1 Like
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
udp        0      0 10.99.15.1:53           0.0.0.0:*                           964/named           
udp        0      0 192.168.100.2:53        0.0.0.0:*                           964/named           
udp        0      0 127.0.0.1:53            0.0.0.0:*                           964/named           
udp        0      0 127.0.0.53:53           0.0.0.0:*                           833/systemd-resolve 
udp        0      0 192.168.100.2:68        0.0.0.0:*                           806/systemd-network 
udp        0      0 10.99.15.255:137        0.0.0.0:*                           960/nmbd            
udp        0      0 10.99.15.1:137          0.0.0.0:*                           960/nmbd            
udp        0      0 192.168.100.255:137     0.0.0.0:*                           960/nmbd            
udp        0      0 192.168.100.2:137       0.0.0.0:*                           960/nmbd            
udp        0      0 0.0.0.0:137             0.0.0.0:*                           960/nmbd            
udp        0      0 10.99.15.255:138        0.0.0.0:*                           960/nmbd            
udp        0      0 10.99.15.1:138          0.0.0.0:*                           960/nmbd            
udp        0      0 192.168.100.255:138     0.0.0.0:*                           960/nmbd            
udp        0      0 192.168.100.2:138       0.0.0.0:*                           960/nmbd            
udp        0      0 0.0.0.0:138             0.0.0.0:*                           960/nmbd            
udp6       0      0 fe80::1a67:b0ff:fe3:546 :::*                                806/systemd-network 

You have named listening on the LXD bridge’s lxdbr0 interface’s IP (10.99.15.1) this will prevent LXD’s dnsmasq from starting on that interface and break DNS and DHCP for containers.

2 Likes

ok i am stop a bind9 on my server, how to me restart a dnsmasq service?

If you restart LXD service it will start dnsmasq.

thanks all is work )