Unable to ping the vagrant VM

113 views
Skip to first unread message

sunda...@gmail.com

unread,
Dec 11, 2015, 6:04:53 AM12/11/15
to Vagrant
Hi all,

I am unable to ping the Virtual machine when I issue the Vagrant up command from the Dos prompt. 

I am doing a course on EdX, which requires me to install Oracle Virtual box, VM and Vagrant.My installation is for Windows 7 64 bit. I installed all of the above as per the instructions. 

Whenever I issue the vagrant up command, the VM starts and I get a message that the VM is running. But when it tries to ping the VM, it comes with the message that there is no response.



The configuration file I am using is the default one, and it as given below.

# -*- mode: ruby -*-
# vi: set ft=ruby :

ipythonPort = 8001                 # Ipython port to forward (also set in IPython notebook config)

Vagrant.configure(2) do |config|
  config.ssh.insert_key = true
  config.vm.define "sparkvm" do |master|
    master.vm.box = "sparkmooc/base2"
    master.vm.box_download_insecure = true
    master.vm.boot_timeout = 900
    master.vm.network :forwarded_port, host: ipythonPort, guest: ipythonPort, auto_correct: true   # IPython port (set in notebook config)
    master.vm.network :forwarded_port, host: 4040, guest: 4040, auto_correct: true                 # Spark UI (Driver)
    master.vm.hostname = "sparkvm"
    master.vm.usable_port_range = 4040..4090

    master.vm.provider :virtualbox do |v|
      v.name = master.vm.hostname.to_s
    end
  end
end
 

It will be a great help if any of you share your thoughts on the same.

Bets regards
U. M. Sundar 

Alvaro Miranda Aguilera

unread,
Dec 13, 2015, 4:08:47 PM12/13/15
to vagra...@googlegroups.com
Hello,

You can connect to the virtual machine with `vagrant ssh` and see the
VM is up and running.

Any service that is running on the VM, will be available over the
redirected port, in this case 4040

There is no IP in the VM that you can use for ping as is configured today.

Thanks
Alvaro
> --
> 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 vagrant-up+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/a0c800b9-6a21-48c5-9e0e-f15a7323f533%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

sunda...@gmail.com

unread,
Dec 16, 2015, 3:18:58 AM12/16/15
to Vagrant
Thanks Alvaro,

I will try that. 

Best regards
U. M. Sundar

sunda...@gmail.com

unread,
Dec 16, 2015, 3:29:42 AM12/16/15
to Vagrant
Hi Alvaro, 

I tried Vagrant ssh and it gave me the following message

C:\Sundar\Personal\EdX\BigData\myvagrant>vagrant ssh

`ssh` executable not found in any directories in the %PATH% variable. Is an
SSH client installed? Try installing Cygwin, MinGW or Git, all of which
contain an SSH client. Or use your favorite SSH client with the following
authentication information shown below:

Host: 127.0.0.1
Port: 22


What should I be doing different.

Best regards
U. M. Sundar

On Monday, December 14, 2015 at 2:38:47 AM UTC+5:30, Alvaro Miranda Aguilera wrote:

pixel fairy

unread,
Dec 30, 2015, 2:15:07 AM12/30/15
to Vagrant
Vagrant on windows is slightly complicated because of the lack of a native ssh client. microsoft is working on this. https://github.com/PowerShell/Win32-OpenSSH

in the mean time, the easiest way to run vagrant on windows is to use git-bash as your shell instead of cmd.exe or powershell. its in the github desktop client, or you can get it here, http://git-scm.com/

Fraser Goffin

unread,
Dec 30, 2015, 3:27:16 PM12/30/15
to Vagrant
If you are on the latest version of Vagrant you can use vagrant powershell.
Reply all
Reply to author
Forward
0 new messages