I can't initialize vagrant typing vagrant up
on cmd (Windows 10), this is the logs
`
C:\xampp\apache\ecomex\ecomex>vagrant up
Bringing machine 'ecomex' up with 'virtualbox' provider...
==> ecomex: Loading Berkshelf datafile...
==> ecomex: Sharing cookbooks with VM
==> ecomex: Checking if box 'grtjn/centos-7.0' is up to date...
==> ecomex: Clearing any previously set forwarded ports...
==> ecomex: Updating Vagrant's Berkshelf...
==> ecomex: Resolving cookbook dependencies...
==> ecomex: Fetching 'ecomex' from source at cookbooks/ecomex
==> ecomex: Using apt (3.0.0)
==> ecomex: Using ark (1.0.1)
==> ecomex: Using build-essential (3.2.0)
==> ecomex: Using chef_handler (1.3.0)
==> ecomex: Using ecomex (0.0.1) from source at cookbooks/ecomex
==> ecomex: Using nodejs (2.2.0)
==> ecomex: Using redisio (2.3.0)
==> ecomex: Using seven_zip (2.0.0)
==> ecomex: Using ulimit (0.3.3)
==> ecomex: Using windows (1.39.2)
==> ecomex: Using yum (3.10.0)
==> ecomex: Using yum-epel (0.6.6)
==> ecomex: Vendoring apt (3.0.0) to C:/Users/EruAizen/.berkshelf/vagrant-berkshelf/shelves/berkshelf20160329-4476-mlo9s9-ecomex/apt
==> ecomex: Vendoring ark (1.0.1) to C:/Users/EruAizen/.berkshelf/vagrant-berkshelf/shelves/berkshelf20160329-4476-mlo9s9-ecomex/ark
==> ecomex: Vendoring build-essential (3.2.0) to C:/Users/EruAizen/.berkshelf/vagrant-berkshelf/shelves/berkshelf20160329-4476-mlo9s9-ecomex/build-essential
==> ecomex: Vendoring chef_handler (1.3.0) to C:/Users/EruAizen/.berkshelf/vagrant-berkshelf/shelves/berkshelf20160329-4476-mlo9s9-ecomex/chef_handler
==> ecomex: Vendoring ecomex (0.0.1) to C:/Users/EruAizen/.berkshelf/vagrant-berkshelf/shelves/berkshelf20160329-4476-mlo9s9-ecomex/ecomex
==> ecomex: Vendoring nodejs (2.2.0) to C:/Users/EruAizen/.berkshelf/vagrant-berkshelf/shelves/berkshelf20160329-4476-mlo9s9-ecomex/nodejs
==> ecomex: Vendoring redisio (2.3.0) to C:/Users/EruAizen/.berkshelf/vagrant-berkshelf/shelves/berkshelf20160329-4476-mlo9s9-ecomex/redisio
==> ecomex: Vendoring seven_zip (2.0.0) to C:/Users/EruAizen/.berkshelf/vagrant-berkshelf/shelves/berkshelf20160329-4476-mlo9s9-ecomex/seven_zip
==> ecomex: Vendoring ulimit (0.3.3) to C:/Users/EruAizen/.berkshelf/vagrant-berkshelf/shelves/berkshelf20160329-4476-mlo9s9-ecomex/ulimit
==> ecomex: Vendoring windows (1.39.2) to C:/Users/EruAizen/.berkshelf/vagrant-berkshelf/shelves/berkshelf20160329-4476-mlo9s9-ecomex/windows
==> ecomex: Vendoring yum (3.10.0) to C:/Users/EruAizen/.berkshelf/vagrant-berkshelf/shelves/berkshelf20160329-4476-mlo9s9-ecomex/yum
==> ecomex: Vendoring yum-epel (0.6.6) to C:/Users/EruAizen/.berkshelf/vagrant-berkshelf/shelves/berkshelf20160329-4476-mlo9s9-ecomex/yum-epel
==> ecomex: Clearing any previously set network interfaces...
==> ecomex: Preparing network interfaces based on configuration...
ecomex: Adapter 1: nat
==> ecomex: Forwarding ports...
ecomex: 3000 (guest) => 9898 (host) (adapter 1)
==> ecomex: Booting VM...
==> ecomex: Waiting for machine to boot. This may take a few minutes...
ecomex: SSH address: 127.0.0.1:22
ecomex: SSH username: vagrant
ecomex: SSH auth method: private key
`
afther a few minutes, it trows the next error message
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.
If you look above, you should be able to see the error(s) that Vagrant had when attempting to connect to the machine. These errors are usually good hints as to what may be wrong.
If you're using a custom box, make sure that networking is properly working and you're able to connect to the machine. It is a common problem that networking isn't setup properly in these boxes. Verify that authentication configurations are also setup properly, as well.
If the box appears to be booting properly, you may want to increase the timeout ("config.vm.boot_timeout") value.
my vagrant file
# -*- mode: ruby -*-
# vi: set ft=ruby
VM = 'ecomex'
Vagrant.configure(2) do |config|
#selecting Cent OS 7.0
config.vm.box = 'grtjn/centos-7.0'
config.vbguest.auto_update = false
# proxy network: Node: 3000 & Apache: 9898
config.vm.network :forwarded_port, guest: 3000, host:9898, auto_correct: true
config.vm.network :forwarded_port, guest: 22, host: 2222, id: "ssh", disabled: "true"
#VirtualBox setup
config.vm.define VM
config.vm.provider :virtualbox do |vb|
vb.name = VM
end
#Fixing issue: stdin is not tty
ssh_fix = 'bash -c "BASH_ENV=/etc/profile exec bash"'
config.ssh.shell = ssh_fix unless ARGV[0] == 'ssh'
#Adding omnibus & bershelf prugins
config.omnibus.chef_version = :latest
config.berkshelf.enabled = true
config.berkshelf.berksfile_path = './Berksfile'
#Chef provisioning
config.vm.provision :chef_solo do |chef|
chef.add_recipe VM
chef.custom_config_path = 'Vagrantfile.chef'
chef.json = {
:nodejs => {
:install_method => 'package',
:npm => '2.13.4'
}
}
end
#start node app
config.vm.provision :shell do |s|
s.privileged = false
s.inline = 'cd /vagrant && pm2 start pm2.json'
end
end
I visited this thread Vagrant stuck connection timeout retrying and added the line in my vagrant file to see what was happend
config.vm.provider :virtualbox do |vb|
vb.gui = true
end
after that, screen shows request login and this is where i got stuck, because after type 'vagrant' as login and password nothing happends.
NOTES:
- Im using Windows 10
- Windows Firewall is shutted down
- VM Network is set on NAT
Sorry for my spelling, im not good enough in english.
thanks for help!