Bringing machine 'default' up with 'virtualbox' provider...
<snip>
==> default: Auto-generating node name for Chef...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 80 (guest) => 8081 (host) (adapter 1)
default: 4242 (guest) => 4242 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Remote connection disconnect. Retrying...
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.
So the Vagrant in VirtualBox is still running, so I try
vagrant ssh
The prompt sits there for 40 seconds and then I'm in. I timed it using the stopwatch Google surfaces for "timer". The fact it takes 40 consistent seconds has me wondering if this is the problem.
It takes the same time for
sh vag...@127.0.0.1 -p 2222 -i /Users/nemonik/.vagrant.d/insecure_private_key
I built the CentOS 7 Vagrant box via Packer, and imported it... My Vagrantfile looks like so:
Vagrant.configure(2) do |config|
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
vb.cpus = "1"
end
config.vm.provider :virtualbox do |vb|
vb.gui = true
end
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :box
config.cache.auto_detect = true
end
config.vm.network "forwarded_port", guest: 80, host: 8081, protocol: "tcp", host_ip: '127.0.0.1'
config.vm.network "forwarded_port", guest: 4242, host: 4242, protocol: "tcp", host_ip: '127.0.0.1'
config.vm.box="nemonik/centos-7-2-1511"
config.berkshelf.berksfile_path = "cookbook/Berksfile"
config.berkshelf.enabled = true
config.vm.synced_folder "cookbook/files/default", "/vagrant"
config.vm.provision "chef_zero" do |chef|
chef.cookbooks_path = "./cookbook"
chef.add_recipe "nemonik"
chef.nodes_path = "/tmp"
chef.log_level = :info
end
end
I've been pounding on this small part of open-source project all flipping day, and would appreciate the help.
-Michael