No network on a droplet created from a custom Ubuntu 20.04 image


I have created a custom image - Ubuntu 20.04 LTS on Virtualbox following the Digital Ocean instructions ( to configure the cloud-init and datasources and have exported it.

When I import it and create a droplet from it, I cannot SSH into it and when using the console there is no network i.e. cannot ping a web address (Temporary failure in name resolution) or (Network is unreachable).

When I run the commands: sudo ifconfig eth0 netmask up

ip route add default via

And add into the /etc/resolv.conf file it all works and I can ssh into the server.

Should I have to do all this? What stage have I done something wrong?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I was facing the same issue with my custom Ubuntu 20.04 image and this worked for me:

  1. Remove the config file that disables networking
rm /etc/cloud/cloud.cfg.d/subiquity-disable-cloudinit-networking.cfg
  1. Generate /etc/netplan/50-cloud-init.yaml and reboot
cloud-init clean -r
  1. Edit /etc/netplan/50-cloud-init.yaml to add dhcp4: true to the network adapter options (probably a better way to do this but I just want it to work)

  2. Reboot

After this last reboot, the network adapter was present, assigned an IPv4 address and I was able to SSH.