Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

vagrant stuck at "Setting hostname" #1974

Adirelle opened this Issue Jul 24, 2013 · 14 comments


None yet

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.


  • 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.

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.

The fix appears to be on master: bc7b481

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 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.

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

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 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

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 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 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 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 commented Aug 8, 2013


config.vm.define :m3 do |m3|
    m3.vm.hostname = 'pppagent2'
    m3.vm.network :private_network, ip: ""

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


# 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
# The contents below are automatically generated by Vagrant. Do not modify.
auto eth1
iface eth1 inet static

Box is a debian squeeze amd-64

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}"

mitchellh commented Aug 9, 2013

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

@mitchellh mitchellh closed this Aug 9, 2013

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