Hi,

The blocking problem is the following:

When I homestead up or vagrant up and I try to connect trough SSH it takes 
a while to connect then each keystroke is interpreted with a minimum delay 
of 2 minutes each making it absolutely unusable...



The configuration is the following:


   Os X 10.10.2


   VirtualBox 4.3.20


   Vagrant 1.7.2


   laravel/homestead (virtualbox, 0.2.2)


I did some tests and I found a path to explore:

I use a VPN which is configured with Viscosity (1.0 / last update) (all 
traffic is sent over VPN connection). I'm also using Little Snitch 3.5.1. 
Both are perfectly working and seems to be pretty much well configured. I'm 
connected over Wifi. I use Little Snitch profiles to create a kind of 
global Kill Switch when the VPN is not connected. So if Wifi is enabled and 
connected AND VPN is not connected, Little Snitch is blocking any 
outgoing/incoming connection (excepting some special rules) to avoid the 
grey zone and any leaks...



I discovered:


   If Wifi is enabled and VPN is connected the SSH issue(s) appears.


   If Wifi is enabled and VPN is NOT connected the SSH issue(s) disappears. 
   (no issues, normal behaviour)


The path:

I'm pretty sure I need to set (properly) VirtualBox Network Settings. I'm 
not at all an expert and I would appreciate some kind help.



Here are some logs:

(Default) Homestead / Settings / Network


   Adaptater 1 is NAT


   Adaptater 2 is Host-Only Adaptater


   (Kill Switch active) Wifi enabled + VPN disabled


I am aware that no internet connection is available since Little Snitch 
deny anything.



homestead up / vagrant up outputs the following:

CODE:Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: There was a problem while downloading the metadata for your box
==> default: to check for updates. This is not an error, since it is 
usually due
==> default: to temporary network problems. This is just a warning. The 
problem
==> default: encountered was:
==> default:
==> default: Failed to connect to xx.xxx.xx.xxx: Host is down
==> default:
==> default: If you want to check for box updates, verify your network 
connection
==> default: is valid and try again.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 80 => 8000 (adapter 1)
    default: 443 => 44300 (adapter 1)
    default: 3306 => 33060 (adapter 1)
    default: 5432 => 54320 (adapter 1)
    default: 22 => 2222 (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: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
    default: /vagrant => /Users/xxx/.composer/vendor/laravel/homestead
    default: /home/vagrant/code => /Volumes/xxx/code
==> default: Machine already provisioned. Run `vagrant provision` or use 
the `--provision`
==> default: to force provisioning. Provisioners marked to run always will 
still run.

Then if I perform homestead ssh it outputs:

CODE:Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-30-generic x86_64)

 * Documentation:  xx

  System information as of Mon Feb  2 07:36:04 UTC 2015

  System load:  0.66              Processes:           103
  Usage of /:   5.0% of 39.34GB   Users logged in:     0
  Memory usage: 29%               IP address for eth0: xx.x.x.xx
  Swap usage:   0%                IP address for eth1: xxx.xxx.xx.xx

  Graph this data and manage this system at:
    xx

  Get cloud support with Ubuntu Advantage Cloud Guest:
    xx


Last login: Mon Feb  2 06:46:17 2015 from xx.x.x.x
vagrant@homestead:~$

So we can consider it's working correctly (booting in few seconds).

Wifi enabled + VPN enabled

Internet connection is available.

homestead up outputs the following:

CODE:Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 80 => 8000 (adapter 1)
    default: 443 => 44300 (adapter 1)
    default: 3306 => 33060 (adapter 1)
    default: 5432 => 54320 (adapter 1)
    default: 22 => 2222 (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: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
    default: /vagrant => /Users/xxx/.composer/vendor/laravel/homestead
    default: /home/vagrant/code => /Volumes/xxx/code
Guest-specific operations were attempted on a machine that is not
ready for guest communication. This should not happen and a bug
should be reported.

I want to highlight the following code:

CODE:Guest-specific operations were attempted on a machine that is not
ready for guest communication. This should not happen and a bug
should be reported.

Then performing homestead ssh takes ages (at least 3 to 4 minutes) to 
connect with the following output:

CODE:Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-30-generic x86_64)

 * Documentation:  xx

  System information as of Mon Feb  2 07:50:06 UTC 2015

  System load:  0.74              Processes:           103
  Usage of /:   5.0% of 39.34GB   Users logged in:     0
  Memory usage: 29%               IP address for eth0: xx.x.x.xx
  Swap usage:   0%                IP address for eth1: xxx.xxx.xx.xx

  Graph this data and manage this system at:
    xx

  Get cloud support with Ubuntu Advantage Cloud Guest:
    xx


Last login: Mon Feb  2 07:41:53 2015 from xx.x.x.x
vagrant@homestead:~$

At this point, it is absolutely unusable because pressing any keystroke 
will take minutes to resolve.

I'm pretty sure the problem comes from a bad configuration from Virtualbox 
/ Settings / Network / Adaptater or something I should put in a VagrantFile.

The connection path seems to be: host machine -> VPN server -> host machine 
-> VM

I would like it to be: host machine -> VM because when working on my code 
and with the VM, I still want to use internet on my host machine as 
normally (trough my VPN).

When VPN is enabled, VM external IP = VPN IP:



When VPN is disabled, VM external IP = ISP IP:



Thank you in advance for your help.

Regards,

Jean

-- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to