[LXD 4.2] custom image

Hello.

I tried to build my own custom image from debootstrap. This image was maked on a ext4 partition. I have make this image on a older installation of LXD and this lxd init at this moment was setted to use dir storage and the same lxdbr0 bridge. The difference with my current LXD installation is now I use external btrfs storage and I had setted to none the ipv6 instead of auto. I have same templates as the images:deian/buster (host.tpl hostname.tpl and another one to get a random machine-id. This image build nicely and run but I don’t have ipv4 returned by lxc list :thinking:

I using LXD on fedora and a test from the images:debian/10/amd64 get an ipv4 address using the same profile.

If anyone have an idea about why my custom image doesn’t have an ipv4 address ?

(the main goal here is to understand how and make my own image same as images found on the images: remote)

Check the NIC device name appearing in your container is eth0 and that your custom image runs a DHCP client for that interface on boot.

Okay. I have update the /etc/network/interfaces same as the images:debian/10/amd64 and now I have an IPv4. I have the same resolv.conf ; /etc/network/interfaces ; /etc/host files as the remote image too.

But ping on the container ip not works on my custom container (but works with the other container). :thinking:

ifdown eth0 && ifup eth0 finish the job. But probably unless if the image is binded correctly before building the container…

Thank you tomp for you help