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 up hangs on every second boot at: Configuring and enabling network interfaces... #1842

Closed
grenade opened this issue Jun 18, 2013 · 5 comments

Comments

@grenade
Copy link

grenade commented Jun 18, 2013

We use Vagrant to provision a custom, Fedora Core 18, VM desktop to Windows users. The VMs are used as interactive development workstations. However, for all users, vagrant up hangs on every second boot. The provisioning scripts don't get a chance to run because we don't get past the message that reads: Configuring and enabling network interfaces...

I am aware of the page at: https://github.com/mitchellh/vagrant/wiki/%60vagrant-up%60-hangs-at-%22Waiting-for-VM-to-boot.-This-can-take-a-few-minutes%22
Running the dhcp lease release makes no difference in our case and running services network restart fails when the machine is in this state.

The tail end of the vagrant_log=debug output looks like this:

SharedFolderNameMachineMapping1="/vagrant"
SharedFolderPathMachineMapping1="D:/vagrant/instance/fcdlmyml"
SharedFolderNameMachineMapping2="/data"
SharedFolderPathMachineMapping2="d:/data"
VRDEActiveConnection="off"
VRDEClients=0
GuestMemoryBalloon=0
GuestOSType="Linux26_64"
GuestAdditionsRunLevel=2
GuestAdditionsVersion="4.2.12 r84980"
GuestAdditionsFacility_VirtualBox Base Driver=50,1371566087877
GuestAdditionsFacility_VirtualBox System Service=50,1371566097385
GuestAdditionsFacility_Seamless Mode=0,1371566087877
GuestAdditionsFacility_Graphics Mode=50,1371566087877
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
INFO interface: info: Configuring and enabling network interfaces...
[default] Configuring and enabling network interfaces...
DEBUG ssh: Checking whether SSH is ready...
DEBUG ssh: Re-using SSH connection.
INFO ssh: SSH is ready!
INFO guest: Execute capability: configure_networks (fedora)
DEBUG guest: Searching for cap: configure_networks
DEBUG guest: Checking in: fedora
DEBUG guest: Found cap: configure_networks in fedora
DEBUG ssh: Checking whether SSH is ready...
DEBUG ssh: Re-using SSH connection.
INFO ssh: SSH is ready!
INFO guest: Execute capability: network_scripts_dir (fedora)
DEBUG guest: Searching for cap: network_scripts_dir
DEBUG guest: Checking in: fedora
DEBUG guest: Found cap: network_scripts_dir in fedora
DEBUG ssh: Re-using SSH connection.
INFO ssh: Execute: touch /etc/sysconfig/network-scripts/ifcfg-p7p1 (sudo=true)
DEBUG ssh: Exit status: 0
DEBUG ssh: Re-using SSH connection.
INFO ssh: Execute: sed -e '/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d' /etc/sysconfig/network-scripts/ifcfg-p7p1 > /tmp/vagrant-ifcfg-p7p1 (sudo=true)
DEBUG ssh: Exit status: 0
DEBUG ssh: Re-using SSH connection.
INFO ssh: Execute: cat /tmp/vagrant-ifcfg-p7p1 > /etc/sysconfig/network-scripts/ifcfg-p7p1 (sudo=true)
DEBUG ssh: Exit status: 0

Our vagrant file looks like this

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.hostname = ENV['COMPUTERNAME'].downcase + "-" + ENV['VAGRANT_BOX'] + "." + ENV['USERDNSDOMAIN'].downcase
  config.vm.box = ENV['VAGRANT_BOX']
  config.vm.box_url = "http://xxx.xxx/vagrant/fc18.box"
  config.vm.network :public_network
  config.vm.provider :virtualbox do |vb|
    vb.customize ["modifyvm", :id, "--memory", 4096]
    vb.customize ["modifyvm", :id, "--vram", 128]
    vb.customize ["modifyvm", :id, "--cpus", 1]
    vb.gui = true
    vb.name = ENV['COMPUTERNAME'].downcase + "-" + ENV['VAGRANT_BOX'].downcase
  end
  config.vm.synced_folder "d:/data", "/data"
  config.vm.provision :shell, :path => File.expand_path("../bootstrap.sh", __FILE__), :args => ENV['USERNAME'].downcase + " " + ENV['VAGRANT_BOX'].downcase + " '" + ENV['USER_FULL_NAME'].downcase + "'"
end
@grenade
Copy link
Author

grenade commented Jun 19, 2013

When I remove the config.vm.network :public_network line from the vagrant file and use a base image with a NAT interface (instead of bridged), this problem does not occur.

@acesuares
Copy link

#1792

@rogaha
Copy link

rogaha commented Aug 5, 2013

I'm having this issue as well. I tried

 config.vm.network :bridged, :bridge => "en0: Wi-Fi (AirPort)" 
and
 config.vm.network :public_network
In order to create a bridge network. But both are hanging at that step.

Here is the last lines of the log file:

 00:00:06.523812 Guest Log: vboxguest: major 0, IRQ 20, I/O port d020, MMIO at 00000000f0400000 (size 0x400000)
00:00:06.694716 NAT: IPv6 not supported
00:00:06.711721 NAT: DNS#0: 10.180.1.53
00:00:06.711737 NAT: DHCP offered IP address 10.0.2.15
00:00:06.712031 NAT: DHCP offered IP address 10.0.2.15
00:00:07.439388 NAT: DHCP offered IP address 10.0.2.15
00:00:07.439870 NAT: DHCP offered IP address 10.0.2.15

After a long period of time it passes that step. But when I type vagrant reload it hangs at [default] Waiting for VM to boot. This can take a few minutes.

Here is the last lines of the log file:

00:00:02.652081 PIT: mode=2 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:00:02.652291 Guest Log: BIOS: Boot : bseqnr=1, bootseq=0032
00:00:02.652629 Guest Log: BIOS: Booting from Hard Disk...
00:00:03.005554 Guest Log: int13_harddisk: function 02, unmapped device for ELDL=81
00:00:03.005781 Guest Log: int13_harddisk: function 00, unmapped device for ELDL=81
00:00:03.006008 Guest Log: int13_harddisk: function 02, unmapped device for ELDL=81
00:00:03.006226 Guest Log: int13_harddisk: function 00, unmapped device for ELDL=81
00:00:03.006437 Guest Log: int13_harddisk: function 02, unmapped device for ELDL=81
00:00:03.006646 Guest Log: int13_harddisk: function 00, unmapped device for ELDL=81
00:00:03.119868 Display::handleDisplayResize(): uScreenId = 0, pvVRAM=0000000109745000 w=640 h=480 bpp=32 cbLine=0xA00, flags=0x1
00:00:03.148066 Display::handleDisplayResize(): uScreenId = 0, pvVRAM=0000000109619000 w=640 h=480 bpp=32 cbLine=0xA00, flags=0x1

@mitchellh
Copy link
Contributor

Bridged network simply don't work on some routers. Vagrant can't really detect this so you'll have to check your router. The original issue should be fixed in git.

@andrace
Copy link

andrace commented Jun 21, 2016

vagrant reload
up just once is enough
like up is build reload is use

@ghost ghost locked and limited conversation to collaborators Apr 4, 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

5 participants