By laureng
Hello,
I have created a custom image - Ubuntu 20.04 LTS on Virtualbox following the Digital Ocean instructions (https://www.digitalocean.com/community/tutorials/how-to-create-a-digitalocean-droplet-from-an-ubuntu-iso-format-image) 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 8.8.8.8 (Network is unreachable).
When I run the commands: sudo ifconfig eth0 207.154.193.4 netmask 255.255.240.0 up
ip route add default via 207.154.192.1
And add 8.8.8.8 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?
Thanks
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!
I was facing the same issue with my custom Ubuntu 20.04 image and this worked for me:
rm /etc/cloud/cloud.cfg.d/subiquity-disable-cloudinit-networking.cfg
/etc/netplan/50-cloud-init.yaml and rebootcloud-init clean -r
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)
Reboot
After this last reboot, the network adapter was present, assigned an IPv4 address and I was able to SSH.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.