The firewall could not connect the virtual machine

I run the vagrant up command to connect to the virtual machine and during the execution of this command I get the error mentioned below.

I tried a few steps to start it with gui mode turned on, but the GUI mode itself does not open anything.

during the execution of this command, a separate promt command opens and closes by itself. And after that I get below the error. Can you please give me some idea of ​​how I can fix these problems.

details: OS: windows 7 next steps: 1. vagrant box add box1 c:/vmBoxFolder - works fine 2. vagrant init box1 - works fine 3. vagrant up - Fails

host file entries . 127.0.0.1 localhost :: 1 localhost

ERROR:

 C:\blog>vagrant up [default] VM already created. Booting if its not already running... [default] Running any VM customizations... [default] Clearing any previously set forwarded ports... [default] Forwarding ports... [default] -- ssh: 22 => 2222 (adapter 1) [default] Cleaning previously set shared folders... [default] Creating shared folders metadata... [default] Booting VM... [default] Waiting for VM to boot. This can take a few minutes. [default] Failed to connect to VM! Failed to connect to VM via SSH. Please verify the VM successfully booted by looking at the VirtualBox GUI. 

thanks, lucky.

+4
source share
1 answer

During Vagrant Up your Windows system tries to connect to SSH. If you enter at the command prompt:

 set VAGRANT_LOG=INFO 

You can see how it fails and try a couple of times. It looks like this:

 INFO ssh: Connecting to SSH: 127.0.0.1:2222 

This is because the timeout is set to 10. This can be changed by placing the following in your Vagrantfile:

 config.ssh.timeout = 300 

You can use any number you like, but I recommend something above 100.

Sources:

+3
source

Source: https://habr.com/ru/post/975625/


All Articles