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

vagrant stuck at "Setting hostname" #1974

Closed
Adirelle opened this issue Jul 24, 2013 · 20 comments
Closed

vagrant stuck at "Setting hostname" #1974

Adirelle opened this issue Jul 24, 2013 · 20 comments

Comments

@Adirelle
Copy link

Adirelle commented Jul 24, 2013

Since I upgraded Vagrant to 1.2.4 (from 1.2.2), "vagrant up" gets stuck at "Setting hostname". If I interrupt it and try to run a "vagrant reload", it gets stuck at "Attempting graceful shutdown of VM".

Reverting to 1.2.2 fixes this issue.

Context:

  • Vagrant 1.2.4 without any plugin,
  • VirtualBox 4.2.16,
  • Custom Debian Squeeze base box, created with Vagrant 1.0,
  • Windows 7 64-bits.

See https://gist.github.com/Adirelle/5e5a0ae063e9f02e23c7 for a debug log.

@arosenhagen
Copy link

arosenhagen commented Jul 25, 2013

got the same issue. I solved it by removing config.vm.hostname = "" from the Vagrantfile, then resetting the hostname inside the VM "manually" with chef.

@hectcastro
Copy link

hectcastro commented Jul 25, 2013

The fix appears to be on master: bc7b481

@Adirelle
Copy link
Author

Adirelle commented Jul 26, 2013

I'm not sure how to get Vagrant working from sources on Windows to verify this. Can update it from what the installer installed ?

@suan
Copy link

suan commented Jul 29, 2013

Funny, running the latest version (1.2.7) doesn't fix this for me, even though it looks like the fix should already be in that version.

@colby-swandale
Copy link

colby-swandale commented Jul 30, 2013

getting the same issue as well running latest version (1.2.7)

@elijahandrews
Copy link

elijahandrews commented Jul 31, 2013

Also getting this issue using a custom Debian Squeeze base box on Vagrant 1.2.7. Reverting to 1.2.3 fixes the issue.

Other info: VirtualBox 4.2.16, Mac OS 10.8.4.

@jperras
Copy link

jperras commented Aug 3, 2013

Same issue here.

While watching the INFO log, it gets stuck at the following:

 INFO ssh: Execute: ifdown -a; ifup -a; ifup -a --allow=hotplug (sudo=true)
 INFO subprocess: Starting process: ["/usr/bin/VBoxManage", "showvminfo", "60cfcca5-ae82-4906-afd1-1495dbacbd20", "--machinereadable"]
 INFO subprocess: Starting process: ["/usr/bin/VBoxManage", "showvminfo", "60cfcca5-ae82-4906-afd1-1495dbacbd20", "--machinereadable"]

Vagrant 1.2.7
VirtualBox 4.2.16

@spanneberg
Copy link

spanneberg commented Aug 5, 2013

Observed the same issue on a colleagues machine running VirtualBox 4.2.16 / Vagrant 1.2.7 on a Ubuntu 12.04 LTS 64bit running a Debian Wheezy box (also 64 bit).

@ppp0
Copy link

ppp0 commented Aug 5, 2013

Somehow eth0 is not affected by either ifup -a and ifup --allow=hotplug and once ifdowned, ssh obviously can't talk to the VM anymore. That's why it gets stuck

@njam
Copy link

njam commented Aug 7, 2013

@fpletz The restarting of networking was introduced by you in 65f275a to renew dhcp leases. This seems to let the box not being accessible in some cases.
Is there another way to accomplish what you want without restarting networking? I.e. just calling dhclient?

@fpletz
Copy link
Contributor

fpletz commented Aug 8, 2013

@njam Thanks for mentioning me. Looking into this.

Could anybody please post the network configuration in your Vagrantfile and /etc/network/interfaces from the VM? Thanks.

@ppp0
Copy link

ppp0 commented Aug 8, 2013

Vagrantfile

#[...]
config.vm.define :m3 do |m3|
    m3.vm.hostname = 'pppagent2'
    m3.vm.network :private_network, ip: "10.10.11.12"
end
#[...]

This Vagrantfile defines a second NIC for the private network. Ther first NIC ist automatically created (NAT networking)

/etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp
pre-up sleep 2
#VAGRANT-BEGIN
# The contents below are automatically generated by Vagrant. Do not modify.
auto eth1
iface eth1 inet static
      address 10.10.11.12
      netmask 255.255.255.0
#VAGRANT-END

Box is a debian squeeze amd-64

@adamcstephens
Copy link

adamcstephens commented Aug 9, 2013

Running 1.2.7, I am experiencing this with debian squeeze amd64 only.

This same config works without problems on centos5/6, debian7 and ubuntu1204.

  config.vm.network :public_network, :bridge => "en0: Wi-Fi (AirPort)"

  ['centos5', 'centos6', 'debian6', 'debian7', 'ubuntu1204'].each do |os|
    ['base', 'test'].each do |on|
      config.vm.define "#{os}#{on}".to_sym do |localconfig|
        localconfig.vm.hostname = "#{os}#{on}"
        localconfig.vm.box = "dev-#{os}"
      end
    end
  end

@mitchellh
Copy link
Member

mitchellh commented Aug 9, 2013

Fixed by #2026. Will be in next version. Sorry guys!

@haseebeqx
Copy link

haseebeqx commented Apr 25, 2018

same issue happening again with 2.0.4

@JoannaRMIT
Copy link

JoannaRMIT commented Apr 26, 2018

Same here

@haseebeqx
Copy link

haseebeqx commented Apr 26, 2018

for me the problem only happens with harshicorp/precise32 box, may be something related to that

@briancain
Copy link
Member

briancain commented Apr 26, 2018

@haseebeqx @JoannaRMIT Please open a new issue if you're encountering a problem, thanks!

@zackshapiro
Copy link

zackshapiro commented May 1, 2018

Glad I'm not alone

@ghost
Copy link

ghost commented Mar 30, 2020

I'm going to lock this issue because it has been closed for 30 days . This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@hashicorp hashicorp locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests