Unable to change hostname in Ubuntu 18.04 server on Virtualbox
This can be solved by changing preserve_hostname to true in /etc/cloud/cloud.cfg
To reiterate:
- Set preserve_hostname true in /etc/cloud/cloud.cfg
- Update hostname
sudo hostnamectl set-hostname ubuntu-1
reboot