Skip to content
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

The latest centos/7 box can't do vagrant up successfually #1

Open
doggy8088 opened this issue Dec 24, 2017 · 0 comments
Open

The latest centos/7 box can't do vagrant up successfually #1

doggy8088 opened this issue Dec 24, 2017 · 0 comments

Comments

@doggy8088
Copy link

doggy8088 commented Dec 24, 2017

The latest centos/7 box is not able to vagrant up anymore. Here is the messages:

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

# Update sysconfig
sed -i 's/\(HOSTNAME=\).*/\1master.localdomain/' /etc/sysconfig/network

# Update DNS
sed -i 's/\(DHCP_HOSTNAME=\).*/\1"master"/' /etc/sysconfig/network-scripts/ifcfg-*

# Set the hostname - use hostnamectl if available
echo 'master.localdomain' > /etc/hostname
if command -v hostnamectl; then
  hostnamectl set-hostname --static 'master.localdomain'
  hostnamectl set-hostname --transient 'master.localdomain'
else
  hostname -F /etc/hostname
fi

# Prepend ourselves to /etc/hosts
grep -w 'master.localdomain' /etc/hosts || {
  sed -i'' '1i 127.0.0.1\tmaster.localdomain\tmaster' /etc/hosts
}

# Restart network
service network restart


Stdout from the command:

/bin/hostnamectl
Restarting network (via systemctl):  [FAILED]


Stderr from the command:

Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant