freebsd-vagrant icon indicating copy to clipboard operation
freebsd-vagrant copied to clipboard

Vagrant 1.1.5 on OSX 10.7 hangs at "waiting for vm to boot"

Open EpocSquadron opened this issue 11 years ago • 5 comments

My cpu activity pegs for about 10 seconds after the waiting for boot message shows up, indicating it is indeed booting up. But vagrant never moves on to the next step. If I interrupt (^C twice), then run vagrant destroy, it reports that it is forcing a shut down, indicating that the vm must be running.

This is using the following vagrantfile:

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

# What ip you want to reach the vm at.
host_only_ip = "192.168.33.12"

Vagrant::Config.run do |config|
  # All Vagrant configuration is done here. The most common configuration
  # options are documented and commented below. For a complete reference,
  # please see the online documentation at vagrantup.com.

  # Every Vagrant virtual environment requires a box to build off of.
  config.vm.box = "freebsd"

  # The url from where the 'config.vm.box' box will be fetched if it
  # doesn't already exist on the user's system.
  config.vm.box_url = "https://s3.amazonaws.com/vagrant_boxen/freebsd_amd64_ufs.box"

  # Assign this VM to a host-only network IP, allowing you to access it
  # via the IP. Host-only networks can talk to the host machine as well as
  # any other machines on the same network, but cannot be accessed (through this
  # network interface) by any external networks.
  config.vm.network :hostonly, host_only_ip

  # Share an additional folder to the guest VM. The first argument is
  # an identifier, the second is the path on the guest to mount the
  # folder, and the third is the path on the host to the actual folder.
  config.vm.share_folder "vagrant-root", "/var/www/", ".", :nfs => true

end

I tried using the vagrantfile from the readme but that threw errors at me. I'll file a separate bug for that.

EpocSquadron avatar Apr 05 '13 19:04 EpocSquadron

Same happens for 10.8. When running it with VAGRANT_LOG=info I get the following output:

... Repeated multiple times 

 INFO ssh: Attempting to connect to SSH...
 INFO ssh:   - Host: 127.0.0.1
 INFO ssh:   - Port: 2222
 INFO ssh:   - Username: vagrant
 INFO ssh:   - Key Path: /Users/mario/.vagrant.d/insecure_private_key
 INFO retryable: Retryable exception raised: #<Timeout::Error: execution expired>
 INFO ssh: Attempting to connect to SSH...
 INFO ssh:   - Host: 127.0.0.1
 INFO ssh:   - Port: 2222
 INFO ssh:   - Username: vagrant
 INFO ssh:   - Key Path: /Users/mario/.vagrant.d/insecure_private_key
 INFO ssh: SSH not up: #<Vagrant::Errors::SSHConnectionTimeout: Vagrant timed out while attempting to connect via SSH. This usually
means that the VM booted, but there are issues with the SSH configuration
or network connectivity issues. Please try to `vagrant reload` or
`vagrant up` again.>
 INFO subprocess: Starting process: ["VBoxManage", "showvminfo", "ad5d54b1-af13-4aab-81d4-2975a9be1c6a", "--machinereadable"]
 INFO subprocess: Starting process: ["VBoxManage", "showvminfo", "ad5d54b1-af13-4aab-81d4-2975a9be1c6a", "--machinereadable"]
 INFO subprocess: Starting process: ["VBoxManage", "showvminfo", "ad5d54b1-af13-4aab-81d4-2975a9be1c6a", "--machinereadable"]
 INFO ssh: Attempting SSH. Retries: 100. Timeout: 30

... Restarts the loop

xenji avatar May 05 '13 09:05 xenji

Here is my config:

Vagrant.configure("2") do |config|
  config.vm.box = "FreeBSD64ZFS"
  config.vm.guest = :freebsd
  config.vm.box_url = "https://s3.amazonaws.com/vagrant_boxen/freebsd_amd64_zfs.box"

  config.vm.hostname = "#{ENV['USER']}-orchestra.192.168.33.55.xip.io"
  config.vm.network :private_network, ip: "192.168.33.55"
  config.vm.synced_folder "#{ENV['HOME']}/Dev/Source", "/appdata/www", :nfs => true, id: "vagrant-root"

  config.vm.provider :virtualbox do |vb|  
    # vb.customize ["startvm", :id, "--type", "gui"]
    vb.customize ["modifyvm", :id, "--memory", "4096"]
    vb.customize ["modifyvm", :id, "--nictype1", "virtio"]
    vb.customize ["modifyvm", :id, "--cpus", "2"]
    vb.customize ["modifyvm", :id, "--hwvirtex", "on"]
    vb.customize ["modifyvm", :id, "--audio", "none"]
  end

  config.vm.provision :shell do |s|
      s.inline = "mkdir -p $2 ; \
          mount $(route get 127.1.1.1 | tr -d ' ' | grep gateway | \
          awk -F':' '{print $2}'):$1 $2"
      s.args = "#{ENV['HOME']}/Dev/Source /appdata/www"
  end
end

When I force the GUI execution I see, that the IP is taken from the VBox'es DHCP pool, so this might be a possible reason?

xenji avatar May 05 '13 09:05 xenji

Sorry for spamming, but commenting the custom IP setting helps. I've deactivated the custom network setting and now I can boot it up.

Next problem:

 INFO interface: error: Vagrant attempted to execute the capability 'mount_virtualbox_shared_folder'
on the detect guest OS 'freebsd', but the guest doesn't
support that capability. This capability is required for your
configuration of Vagrant. Please either reconfigure Vagrant to
avoid this capability or fix the issue by creating the capability.

xenji avatar May 05 '13 09:05 xenji

@xenji Did you resolve this issue? I found this fix and it works for me. https://github.com/mitchellh/vagrant/issues/1500

johnzachary avatar Jul 03 '13 12:07 johnzachary

@johnzachary Thanks and sorry for the late reply. I'll give it a try!

xenji avatar Jul 26 '13 18:07 xenji