<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class="">
<div style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; widows: 2; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; widows: 2; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; widows: 2; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; widows: 2; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Hi all,</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">I’m running lxd 3.0.0 on Ubuntu 18.04 and I would like to use NAT/bridge networking for most containers, but with the possibility to fix the IP address myself (to ease some cluster config in Ansible).</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">I’ve tried many things and read a lot around, but didn’t find anything that works.</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div class="">I tried "<span style="background-color: rgb(255, 255, 255); text-align: -webkit-auto;" class=""><font face="Monaco" size="2" class="">lxc config device set mycontainer eth0 ipv4.address 10.25.240.139” </font></span><span style="text-align: -webkit-auto;" class=""> it returns: </span><span style="font-family: Monaco; font-size: 10px; background-color: rgb(255, 255, 255); text-align: -webkit-auto;" class="">Error: The device doesn't exist (source: </span><span style="text-align: -webkit-auto;" class=""><font face="Monaco" size="2" class=""><a href="https://blog.ubuntu.com/2017/02/14/network-management-with-lxd-2-3" class="">https://blog.ubuntu.com/2017/02/14/network-management-with-lxd-2-3</a>)</font></span></div><div class=""><span style="text-align: -webkit-auto;" class=""><font face="Monaco" size="2" class=""><br class=""></font></span></div><div class="">The lxdbr0 bridged network is inherited by the container from the ‘default profile’ and lxdbr0 config is:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">lxc network show lxdbr0</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">config:</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> dns.mode: dynamic</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> ipv4.address: 10.115.240.1/24</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> ipv4.dhcp.ranges: 10.115.240.2-10.115.240.100</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> ipv4.nat: "true"</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> ipv6.address: fd3f:a1a8:9bb:fb1e::1/64</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">description: ""</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">name: lxdbr0</span></div><div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Monaco; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">type: bridge</span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">If I check "</span><span style="background-color: rgb(255, 255, 255); text-align: -webkit-auto;" class=""><font face="Monaco" size="2" class="">lxc network list-leases lxdbr0” all IP adresses are “DYNAMIC</font></span><font face="Monaco" size="2" class="">” should it be changed to static somewhere?</font></div><div class=""><br class=""></div><div class="">Is there a way to tell lxd’s dhcp server what IP to use for a specific container?</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Thanks for any help.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class=""><br class=""></div><div class="">Michel</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><span style="text-align: -webkit-auto;" class=""><font face="Monaco" size="2" class=""><br class=""></font></span></div><div class=""><span style="text-align: -webkit-auto;" class=""><font face="Monaco" size="2" class=""><br class=""></font></span></div></div></div></div></div></div></div></div></div></div></body></html>