lxd initでdnsmasqエラーが発生しました - アドレスはすでに使用されています

lxd initでdnsmasqエラーが発生しました - アドレスはすでに使用されています

デスクトップUbuntu 18.04でlxdを試みると、次のエラーが発生します。

 sudo lxd init                         
Would you like to use LXD clustering? (yes/no) [default=no]: 
Do you want to configure a new storage pool? (yes/no) [default=yes]: 
Name of the new storage pool [default=default]: 
Name of the storage backend to use (btrfs, ceph, dir, lvm, zfs) [default=zfs]: dir
Would you like to connect to a MAAS server? (yes/no) [default=no]: 
Would you like to create a new local network bridge? (yes/no) [default=yes]: 
What should the new bridge be called? [default=lxdbr0]: 
What IPv4 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]: 
What IPv6 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]: none
Would you like LXD to be available over the network? (yes/no) [default=no]: 
Would you like stale cached images to be updated automatically? (yes/no) [default=yes] 
Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]: 
Error: Failed to create network 'lxdbr0': Failed to run: dnsmasq --strict-order --bind-interfaces --pid-file=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.pid --except-interface=lo --no-ping --interface=lxdbr0 --quiet-dhcp --quiet-dhcp6 --quiet-ra --listen-address=10.139.93.1 --dhcp-no-override --dhcp-authoritative --dhcp-leasefile=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.leases --dhcp-hostsfile=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.hosts --dhcp-range 10.139.93.2,10.139.93.254,1h -s lxd -S /lxd/ --conf-file=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.raw -u lxd: Failed to run: dnsmasq --strict-order --bind-interfaces --pid-file=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.pid --except-interface=lo --no-ping --interface=lxdbr0 --quiet-dhcp --quiet-dhcp6 --quiet-ra --listen-address=10.139.93.1 --dhcp-no-override --dhcp-authoritative --dhcp-leasefile=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.leases --dhcp-hostsfile=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.hosts --dhcp-range 10.139.93.2,10.139.93.254,1h -s lxd -S /lxd/ --conf-file=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.raw -u lxd: dnsmasq: failed to create listening socket for 10.139.93.1: Address already in use

コマンドを実行する前に、dnsmasqが10.139.93.1でリッスンしていないことを確認できることを確認しました。上記の命令を実行した後、10.139.93.1で実行されるため、エラーは存在しますが自覚しているようです。

ベストアンサー1

自覚しているように見えるかもしれませんが、lxdは実際に別のdnsmasqプロセスを実行しようとします。コマンドの実行後に表示されるdnsmasqインスタンスは、新しく作成されたlxdブリッジを非常に迅速に変更するシステム/既存のdnsmasqインスタンスである可能性があります。ソケットがオンになっています。lxd initコマンドで生成されたlxdブリッジ

libvirtには同じ問題がありますが、実際にファイルが重要な行で始まるようにして(Ubuntuで)/etc/dnsmasq.d/libvirt-daemon問題を解決します。except-interface=...

lxdには同じものが必要です。次の行を追加すると信じます/etc/dnsmasq.d/lxd

except-interface=lxdbr0

おすすめ記事