OVH Public Cloud CentOS 7 Change Hostname

If you’ve tried to change the hostname on your OVH public cloud instance running CentOS 7, you may have had issues with it persisting after reboot.

Took me way to long to find this solution, but someone had already spent way too much time figuring it out.

This GitHub Gist explains it all https://gist.github.com/zmjwong/77ee37deb1749c2582eb

Basically you need to edit /etc/cloud/cloud.cfg and add “preserve_hostname: true” and then set your hostname using hostnamectl.

hostnamectl –transient set-hostname your.new.hostname
hostnamectl –static set-hostname your.new.hostname

Hope that helps and thank zmjwong!


Did you like this article?


0 Shares:
You May Also Like

Fastcgi and the dreaded aborted: select() failed

I was getting reports of "500 Internal Server Errors" on two of my web servers. And after further investigation it looks like it was related to the following error.

(4)Interrupted system call: FastCGI: comm with server "php-fastcgi.fcgi" aborted: select() failed

After doing some reasearch I stumbled upon the following patch.

http://groups.google.com/group/linux.debian.bugs.dist/browse_thread/thread/3de22bc415d3da02?pli=1

Read More