windows-k8s-lab
windows-k8s-lab copied to clipboard
The latest centos/7 box can't do vagrant up successfually
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.