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

/sbin/ifdown error when setting static IP #3

Closed
scribu opened this issue Dec 16, 2013 · 9 comments
Closed

/sbin/ifdown error when setting static IP #3

scribu opened this issue Dec 16, 2013 · 9 comments

Comments

@scribu
Copy link

scribu commented Dec 16, 2013

Hello, I recently switched my config from a CentOS 6.3 box to your CentOS 6.4 box and then to the latest CentOS 6.5 box. In both cases, I got an error when running vagrant up.

Here are the relevant parts of my Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.box = "centos65-x86_64-20131205"
  config.vm.box_url = "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.1/centos65-x86_64-20131205.box"

  config.vm.network :private_network, ip: "192.168.50.4"
  config.vm.network :forwarded_port, guest: 3306, host: 13306  # mysql
$ vagrant --version
Vagrant 1.4.0
$ VBoxManage --version
4.3.4r91027
$ vagrant up
...

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

/sbin/ifdown eth1 2> /dev/null

Stdout from the command:



Stderr from the command:


Possibly related: hashicorp/vagrant#1777

@mgijsberti
Copy link

Hi,

I could reproduce the same issue. I switched last week to Vagrant 1.4.0 and now centos boxes show the same issue. Used this centos box https://github.com/2creatives/vagrant-centos/releases/download/v6.5.1/centos65-x86_64-20131205.box

I copied the above VagrantFile and could reproduce the same problem.

$ vagrant --version
Vagrant 1.4.0
$ VBoxManage --version
4.2.12r84980
$ vagrant up

$ vagrant reload
[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] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 3306 => 13306 (adapter 1)
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
[default] Machine booted and ready!
[default] The guest additions on this VM do not match the installed version of
VirtualBox! In most cases this is fine, but in rare cases it can
cause things such as shared folders to not work properly. If you see
shared folder errors, please update the guest additions within the
virtual machine and reload your VM.

Guest Additions Version: 4.3.4
VirtualBox Version: 4.2
[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!

/sbin/ifdown eth1 2> /dev/null

Stdout from the command:

Stderr from the command:

@casr
Copy link
Member

casr commented Dec 16, 2013

Thanks for the bug reports.

I've tried to replicate on my host system (Mac OS X 10.9) using Vagrant 1.3.5 and VirtualBox 4.3.4 and I haven't gotten the same error. I'll try updating to Vagrant 1.4 and see if that buggers it up...

@casr
Copy link
Member

casr commented Dec 16, 2013

Vagrant 1.4 has broken it for me with a similar error to above.

@mgijsberti
Copy link

Yes, I switched back to 1.3.5 and now the centos box works again. So this issue is related to 1.4.0.

@casr
Copy link
Member

casr commented Dec 16, 2013

I think the old version of Vagrant made a new ifcfg-eth1 file for this use case but it appears that the new version tries to configure it by first checking it can turn it off the interface. CentOS doesn't bring up new hardware on boot by default so this confuses Vagrant.

After the first boot you can try doing after vagrant ssh:

cat <<EOM | sudo tee /etc/sysconfig/network-scripts/ifcfg-eth1 >/dev/null
DEVICE="eth1"
ONBOOT="yes"
TYPE="Ethernet"
EOM

@casr
Copy link
Member

casr commented Dec 16, 2013

df87be2 should fix this. It should hopefully still work beyond a new repackage too but I haven't tested that.

I'll tag a new release soon but I'm just going to wait on some other issues before doing that.

@casr
Copy link
Member

casr commented Dec 17, 2013

@scribu it was confirmed as a bug within Vagrant with this issue. Should hopefully be fixed in the next release. I may revert df87be2 depending on how much use it continues to be.

@casr casr closed this as completed Dec 17, 2013
@scribu
Copy link
Author

scribu commented Dec 17, 2013

Alright, thanks for investigating.

@shbzmohd
Copy link

Hello All,

When i do vagrant up i am getting below error. Can anyone help me?

I am using vagrant-1.7.4
I tried to bring up the vagrant box CentOS 6.5 x86_64(https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box)

==> default: Forwarding ports...
default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'aborted' state. Please verify everything is configured
properly and try again.

If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run vagrant up while the
VirtualBox GUI is open.

The primary issue for this error is that the provider you're using
is not properly configured. This is very rarely a Vagrant issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants