-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setting the hostname on CentOS 7 #4352
Comments
I can second this problem. A line like
causes something like this:
|
+1 |
So right now, its a complicated process to change the hostname:
Does the |
@mitchellh I think that's the case. I just did "homenamectl set-hostname <my_host_name>" and that was it. systemd takes care of the rest.. Here is the man page:
UPDATE: |
Fixed. Thanks @pazooki |
I get this error with the latest vagrant.
it should be hostnamectl set-hostname xxx.example.com Thanks |
Oh my bad!! apparently someone else mentioned that: |
Also another problem with centos 7.0 by setting the hostname in vagrant like this This should also updates the /etc/hosts file, this does not happen in centos 7.0 ( with centos 6.5 it works) uname -a is ok but when using puppet it fails because facter fqdn says admin.lan instead of admin.example.com
|
So this has to be fixed duplicating the hostnamectl call in all every distro that uses systemd?. I noticed arch also has this code and SLES-12 still fails. Is copy-paste the call to a guest plugin the right approach? Or said differently, is there a way we could detect systemd and have a set of capabilities in common for all systemd based distros? |
+1, all distros that use systemd set the hostname via hostnamectl. I just ran into this issue on a Fedora 23 Server box, where Vagrant sets the hostname by writing to |
Apparently the right way to set the hostname in el7 is by using hostnamectl.
hostnamectl set-hostname {{ your_hostname }}
right now vagrant can't set hostname for Centos 7 ...
The text was updated successfully, but these errors were encountered: