I'm creating new vagrant box that uses virtualbox image of CentOS 6.5 that I installed. Inside everything looks fine, but from outside I can't access 80 port.
When I edited my Vagrantfile and added fixed IP:
config.vm.network "private_network", ip: "10.10.10.10"
And I ran vagrant up, I got "systemctl command not found".
I think this it tries to setup network interface, but fails because it uses systemctl which, I assume is not available in this version or distribution.
Is there a way to add it, or configure IP/network interface manually? So that vagrant connects to it?
==> default: Attempting graceful shutdown of VM...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
systemctl stop etcd
ifconfig 10.10.10.10 netmask 255.255.255.0
mv /tmp/etcd-cluster.service /media/state/units/
systemctl restart local-enable.service
# Restart default etcd
systemctl start etcd
Stdout from the command:
Stderr from the command:
bash: line 3: systemctl: command not found
SIOCSIFNETMASK: No such device
SIOCGIFADDR: No such device
SIOCSIFBROADCAST: No such device
mv: cannot move `/tmp/etcd-cluster.service' to `/media/state/units/': No such file or directory
bash: line 6: systemctl: command not found
bash: line 9: systemctl: command not found
Best Answer
Not sure if this was the cause, but the culprit could have been SELinux. Maybe it blocked connections or permissions. Got it working later: