had a vagrant in my Mac with a private network IP, previously it works 
properly, I can access its private network IP in the host. But can not 
access from host since yesterday, I dont remember any change to the 
Vagrantfile... 
Could you help give me some suggestions how to bring it back to work? 
Thanks a lot! 

Vagrantfile piece:

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  # Use Centos 7 64-bit as our operating system
  config.vm.box = "centos/7"

  # Configurate the virtual machine to use 2GB of RAM and 2 CPU
  config.vm.provider :virtualbox do |vb|
    vb.name = "vagrant-jenkins"
    vb.customize ["modifyvm", :id, "--memory", "2048"]
    vb.customize ["modifyvm", :id, "--cpus", "2"]
    vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
  end

  config.vm.network :private_network, ip: "192.168.56.8"
  ...
end
 

Logs when vagrant up:

> ➜  toy vagrant up Bringing machine 'default' up with 'virtualbox'
> provider...
> ==> default: Checking if box 'centos/7' is up to date...
> ==> default: A newer version of the box 'centos/7' for provider 'virtualbox' 
> is
> ==> default: available! You currently have version '1804.02'. The latest is 
> version
> ==> default: '1902.01'. Run `vagrant box update` to update.
> ==> 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: 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: Machine booted and ready! [default] GuestAdditions 5.2.14 
> running --- OK.
> ==> default: Checking for guest additions in VM...
> ==> default: Setting hostname...
> ==> default: Configuring and enabling network interfaces...
>     default: SSH address: 127.0.0.1:2222
>     default: SSH username: vagrant
>     default: SSH auth method: private key
> ==> default: Mounting shared folders...


When trying to ssh to it, it is pending on connecting to the private IP:

➜  toy ssh -v toy
OpenSSH_7.6p1, LibreSSL 2.6.2
debug1: Reading configuration data /Users/abc/.ssh/config
debug1: /Users/abc/.ssh/config line 11: Applying options for toy
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to 192.168.56.8 port 22.


ssh config:

Host toy
        Hostname  192.168.56.8
        User      vagrant
        IdentityFile 
~/Vagrant/Toy/.vagrant/machines/default/virtualbox/private_key

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/1df5e8fd-af06-4ac8-876a-99011c34b3fa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to